Home / A-Level Further Maths 9231 / Topic 4.3 / Revision notes
Download PDFQuestion bank →Topic 4.3 lessons

Chi-squared tests

A-Level Further Maths 9231 · Topic 4.3 revision notes

Everything from the 2 lessons of this topic on a few pages: the key idea of each lesson, the diagram to remember, the points to learn and the traps examiners set. Read it, cover it, test yourself.

  1. Chi-squared goodness of fit
  2. Contingency tables and independence

1Chi-squared goodness of fit

Syllabus 4.3

Under \(\text{H}_0\) (the model fits) find each expected frequency \(E = N \times P(\text{class})\). Combine neighbouring classes until every \(E \ge 5\). Then \(\chi^{2} = \displaystyle\sum \frac{(O - E)^{2}}{E} = \sum \frac{O^{2}}{E} - N\), with degrees of freedom \(\nu = k - 1 - m\), where \(k\) is the number of classes AFTER combining and \(m\) is the number of parameters estimated from the data. Reject \(\text{H}_0\) only when \(\chi^{2}\) exceeds the upper critical value: the test is always upper-tailed.

0 2 4 6 8 10 12 14 16 0.05 0.10 0.15 9.488 reject H₀: area 0.05 do not reject H₀: area 0.95 χ² with 4 degrees of freedom x f(x)
Fig. 1: the chi-squared distribution with 4 degrees of freedom. The shaded upper tail beyond 9.488 has area 0.05: a value of the test statistic there is significant at the 5% level

Worked example: Is the dice fair?

A dice is thrown 120 times. The scores 1 to 6 occur 15, 25, 18, 22, 14 and 26 times. Test at the 5% level whether the dice is fair.
  1. \(\text{H}_0\): the dice is fair (each score has probability \(\frac{1}{6}\)). \(\text{H}_1\): the dice is not fair.
  2. Each \(E = \dfrac{120}{6} = 20\), all at least 5.
  3. \[\chi^{2} = \frac{25 + 25 + 4 + 4 + 36 + 36}{20} = \frac{130}{20} = 6.5\]
  4. \(\nu = 6 - 1 = 5\); the 5% critical value is 11.07.
  5. \(6.5 < 11.07\), so do not reject \(\text{H}_0\).
Answer: There is insufficient evidence at the 5% level that the dice is not fair

Hypotheses, expected, combine, compare.

  • State \(\text{H}_0\) (the model, with any given parameters) and \(\text{H}_1\) (it does not fit).
  • Estimate any parameter not given: \(\lambda = \bar{x}\), \(p = \bar{x}/n\).
  • Expected \(E = N \times P(\text{class})\), with an 'or more' last class; combine until every \(E \ge 5\).
  • Compute \(\chi^{2} = \sum \dfrac{(O - E)^{2}}{E}\) (or \(\sum \dfrac{O^{2}}{E} - N\)) and \(\nu = k - 1 - m\).
  • Conclude in context: 'sufficient (or insufficient) evidence at the 5% level that ...', and name a cell that dominates.

Watch out!

Divide by \(E\), not by \(O\), and never add up \(O - E\) on its own: those differences always total 0. A small \(\chi^{2}\) does not PROVE the model; it only means the data give no evidence against it.

Count \(k\) AFTER combining and subtract one for every parameter you estimated. In the Poisson example the six values became five classes, and estimating \(\lambda\) took another degree of freedom away: \(\nu = 3\), not 5.

If \(\mu\) and \(\sigma\) had been estimated from the same 200 heights, \(\nu\) would be \(4 - 1 - 2 = 1\). And an extreme cell explains WHY a model fails; it does not let you drop that cell and test again.

2Contingency tables and independence

Syllabus 4.3

H0: the two classifications are independent; H1: they are not independent (there is an association). Expected frequency \(E = \dfrac{\text{row total} \times \text{column total}}{\text{grand total}}\). Combine adjacent rows or columns until every \(E \ge 5\), then \(X^{2} = \sum \dfrac{(O - E)^{2}}{E}\) is compared with \(\chi^{2}_{\nu}\) where \(\nu = (r - 1)(c - 1)\) for the table you actually use. Reject H0 if \(X^{2}\) exceeds the critical value.

Gym Running Swimming Total Under 30 30 and over Total 30 18 12 60 14 22 24 60 44 40 36 120 E = 60 × 44 ÷ 120 = 22 row total × column total ÷ grand total
Fig. 1: 120 adults classified by age group and favourite exercise. If the two are independent, the expected number of under-30s who prefer the gym is 60 x 44 / 120 = 22; 30 were observed

Worked example: Every expected frequency

Find the expected frequencies for the exercise table above, assuming H0 is true.
  1. Under 30, gym: \(\dfrac{60 \times 44}{120} = 22\). Under 30, running: \(\dfrac{60 \times 40}{120} = 20\). Under 30, swimming: \(\dfrac{60 \times 36}{120} = 18\).
  2. The row totals are equal (60 and 60), so the 30 and over row has the same expected frequencies: 22, 20, 18.
  3. Check: each expected row adds to 60 and each expected column adds to its observed total (44, 40, 36).
Answer: 22, 20, 18 in each row

Totals first, then \(E\), then \(X^{2}\).

  • Hypotheses in context: H0 the two classifications are independent; H1 they are not.
  • Expected frequencies: \(E = \dfrac{\text{row total} \times \text{column total}}{\text{grand total}}\), not rounded.
  • Combine adjacent rows or columns until every \(E \ge 5\), and recompute.
  • Degrees of freedom \(\nu = (r - 1)(c - 1)\) for the table actually used.
  • Compare \(X^{2} = \sum (O - E)^{2}/E\) with the critical value; conclude in context without claiming proof, then comment on the largest contributions.

Watch out!

Do not round expected frequencies to whole numbers. They are averages, not counts: 2.52 and 14.4 are correct values. Rounding them changes every contribution and can change the conclusion.

Rejecting H0 shows an association, not a cause: the test cannot say that flashcards MADE students pass. Equally, not rejecting H0 never proves independence; write 'there is insufficient evidence of an association'.

Combine on EXPECTED frequencies, not observed ones: the '6+' column has observed 5 in one row, but its expected frequency 2.52 is what matters. And after combining, \(\nu\) comes from the new table: \((3 - 1)(3 - 1) = 4\), not the original 6.

Back to A-Level Further Maths 9231 contents · (c) 2026 TheLucidSTEM · thelucidstem.com