Salam Academy
Contents · 0% complete
  1. Learning objectives
  2. Core idea
  3. Key formulae
  4. Worked examples
  5. Explore the graph
  6. Common mistakes
  7. Exam tip
  8. Guided practice
  9. Practice questions
  10. Challenge
  11. Summary
  12. Quick quiz
  13. Same topic, different board
  14. Past paper questions
Learn9FM0Option · Further Statistics 1Chi-squared testsGoodness of fit and contingency tables
Chi-squared tests · Subtopic 1 of 1

Chi-squared Tests

Compare observed frequencies OO with those expected under H0H_0, EE, using X2=∑(O−E)2EX^2=\sum\frac{(O-E)^2}E. Large values mean poor fit. Compare with χν2\chi^2_\nu where ν=\nu= number of classes −1−-1- parameters estimated, or (r−1)(c−1)(r-1)(c-1) for a contingency table. Expected frequencies should be at least 55.

Cambridge 9231 Paper 4Edexcel YMA01 WST03Edexcel 9FM0 OptionAQA 7367 Paper 3≈ 50 minRevision 1 · updated 2026-10-27
Practise this topicTimed testAsk Salam Tutor
Section 1 of 14

Learning objectives

  • Calculate expected frequencies and the χ2\chi^2 statistic.
  • Find degrees of freedom and use χ2\chi^2 tables.
  • Carry out goodness-of-fit and contingency-table tests.
Pause and think

A die gives sixes 14 times in 60 rolls instead of 10. Biased?

Section 2 of 14

Core idea

Start hereIs the die loaded?

Roll a die 60 times and you won't get exactly ten of each face. Some wobble is just chance. A chi-squared test adds up all the mismatches between what you saw and what a fair die should give, and asks whether the total is too big to blame on luck.

The big idea

X2=∑(O−E)2EX^2=\sum\frac{(O-E)^2}E measures total mismatch. Under H0H_0 it approximately follows χν2\chi^2_\nu. Large X2X^2 means poor fit, so the test is upper-tailed.

1. Goodness of fit

Worked exampleFair die

60 rolls: 8,12,9,11,6,148,12,9,11,6,14. Test at 5% whether the die is fair.

Goal
Decision.
Strategy
H0H_0: fair, E=10E=10 each.
  1. O−E: −2,2,−1,1,−4,4O-E:\ -2,2,-1,1,-4,4
    Differences.
  2. X2=4+4+1+1+16+1610=4.2X^2=\frac{4+4+1+1+16+16}{10}=4.2
    Sum of (O−E)2E\frac{(O-E)^2}E.
  3. ν=6−1=5\nu=6-1=5
    Six classes, total fixed.
  4. χ52(5%)=11.07\chi^2_5(5\%)=11.07
    Critical value.
Answer4.2<11.074.2<11.07: insufficient evidence that the die is biased.
✓ CheckMean of χ52\chi^2_5 is 55; 4.24.2 is typical ✓.
Counting degrees of freedom
  1. k classesk\text{ classes}
    Start with the number of cells after combining.
  2. −1-1
    Expected totals are forced to match the observed total.
  3. −m-m
    Subtract one for each parameter estimated from the data (e.g. λ\lambda, or μ\mu and σ\sigma).
ν=k−1−m\nu=k-1-m.

2. Contingency tables

Eij=RiCjN,ν=(r−1)(c−1)E_{ij}=\frac{R_iC_j}{N},\quad\nu=(r-1)(c-1)
where
Ri,CjR_i,C_j
row and column totals.
Worked exampleExpected frequency

N=100N=100, row totals 40,6040,60, column totals 30,50,2030,50,20. Find EE for row 1, column 2, and ν\nu.

Goal
E12E_{12}, ν\nu.
Strategy
Independence: P(row 1 and col 2)=40100⋅50100P(\text{row 1 and col 2})=\frac{40}{100}\cdot\frac{50}{100}.
  1. E12=100×0.4×0.5E_{12}=100\times0.4\times0.5
    Expected under independence.
  2. =20=20
    Same as 40×50100\frac{40\times50}{100}.
  3. ν=(2−1)(3−1)=2\nu=(2-1)(3-1)=2
    Free cells once totals are fixed.
AnswerE12=20E_{12}=20, ν=2\nu=2.
✓ CheckRow 1 expected: 12+20+8=4012+20+8=40 ✓.
χ² test procedure

The same steps every time.

Common misconceptionHypotheses for tables H0H_0: the two factors are independent. H1H_1: they are not independent. Avoid "related" without saying how.
Edge case2×2 tables With ν=1\nu=1, AQA uses Yates' correction: ∑(∣O−E∣−0.5)2E\sum\frac{(|O-E|-0.5)^2}E.
Pause and think

Why is a very small X2X^2 suspicious?

Summary

  • X2=∑(O−E)2EX^2=\sum\frac{(O-E)^2}E.
  • ν=k−1−m\nu=k-1-m or (r−1)(c−1)(r-1)(c-1).
  • Combine so E≥5E\ge5.
  • Reject for large X2X^2.
Key words
Goodness of fit
How well data match a model.
Contingency table
Two-way frequency table.
Degrees of freedom
Number of independent cells.
HistoryKarl Pearson. Pearson introduced the χ2\chi^2 test in 1900, one of the first formal significance tests. Fisher later corrected his degrees of freedom.
Fun factMendel’s peas. Fisher used χ2\chi^2 to show Mendel's pea data fitted his theory almost too well, suggesting the results had been tidied.
Section 3 of 14

