Two-Sample t-Test
March 23, 2018
Two-Sample t-Test
A two-sample t-test takes sample data from two groups and summarises it as a single t-value. The process is very similar to a one-sample t-test, with the exception that a two-sample t-test requires independent groups for each sample.
Formula
As a two-sample t-test needs to account for 2 samples, there is a slight difference in the denominator of the formula vs. that of the one-sample t-test.
If both samples have the same sample variance,
In the more likely event that the two samples have differing sample variance, use the following.
Example
We want to test if drinking milk prior to taking an exam will improve test scores. Two groups are chosen at random, and one group is made to drink milk while the other serves as the control. Assuming that our data constitutes a random sample from a normal distribution, determine the liklihood that drinking milk prior to an exam improves test scores.
Group that drank milk
- Number of students: 13
- Average test score: 20
- Sample variance: 2
Group that did not drink milk
- Number of students: 15
- Average test score: 18
- Sample variance: 3
Determine the t-Value
\begin{align}t & = \frac{20 - 18}{\sqrt{\frac{2}{13} + \frac{3}{15}}} \
& \approx 3.36
\end{align}
Evaluate the t-Value
Using a t-value calculator, we can determine the probability will be greater than or equal to 3.36. In our example, there is a 0.11% chance that we will obtain such a result. As this is a very low probability, it is highly probable that drinking milk prior to a test does improve test scores1.
- This is a fictitious example. Regardless, any attempts to replicate this will likely not cause you any personal harm. [return]