Lesson 7 of 8 / Practical and data skills
Compare two sample means with a t-test
Is a difference between two means large relative to the variation?
In this lesson: Use the supplied unpaired t-test equation and table to evaluate a difference between means.
About 8 min
The key ideaAn unpaired t-test compares a difference between means with the variation and sizes of two independent samples.
Work with the evidence
Compare the gap with the variation
Magnitude of t = 4.00 / 1 = 4.00; degrees of freedom = 8
Mean A = 5 cm; mean B = 9 cm. Both sample variances are 2.5 cm2 and n = 5 for each group. The t magnitude exceeds the two-sided 5% critical value 2.306: reject the no-difference null under the test assumptions.
The samples are illustrative independent observations. Their spread and sizes stay fixed while the second mean changes. A test decision alone does not establish treatment causation.
Explanation
Use an unpaired t-test for a suitable numerical measurement from two independent samples, such as lengths of different seedlings grown under two treatments. The null hypothesis states no difference between the underlying population means. Measuring the same individuals before and after a treatment gives paired data and does not match this unpaired design.
The method used here assumes independent observations, approximately normal underlying distributions and similar population variances. For the equation supplied in the syllabus, calculate the difference between sample means and divide by the square root of (s1 squared / n1 + s2 squared / n2). Use the magnitude of t when comparing a difference in either direction with a two-sided table.
Suppose the first five lengths are 3, 4, 5, 6 and 7 cm and the second five are 7, 8, 9, 10 and 11 cm. The means are 5 and 9 cm, and both sample standard deviations are about 1.58 cm. The denominator is square root of (2.5/5 + 2.5/5) = 1 cm, so the magnitude of t is 4.
For this syllabus method, degrees of freedom are n1 + n2 - 2, giving 8. A two-sided 5% critical value is about 2.306. Since 4 is greater than 2.306, reject the no-difference null hypothesis at this level. The observed difference is statistically significant under the test assumptions.
Significance does not prove that the treatment caused the difference. Random allocation, suitable controls and representative sampling matter to that inference. Nor does significance state whether the difference is biologically large or useful. Report the direction and size of the difference alongside the test decision.
Step by step
- 1
Match the test to the design
Check numerical data, independent samples and the stated distribution/variance assumptions.
- 2
Substitute into the supplied equation
Use the two means, sample standard deviations and sample sizes; compare the magnitude of t.
- 3
Read the table and conclude
Use n1 + n2 - 2 and the chosen significance level, then describe the difference and its limits.
Worked example
Work through the evidence
Two independent samples each contain 5 seedlings. Their means are 5.0 and 5.6 cm and each sample variance is 2.5 cm2. Use a two-sided 5% critical value of 2.306.
One way to explain it
The denominator is square root of (2.5/5 + 2.5/5) = 1 cm. The magnitude of t is 0.6/1 = 0.60, with 8 degrees of freedom. Since 0.60 is below 2.306, there is insufficient evidence of different population means at 5%. This does not establish that the means are identical.
Why this answer works
- Use the variances as s squared in the supplied equation.
- Choose the correct degrees of freedom.
- A small observed difference can remain inconclusive.
Is this true? "If one sample mean is higher, the difference must be statistically significant."
The decision depends on the difference relative to variation and sample size, assessed against the relevant critical value. Unequal sample means alone are not enough.