Student's t test
The t test checks whether a difference between means is real or just chance. It suits small samples (under 30) when the population SD is unknown.
Three types of t test
| Type | When to use it | Nutrition example | Degrees of freedom |
|---|---|---|---|
| One-sample | Compare one sample mean with a standard or known value | Is the mean iron intake of 15 girls different from the RDA? | n − 1 |
| Independent (unpaired) | Compare the means of two separate groups | Hb of 12 vegetarian and 10 non-vegetarian students | n1 + n2 − 2 |
| Paired | Compare two readings on the same people, such as before and after | Weight of 6 women before and after a diet plan | n − 1 (n = number of pairs) |
Formulas
Steps in a t test
- 1State the hypothesesH0 (null): no real difference between the means. H1 (alternative): there is a difference.
- 2Fix the level of significanceUsually 5% (0.05); two-tailed unless a direction is stated
- 3Calculate tUse the formula for the right type of t test
- 4Find the degrees of freedomn − 1 (one-sample, paired) or n1 + n2 − 2 (independent)
- 5Read the table valueFrom the t table at that df and the 5% level
- 6Compare and decideCalculated |t| > table t: reject H0, the difference is significant. Otherwise accept (do not reject) H0.
- 7Conclude in wordsSay what the result means for the group or diet studied
Example: paired t test on a diet plan
Body weight (kg) of 6 women before and after an 8-week low-calorie diet. Before: 72, 68, 80, 75, 66, 79. After: 69, 66, 76, 74, 63, 74. Is the change significant at the 5% level?
- H0: the mean change in weight = 0. H1: the mean change ≠ 0 (two-tailed test, 5% level).
- Differences d = before − after: 3, 2, 4, 1, 3, 5. Σd = 18, so d̄ = 18 ÷ 6 = 3 kg.
- d − d̄: 0, −1, 1, −2, 0, 2. Squares: 0, 1, 1, 4, 0, 4. Σ(d − d̄)² = 10.
- s_d = √[10 ÷ (6 − 1)] = √2 = 1.4142 kg.
- Standard error = s_d ÷ √n = 1.4142 ÷ 2.4495 = 0.5774.
- t = d̄ ÷ SE = 3 ÷ 0.5774 = 5.196, which is 5.20 rounded to 2 decimals. (Rounding SE to 0.58 too early gives 5.17; the decision is the same.)
- df = n − 1 = 6 − 1 = 5. Table t at 5% (two-tailed) for df 5 = 2.571.
- 5.20 > 2.571, so H0 is rejected.
t = 5.20 with df 5, which is greater than the table value 2.571. The mean weight loss of 3 kg is significant at the 5% level.
The t test is the commonest test in student nutrition projects: scores before and after a nutrition education class (paired), two groups such as hostel students and day scholars (independent), or a group's mean intake against the RDA (one-sample). A significant t means the difference is unlikely to be due to chance alone.
2 marks: “What are degrees of freedom?” The number of values that are free to vary once a restriction, such as a fixed mean, is placed on the data. For a one-sample or paired t test, df = n − 1.
5 marks: “16 girls have a mean protein intake of 52 g with sample SD (s, dividing by n − 1) of 4 g. Test whether this differs from 50 g at the 5% level.” t = (52 − 50) ÷ (4 ÷ √16) = 2 ÷ 1 = 2.00. df = 15; table t (5%, two-tailed) = 2.131. 2.00 < 2.131, so H0 is accepted: the difference is not significant. If the SD given divides by n, use t = (x̄ − μ)√(n − 1) ÷ σ = 1.94; still < 2.131, not significant.
10 marks: “Explain Student's t test, its types and steps, with an example.” Define the t test and its assumptions, give the three types with formulas and df, list the steps, solve a paired example and state the decision rule.
Calculated beats table = significant. If your |t| is bigger than the table t, reject H0.