Key formulae

StatisticX2=∑(O−E)2E=∑O2E−NX^2=\sum\frac{(O-E)^2}{E}=\sum\frac{O^2}E-N
Goodness of fitν=k−1−(parameters estimated)\nu=k-1-(\text{parameters estimated})
ContingencyE=row total×column totalN,ν=(r−1)(c−1)E=\frac{\text{row total}\times\text{column total}}{N},\quad\nu=(r-1)(c-1)
TrickCombine small classes. If any E<5E<5, merge it with a neighbour before calculating, and reduce kk accordingly.
Section 4 of 14

Worked examples

Example 1 · Fair die0 / 3 steps
60 rolls: 8,12,9,11,6,148,12,9,11,6,14. Test fairness at 5%.
    Example 2 · Contingency0 / 2 steps
    A 2×32\times3 table with row totals 40, 60 and column totals 30, 50, 20. Find EE for row 1, column 2 and ν\nu.
      Section 5 of 14

      Explore the graph

      χ² distributions
      Loading the interactive graph…
      Try this
      1. The curve is χ52\chi^2_5; its mean is 55, its degrees of freedom.
      2. The line marks a critical value: the area to its right is the significance level.

      Reject H0H_0 when X2X^2 lands in the right tail.

      In the real worldMedical trials. Contingency tables test whether recovery depends on treatment: rows are treatments, columns outcomes.
      Section 6 of 14

      Common mistakes

      IncorrectUsing percentages
      CorrectUse frequencies
      χ2\chi^2 depends on the counts.
      IncorrectForgetting estimated parameters
      CorrectSubtract one ν\nu per parameter
      Estimating λ\lambda from the data makes the fit easier.
      IncorrectTwo-tailed test
      CorrectUpper tail only
      Only poor fit (large X2X^2) counts against H0H_0.

      Observed ≈ expected

      χ²: small. H₀: survives another day.

      Section 7 of 14

      Exam tip

      Exam tipContext conclusions. End with words: "there is insufficient evidence that the die is biased", not just "accept H0H_0".
      Section 8 of 14

      Guided practice

      SA-ST-CS-G012 marksL2 StandardCalculatorStatistic
      A die is rolled 60 times giving 8,12,9,11,6,148,12,9,11,6,14. Find X2X^2 for a test of fairness.

      Sign in or create a free account to check answers, get hints and track your progress.

      Salam Academy Original Practice · Proposed mark scheme
      Section 9 of 14

      Practice questions

      SA-ST-CS-0011 markL1 FoundationNon-calculatorStatistic
      How many degrees of freedom does the die test have?

      Sign in or create a free account to check answers, get hints and track your progress.

      Salam Academy Original Practice · Proposed mark scheme
      SA-ST-CS-0022 marksL2 StandardNon-calculatorContingency
      In a contingency table with N=100N=100, a cell's row total is 40 and column total is 50. Find its expected frequency.

      Sign in or create a free account to check answers, get hints and track your progress.

      Salam Academy Original Practice · Proposed mark scheme
      SA-ST-CS-0031 markL1 FoundationNon-calculatorContingency
      Find the degrees of freedom for a 3×43\times4 contingency table.

      Sign in or create a free account to check answers, get hints and track your progress.

      Salam Academy Original Practice · Proposed mark scheme
      SA-ST-CS-0042 marksL2 StandardNon-calculatorGoodness of fit
      Data in 7 classes (after combining) are tested for fit to a Poisson distribution whose mean is estimated from the data. Find ν\nu.

      Sign in or create a free account to check answers, get hints and track your progress.

      Salam Academy Original Practice · Proposed mark scheme

      More questions on every skill in this subtopic are in the question bank under Practise.

      Section 10 of 14

      Challenge

      SA-ST-CS-0053 marksL3 ExamCalculatorGoodness of fit
      200 people are classified by blood group: O 82, A 78, B 30, AB 10. Theory gives proportions 0.45,0.40,0.10,0.050.45, 0.40, 0.10, 0.05. Find X2X^2 (3 s.f.).

      Sign in or create a free account to check answers, get hints and track your progress.

      Salam Academy Original Practice · Proposed mark scheme
      Section 11 of 14

      Summary

      • X2=∑(O−E)2EX^2=\sum\frac{(O-E)^2}E.
      • ν\nu: classes −1−-1- parameters, or (r−1)(c−1)(r-1)(c-1).
      • E≥5E\ge5: combine.
      • Upper-tail test.
      Section 12 of 14

      Quick quiz

      Q1 · SA-ST-CS-Q011 markL1 FoundationNon-calculatorStatistic
      If an expected frequency is below 5 you should
      Choose one option

      Sign in or create a free account to check answers, get hints and track your progress.

      Salam Academy Original Practice · Proposed mark scheme
      Section 13 of 14

      Same topic, different board

      Specification
      A level Further Mathematics 9FM0
      Where
      Further Statistics 1 · Chi-squared tests
      Expected
      Goodness of fit for discrete and continuous distributions, contingency tables, degrees of freedom, Yates not required.
      Calculator
      Permitted; show enough working to earn the method marks.
      Typical style
      Edexcel often opens with a routine part and builds to a "show that" or "prove" part.
      Open in
      YMA01 · WST039FM0 · Option
      Section 14 of 14

      Past paper questions

      No past paper questions are tagged to this subtopic yet. We add papers every week.

      Browse past papers

      Salam Academy original content · Content status: reviewed and published. Syllabus mapping: Pearson Edexcel 9FM0, First teaching 2017 (official specification).