The four tests you need: Student's t-test for one mean, the pooled two-sample t-test, the χ² goodness of fit test, and the χ² test for independence — with the decision rules, degrees of freedom and the traps that cost marks.
Read the question for two things: what kind of data you have, and how many groups.
| The situation | The test | Degrees of freedom |
|---|---|---|
| One sample of measurements; a claim about the population mean | One-sample t-test | df = n − 1 |
| Two independent samples of measurements; are the two population means different? | Two-sample (pooled) t-test | handled by technology |
| Counts in categories of one variable, compared with claimed proportions or a model | χ² goodness of fit | df = k − 1 |
| Counts cross-classified by two variables in a contingency table | χ² test for independence | df = (r − 1)(c − 1) |
Learn this once and only the middle step changes between tests.
H0 is always an equality — a specific value, no inequality signs.
The alternative carries the direction, and you choose it from the point of view of whoever wants the evidence:
| H1 | Tails | Words in the question that point to it |
|---|---|---|
| μ > μ₀ | one (upper) | increased, faster, longer, exceeds, heavier, an improvement |
| μ < μ₀ | one (lower) | reduced, quicker, lighter, under-filled, worse than |
| μ ≠ μ₀ | two | has changed, differs from, is the stated value correct? |
The same context can generate all three. If a factory claims its packets hold 500 g: the factory testing its own machine wants "has it drifted?" (two-tailed); a consumer group suspecting short measure wants μ < 500 (one-tailed); an engineer checking for overfilling wants μ > 500 (one-tailed).
One sample of measurements against a claimed population mean. The population is assumed approximately normally distributed.
The top measures how far the sample mean sits from the claim; dividing by s/√n asks whether that gap is large relative to how much the data naturally vary. A gap of 2 g means little in noisy data and a lot in tight data.
| H₁ | p-value | Why |
|---|---|---|
| μ > μ₀ | P(T ≥ t) | only large positive t supports H₁ |
| μ < μ₀ | P(T ≤ t) | only large negative t supports H₁ |
| μ ≠ μ₀ | 2 × P(T ≥ |t|) | both tails count; the curve is symmetric |
A timetable is based on a mean journey time of 24 minutes. After a bus lane opens, 45 randomly chosen journeys have mean 22.8 minutes with standard deviation 3.6 minutes. Test at the 5% level whether journeys are now quicker.
1. H₀: μ = 24 (no change), H₁: μ < 24 (quicker).
2. α = 0.05.
3. t = (22.8 − 24) ÷ (3.6/√45) ≈ −2.24, with T ~ t₄₄.
4. One-tailed, lower: p = P(T ≤ −2.24) ≈ 0.0152.
5. 0.0152 ≤ 0.05, so reject H₀.
6. There is sufficient evidence at the 5% level that mean journey time has fallen below 24 minutes.
A machine should dispense 330 ml. A sample of 25 cups has mean 327.4 ml, standard deviation 4.9 ml. Test at the 5% level whether the machine needs recalibrating.
H₀: μ = 330, H₁: μ ≠ 330; t = (327.4 − 330) ÷ (4.9/√25) ≈ −2.65, T ~ t₂₄, p = 2 × P(T ≥ 2.65) ≈ 0.0139 ≤ 0.05 → reject H₀: there is evidence the mean dispensed volume differs from 330 ml, so the machine should be recalibrated.
Two independent samples, and the question is whether the two population means differ.
18 cells of brand P last a mean 6.42 hours (s = 0.55); 20 cells of brand Q last a mean 6.91 hours (s = 0.61). Test at the 5% level the claim that brand Q lasts longer.
Let μ₁ be the mean life of brand P cells and μ₂ that of brand Q.
H₀: μ₁ = μ₂, H₁: μ₁ < μ₂; α = 0.05.
Pooled two-sample test: t ≈ −2.59, p ≈ 0.0069 ≤ 0.05 → reject H₀.
There is sufficient evidence at the 5% level that brand Q cells last longer on average than brand P.
Counts in k categories of a single variable, tested against claimed proportions — is a spinner fair, do sales match last year's split, does a model fit? ("χ" is chi, said "ki".)
Note the asymmetry: H0 pins down every proportion, but H1 only claims that somewhere the model fails. A rejected test tells you the model is wrong, not which category broke it.
Squaring makes every discrepancy positive; dividing by fexp judges each one relative to how big that category should have been — being 10 out on an expected 20 matters far more than being 10 out on an expected 500. Big disagreement gives a big χ²calc, so:
Why k − 1 degrees of freedom? The proportions must total 1, so once k − 1 of them are known the last is forced: only k − 1 values are free to vary.
A four-sector spinner is spun 120 times, landing on red 22, blue 39, green 31 and yellow 28 times. Test at the 5% level whether the spinner is fair.
H₀: p₁ = p₂ = p₃ = p₄ = ¼; H₁: at least one proportion is not ¼. Each fexp = 120 × ¼ = 30.
| Sector | fobs | fexp | fobs − fexp | (fobs − fexp)² | (fobs − fexp)² ⁄ fexp |
|---|---|---|---|---|---|
| Red | 22 | 30 | −8 | 64 | 2.133 |
| Blue | 39 | 30 | 9 | 81 | 2.700 |
| Green | 31 | 30 | 1 | 1 | 0.033 |
| Yellow | 28 | 30 | −2 | 4 | 0.133 |
| χ²calc = | 5.00 | ||||
df = 4 − 1 = 3, so p = P(χ² ≥ 5.00) ≈ 0.172 > 0.05 → do not reject H₀. There is insufficient evidence at the 5% level that the spinner is unfair.
A developer claims its app's star ratings split 30% / 25% / 25% / 12% / 8% across 5 stars down to 1 star. A sample of 200 reviews gives 46, 58, 71, 15, 10. Test the claim at the 5% level.
Expected frequencies are 200 × 0.30 = 60, then 50, 50, 24 and 16. Summing (fobs − fexp)²/fexp gives χ²calc ≈ 18.99 with df = 5 − 1 = 4, so p ≈ 0.0008 ≤ 0.05 → reject H₀: the ratings do not follow the claimed split.
A single sample cross-classified by two categorical variables in a contingency table with r rows and c columns. Are the variables related?
Independence means P(A ∩ B) = P(A) × P(B). Applying that to each cell and multiplying by the sample size collapses to a rule you can apply straight to the table:
Count r and c from the data cells only — the row and column of totals are not rows and columns of the table. The df formula comes from the same "free to vary" idea: once you fix (r − 1)(c − 1) cells, the totals force all the rest.
The test statistic is the same sum as before, and again only the upper tail is used.
200 students were asked whether they mainly revise with flashcards or with past papers:
| Year 11 | Year 12 | Year 13 | Total | |
|---|---|---|---|---|
| Flashcards | 45 | 54 | 21 | 120 |
| Past papers | 15 | 26 | 39 | 80 |
| Total | 60 | 80 | 60 | 200 |
1. H₀: revision method and year group are independent; H₁: they are not independent.
2. α = 0.05.
3. df = (2 − 1)(3 − 1) = 2.
4. Expected frequencies, e.g. top left = 120 × 60 ÷ 200 = 36:
| Year 11 | Year 12 | Year 13 | |
|---|---|---|---|
| Flashcards | 36 | 48 | 36 |
| Past papers | 24 | 32 | 24 |
All are at least 5, so the test is valid, and
χ²calc = 2.25 + 0.75 + 6.25 + 3.375 + 1.125 + 9.375 ≈ 23.1.
5. p = P(χ² ≥ 23.1) ≈ 0.00001.
6. p ≤ 0.05 → reject H₀.
7. There is strong evidence at the 5% level that revision method is associated with year group —
the table suggests a shift towards past papers in the older years.
With a 2 × 2 table, df = 1 and the ordinary χ² approximation tends to overstate the evidence. The correction shrinks each discrepancy by 0.5 before squaring:
A 2 × 2 table has observed counts 26, 14 / 24, 36, with row totals 40 and 60 and column totals 50 and 50 from 100 people. Expected frequencies are 20, 20 / 30, 30, so every discrepancy is 6.
Uncorrected: χ²calc = 4 × 36/fexp summed = 6.00.
With Yates: each (6 − 0.5)² = 30.25, giving
χ²calc ≈ 5.04 — smaller, as the correction always is.
At the 5% level with df = 1 the critical value is 3.84, and 5.04 ≥ 3.84, so H₀ is still rejected.
They are the same rule seen from opposite ends, and must always agree.
Compute the p-value from the test statistic, then compare with α.
Reject H0 if p-value ≤ α.
Needs technology, but tells you how much evidence you have, not just yes or no.
χ²crit is the value of the statistic whose p-value is exactly α. Anything beyond it has a smaller p-value.
Reject H0 if χ²calc ≥ χ²crit — the rejection inequality.
Needs only a table, and is the required route when using Yates' correction.
χ²crit depends on both the degrees of freedom and the significance level:
| df | α = 10% | α = 5% | α = 2.5% | α = 1% |
|---|---|---|---|---|
| 1 | 2.71 | 3.84 | 5.02 | 6.63 |
| 2 | 4.61 | 5.99 | 7.38 | 9.21 |
| 3 | 6.25 | 7.81 | 9.35 | 11.34 |
| 4 | 7.78 | 9.49 | 11.14 | 13.28 |
| 5 | 9.24 | 11.07 | 12.83 | 15.09 |
| 6 | 10.64 | 12.59 | 14.45 | 16.81 |
| 7 | 12.02 | 14.07 | 16.01 | 18.48 |
| 8 | 13.36 | 15.51 | 17.53 | 20.09 |
| 9 | 14.68 | 16.92 | 19.02 | 21.67 |
| 10 | 15.99 | 18.31 | 20.48 | 23.21 |
| 11 | 17.28 | 19.68 | 21.92 | 24.72 |
| 12 | 18.55 | 21.03 | 23.34 | 26.22 |
| 13 | 19.81 | 22.36 | 24.74 | 27.69 |
| 14 | 21.06 | 23.68 | 26.12 | 29.14 |
| 15 | 22.31 | 25.00 | 27.49 | 30.58 |
Upper-tail critical values of the χ² distribution, to 2 d.p. Read across from your df to the column for your significance level.
Choosing the significance level after seeing the p-value — so that the answer comes out the way you hoped — invalidates the test. The threshold is a promise made in advance.
The commonest arithmetic slip. A two-tailed p-value is twice the one-tailed one, which can flip the decision. Match the tail to H₁, and set the calculator's H₁ option accordingly.
n − 1 for a one-sample t-test, k − 1 for goodness of fit, (r − 1)(c − 1) for independence. Counting the totals row as a row is a classic error.
Any expected frequency below 5 undermines a χ² test. Say so, combine categories, recompute df, and comment that the second result is the more reliable one.
Rejecting independence says the two variables are related in this population; it says nothing about one causing the other. A lurking third variable is always a candidate.
Every test at the 5% level has a 5% chance of a false alarm when H0 is true. Run 100 such tests on unrelated questions and you should expect about 5 "significant" results from chance alone — so a single striking finding picked out of many comparisons means little until it is replicated.
"There is sufficient evidence at the 5% level to support the claim that…" followed by what that means for the buses, batteries or students in the question. A bare "reject H0" rarely earns the final mark.
A quick curve with the relevant area shaded takes seconds and catches a wrong tail, a mis-set calculator option, or a p-value that cannot possibly be right.