Chi-Squared Goodness of Fit for Uniform, Binomial and Poisson Models | Cambridge A Level Maths notes

Free preview: Chi-Squared Goodness of Fit for Uniform, Binomial and Poisson Models

Does a Model Fit the Data?

9231 Paper 4: Further Probability & Statistics

Watch: 1-minute explainer

Every time you say "goals in a match are Poisson" or "this die is fair", you are using a model. But is the model any good? Real data never match a model exactly. This note gives a test for whether the gaps are small enough to be chance.

Let's start with a die. It is rolled 120 times:

Score123456
Observed O152218261722
Expected E202020202020
  • If the die is fair, each score has probability 16, so we expect 120×16=20 of each.
  • A goodness of fit test asks whether the observed counts are close enough to the expected counts from a model.
  • H0: the model fits (the die is fair). H1: the model does not fit.
  • Same statistic as for contingency tables: X2=∑(O−E)2E, compared with the upper tail of χν2.
  • Same rule: every E must be at least 5, or merge cells.

Degrees of freedom

ν=(number of cells after merging)−1−(number of parameters estimated from the data)

  • Why −1? The expected frequencies are made to add up to the same total as the observed ones, which fixes one cell.
  • Why subtract estimated parameters? Each one makes the model bend towards the data, which costs another degree of freedom.

Diagram: These are the 5 expected frequencies for the goals example, from Po(1.91).

What the picture shows

  • These are the 5 expected frequencies for the goals example (page 2), from Po(1.91).
  • Three cells are free. The total of 100 fixes one more, and using the data to estimate λ fixes another.
  • So ν=5−1−1=3.
  • If λ is given in the question, it is not estimated, so do not subtract it: ν=4.

Method: goodness of fit

  1. Hypotheses: H0: the model fits; H1: it doesn't. Name the model.
  2. Estimate any parameter the question doesn't give.
  3. Expected frequencies E = total × model probability. Make the last cell take the whole tail.
  4. Merge any cell with E below 5.
  5. X², then ν = cells − 1 − parameters estimated.
  6. Compare with the upper critical value and conclude.

👀 Watch me do it: is the die fair? Test at 5%

What I writeWhy I do it
H0: the die is fair (discrete uniform). H1: it is notStep 1.
E = 20 for every scoreStep 3. All at least 5, so no merging.
X2=25+4+4+36+9+420=8220=4.10The squared gaps are 25, 4, 4, 36, 9, 4, all over the same E.
6 cells, nothing estimated: ν=6−1=5. χ52(0.05)=11.070Step 5.
4.10<11.070: do not reject H0No evidence at 5% that the die is biased.

Given ratios

  • A genetics model predicts types in the ratio 9 : 3 : 3 : 1. The shares add to 9+3+3+1=16. With 320 plants, E=320×916,… = 180, 60, 60, 20.
  • Observed 190, 52, 58, 20 gives X2=100180+6460+460+0=0.556+1.067+0.067+0=1.69, ν=4−1=3, below 7.815: the model fits.

✏️ YOUR TURN 1

Try this first:

A shop records 150 complaints over the 5 weekdays: Mon 38, Tue 26, Wed 24, Thu 28, Fri 34. Test at the 5% level whether complaints are equally likely on each day.

Answer:

  • E = 30 each. Squared gaps 64, 16, 36, 4, 16, total 136.
  • X2=13630=4.53.
  • ν=5−1=4, critical value 9.488.
  • 4.53<9.488: do not reject; no evidence that complaints depend on the day.

Unlock the full note: start 7 days free.

Log in or subscribe to read the rest of this note. Members also get the AI tutor, practice quizzes, mock exams and flashcards for this topic.

Log in · Subscribe · Start free trial

All notes in χ²-tests (4.3)

  1. Chi-Squared Tests for Independence in Contingency Tables
  2. Chi-Squared Goodness of Fit for Uniform, Binomial and Poisson Models
  3. Goodness of Fit for Geometric and Continuous Models

Video

What's inside for this topic

3 teacher notes, 81 practice questions, 34 flashcards, 2 quizzes.

Get the full notes, every practice question, flashcards, quizzes and mock papers.

Start your free 7-day trial

Questions? Chat with us on WhatsApp · Try one live lesson

Previous note: Chi-Squared Tests for Independence in Contingency Tables Next note: Goodness of Fit for Geometric and Continuous Models

Chi-Squared Goodness of Fit for Uniform, Binomial and Poisson Models on other exam boards

All Cambridge A Level Maths topics · A Level Maths