Internal assessment › Statistics
The t-test
When to use it
You compare two groups or conditions, you measured something on a scale (a length, mass or time), and you want to know whether the two means differ.
On the flowchart: a difference → measurements → two groups → then paired if the same individuals were measured in both conditions, unpaired if the groups are separate. Open the flowchart
Assumptions, in plain words
- Each value is independent: one value per individual. Three readings from one seedling are not three seedlings.
- The values (or, for a paired test, the differences) are roughly symmetric around the mean, with no strong skew.
- Student's unpaired version assumes both groups have a similar spread. If the SDs differ clearly, use Welch's version, which does not.
The hypotheses
- H0
- The population mean radicle length at 20 °C is the same as at 25 °C (μ1 = μ2).
- H1
- The mean radicle lengths differ (μ1 ≠ μ2).
H0 is a statement about the populations you sampled. Leave the word “significant” out of it: significance belongs to the result of the test. This card uses the two-tailed test throughout.
How to calculate it
Spreadsheet (Excel or Google Sheets): =T.TEST(range1, range2, 2, type) returns p. Use 2 tails; type 1 = paired, 2 = unpaired with equal spread (Student), 3 = unpaired with unequal spread (Welch). The critical value is =T.INV.2T(0.05, df).
By hand, with for a mean, s for a standard deviation and n for the number of values:
Worked examples
Invented data, written for teaching. Every number was checked with SciPy.
Unpaired: radicle length of seedlings of one plant variety after 72 hours
| Temperature | Radicle lengths / mm |
|---|---|
| 20 °C | 18, 22, 19, 24, 21, 17, 23, 20, 22, 19 |
| 25 °C | 26, 24, 29, 25, 27, 23, 28, 26, 30, 25 |
- Means and SDs: 1 = 20.50 mm, s1 = 2.27 mm; 2 = 26.30 mm, s2 = 2.21 mm.
- Pooled variance sp2 = (9 × 2.2732 + 9 × 2.2142) / 18 = 5.033 mm2.
- Standard error of the difference = √(5.033 × (1/10 + 1/10)) = 1.003 mm.
- t = (20.50 − 26.30) / 1.003 = −5.78; df = 10 + 10 − 2 = 18.
- Critical t (two-tailed, p = 0.05, df 18) = 2.101. |t| = 5.78 > 2.101; p = 0.000018 (p < 0.001). Welch's version gives the same t, with df 18.0, because the two SDs are almost equal.
Paired: chlorophyll content index of the youngest fully expanded leaf and the lowest green leaf of the same 8 plants
| Plant | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|
| Youngest fully expanded leaf | 32.1 | 29.8 | 35.4 | 31.0 | 33.7 | 30.2 | 34.5 | 28.9 |
| Lowest green leaf | 27.4 | 27.9 | 30.1 | 28.2 | 29.0 | 28.8 | 30.6 | 26.0 |
| d | 4.7 | 1.9 | 5.3 | 2.8 | 4.7 | 1.4 | 3.9 | 2.9 |
- Mean difference = 3.45; SD of the differences sd = 1.42; n = 8 pairs.
- t = 3.45 / (1.418 / √8) = 3.45 / 0.501 = 6.88; df = 8 − 1 = 7.
- Critical t (two-tailed, p = 0.05, df 7) = 2.365. |t| = 6.88 > 2.365; p = 0.00024.
Why pair? Plants differ from each other. Testing the differences within each plant removes that plant-to-plant variation.
How to report it: fill in the blanks
The frame is a reminder of what to include. Write the sentences yourself, in your own words, and name the software you used.
How to read the result
- p ≤ 0.05 (|t| at or above the critical value): the data give evidence that the population means differ. The test does not say why, or whether the difference matters biologically, so give the difference in means and its spread too.
- p > 0.05: this sample does not give significant evidence of a difference. That is not proof that the means are equal; with few repeats a test has little power, so say so in your evaluation.
- 0.05 is the significance level you chose. The critical value is the value of t that marks it for your df.
The graph that goes with it
Common mistakes
- Deciding from overlapping or separate error bars alone. Bars are a hint; the test is the test.
- Running several t-tests to compare three or more groups. That raises the chance of a false positive; three or more groups need a different test (ANOVA).
- Treating repeat readings from one individual as separate individuals.
- “H0: there is no significant difference.” Leave “significant” out of the hypothesis.
- A paired test on separate groups, or an unpaired test on paired data.
- Writing p = 0.000. Write p < 0.001.
Named in the guide?
Yes: Tool 3 asks students to apply the t-test p. 31, Tool 3: Mathematics, and the IA asks for processing with uncertainties considered p. 122, Data analysis. The guide does not split paired from unpaired or mention Welch's version: those are standard statistics we add so you pick the right one.