Hypothesis Testing Framework
A hypothesis test uses sample data to assess a claim about a population parameter. Cambridge 9231 tests inference about population means. Every test follows the same six-step structure.
H₀ always contains equality: H₀: μ = μ₀.
H₁ determines the tail: one-tailed (μ > μ₀ or μ < μ₀) or two-tailed (μ ≠ μ₀).
Common values: α = 0.05 (5%) or α = 0.01 (1%). Cambridge states α in the question.
z = (x̄ − μ₀) / (σ/√n) when σ is known.
t = (x̄ − μ₀) / (s/√n) when σ is unknown (use sample sd s), with ν = n−1 degrees of freedom.
For z-test: z_α (one-tail) or z_{α/2} (two-tail) from N(0,1) tables.
For t-test: t_{α, ν} from t-tables with ν = n−1 degrees of freedom.
Cambridge MF19 provides both tables.
|test stat| < critical value → fail to reject H₀
|test stat| ≥ critical value → reject H₀
Alternatively, compare p-value with α: reject H₀ if p-value < α.
Example: "There is sufficient evidence at the 5% level to conclude that the mean weight has increased."
⚠ Cambridge requires a contextualised conclusion — always reference the original scenario.
Type I and Type II Errors
The power of a test = P(reject H₀ | H₁ is true) = 1 − β. A more powerful test is better at detecting a real effect. Power increases with larger sample size, larger significance level, or larger true difference from H₀.
z-test — σ² Known
Use the z-test when the population variance σ² is known (stated in the question), regardless of sample size. The test statistic follows N(0,1) under H₀.
Critical Values from N(0,1)
| Alternative Hypothesis H₁ | Tail Type | Critical Region (α = 5%) | Critical Region (α = 1%) |
|---|---|---|---|
| μ > μ₀ | Right tail | z > 1.645 | z > 2.326 |
| μ < μ₀ | Left tail | z < −1.645 | z < −2.326 |
| μ ≠ μ₀ | Two tails | |z| > 1.960 | |z| > 2.576 |
If n ≥ 30 and σ is unknown, you may use the sample standard deviation s as an approximation for σ and proceed with the z-test. Cambridge will either state σ directly, or tell you n is large enough. If neither is stated, use the t-test.
Student's t-distribution
When σ² is unknown, we estimate it from the sample using the unbiased sample variance s². The standardised sample mean then follows a t-distribution rather than N(0,1).
Properties of the t-distribution
- The population is normally distributed (or n is large enough by CLT).
- The observations are independent — a simple random sample.
- The population variance σ² is unknown — otherwise use z-test.
Reading the t-table (MF19)
Cambridge's MF19 gives critical values for the t-distribution. The table is organised by degrees of freedom ν and by the probability in one or both tails. Common critical values:
| ν (d.f.) | t at 5% (one-tail) / 10% (two-tail) | t at 2.5% (one-tail) / 5% (two-tail) | t at 1% (one-tail) / 2% (two-tail) | t at 0.5% (one-tail) / 1% (two-tail) |
|---|---|---|---|---|
| 5 | 2.015 | 2.571 | 3.365 | 4.032 |
| 10 | 1.812 | 2.228 | 2.764 | 3.169 |
| 15 | 1.753 | 2.131 | 2.602 | 2.947 |
| 20 | 1.725 | 2.086 | 2.528 | 2.845 |
| 30 | 1.697 | 2.042 | 2.457 | 2.750 |
| ∞ | 1.645 | 1.960 | 2.326 | 2.576 |
One-Sample t-test
Use the t-test when testing a hypothesis about a population mean and the population variance is unknown. Estimate σ² from the sample using s².
Cambridge often provides Σx and Σx² — use these directly.
s² = (601.44 − 12 × 7.05²) / 11 = (601.44 − 596.07) / 11 = 5.37/11 = 0.4882
s = 0.6987
Confidence Intervals
A confidence interval (CI) gives a range of plausible values for the population parameter μ based on the sample data. A 95% CI means: if the procedure were repeated many times, 95% of the intervals constructed would contain the true μ.
Interpreting a Confidence Interval
Wrong: "There is a 95% probability that μ lies in this interval."
Right: "We are 95% confident that this interval contains the true population mean μ." The interval is random (computed from data), not the parameter. Once computed, μ either is or is not in it — there is no probability about it.
Link Between CI and Hypothesis Test
A two-tailed test at level α is equivalent to checking whether μ₀ lies inside the (1−α)×100% confidence interval. If μ₀ is inside the CI → fail to reject H₀. If μ₀ is outside the CI → reject H₀. Cambridge sometimes asks you to use a CI to draw a conclusion about a test.
Two-Sample Tests
When comparing the means of two independent populations, the test statistic depends on whether the variances are known, unknown but equal, or unknown and unequal.
Which Test to Use — Decision Guide
| Situation | Variances | Test Statistic | Distribution |
|---|---|---|---|
| Two independent samples, σ₁², σ₂² known | Known | z = (x̄₁−x̄₂) / √(σ₁²/n₁ + σ₂²/n₂) | N(0,1) |
| Two independent samples, σ₁² = σ₂² = σ² unknown | Equal, unknown | t = (x̄₁−x̄₂) / (sₚ√(1/n₁+1/n₂)) | t(n₁+n₂−2) |
| Paired data (differences dᵢ = xᵢ−yᵢ) | — | t = d̄ / (sᵈ/√n) | t(n−1) |
Pooled Variance — Equal Variances Case
- Paired data: Each observation in sample 1 is matched with a specific observation in sample 2 (e.g. before/after measurements on the same subject). Compute dᵢ = xᵢ − yᵢ and apply a one-sample t-test on the differences.
- Two independent samples: No natural pairing between observations. Use the two-sample t-test with pooled variance (if equal variances assumed).
- Cambridge will specify which applies — look for keywords: "matched pairs", "same subject", "before and after" → paired. "Two groups", "randomly selected from two populations" → two-sample.
Before: 148, 152, 145, 160, 155, 143
After: 142, 148, 140, 152, 151, 138
Test at 1% whether the treatment reduces blood pressure.
d̄ = 32/6 = 5.333
sᵈ² = (182 − 6×5.333²)/5 = (182−170.667)/5 = 2.267 sᵈ = 1.506
Worked Examples
CI: 15.8 ± 2.093×0.559 = 15.8 ± 1.170
(a) n=8, σ known, population normal. (b) n=8, σ unknown, population normal.
(c) n=60, σ unknown. (d) n=8, σ unknown, population unknown shape.
Practice Questions
z = (10.18−10)/(0.4/√25) = 0.18/0.08 = 2.25
Critical value: z_{0.01} = 2.326
2.25 < 2.326 → Fail to reject H₀
s² = (190.44 − 10×18.6624)/9 = (190.44−186.624)/9 = 3.816/9 = 0.424
s = 0.651
H₀: μ=4.5, H₁: μ≠4.5, α=0.05
t = (4.32−4.5)/(0.651/√10) = −0.18/0.206 = −0.874
ν=9, two-tailed 5%: t_{0.025,9} = 2.262
|−0.874| < 2.262 → Fail to reject H₀
(i) Construct a 99% confidence interval for the population mean.
(ii) Comment on whether μ = 30 is consistent with the data.
CI: 34.5 ± 3.499×1.485 = 34.5 ± 5.196
(ii) μ=30 lies inside the CI (29.3 < 30 < 39.7). Therefore μ=30 is consistent with the data at the 1% significance level (two-tailed). We cannot reject H₀: μ=30 at this level.
Before: 42, 38, 45, 50, 37, 44, 41
After: 45, 40, 49, 54, 38, 46, 45
Test at 5% whether the fertiliser increases yield.
Σd²=9+4+16+16+1+4+16=66
sᵈ²=(66−7×2.857²)/6=(66−57.143)/6=8.857/6=1.476, sᵈ=1.215
H₀: μᵈ=0, H₁: μᵈ>0 (fertiliser increases yield), α=0.05
t = 2.857/(1.215/√7) = 2.857/0.459 = 6.22
ν=6, one-tailed 5%: t_{0.05,6} = 1.943
6.22 > 1.943 → Reject H₀
Interactive Hypothesis Test Calculator
Enter your sample data and test parameters. The tool computes the test statistic, critical value, and decision — with full working shown.
Formula Sheet — Inference
- Always state H₀ and H₁ explicitly using μ notation (not words). Cambridge awards B1 for this even if the rest is wrong.
- z vs t decision: σ known → z. σ unknown + normality → t. Large n + σ unknown → z approximately. Small n + σ unknown + non-normal → state limitation.
- s² calculation: Use (Σx² − nx̄²)/(n−1) from given Σx and Σx². Never use n in the denominator — that gives biased variance.
- Degrees of freedom: One-sample: ν=n−1. Two-sample (pooled): ν=n₁+n₂−2. Paired: ν=n−1 (number of pairs minus 1).
- Conclusion wording: Say "sufficient/insufficient evidence at the X% level to conclude that [context statement]." Never just say "reject H₀" — always interpret in context.
- CI and test duality: If asked to test using a CI, check whether μ₀ lies inside or outside. State this explicitly as your decision criterion.