Chi-Squared Goodness of Fit for Uniform, Binomial and Poisson Models | Applications and Interpretation IB Maths notes

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

Does a Model Fit the Data?

Applications and interpretation: SL and HL (SL 4.11). Estimating parameters is HL (AHL 4.12), and the Poisson model is HL (AHL 4.17)

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, or check if the GDC's p-value is below the significance level, 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.

📝 On your GDC: χ² goodness of fit

  1. Put the observed frequencies in list 1 and the expected frequencies in list 2. Same order, same number of cells.
  2. Choose your GDC's χ² goodness of fit tool, with list 1 as observed and list 2 as expected.
  3. Enter the degrees of freedom yourself: here df = 5. The GDC does not know whether you estimated a parameter, so this is the easiest place to go wrong.
  4. The screen gives χ² = 4.1 and p = 0.535. Write down χcalc2=4.10 and p-value = 0.535 (3 s.f.).
  5. 0.535>0.05: do not reject H0. Same decision as with the critical value.

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 (GDC p-value 0.639): the model fits.

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 Hypothesis testing (SL 4.11)

  1. The Language of Hypothesis Testing
  2. Chi-Squared Tests for Independence in Contingency Tables
  3. Chi-Squared Goodness of Fit for Uniform, Binomial and Poisson Models
  4. The Two-Sample t-Test on Your GDC

Video

What's inside for this topic

4 teacher notes, 65 practice questions, 33 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: The Two-Sample t-Test on Your GDC

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

All Applications and Interpretation IB Maths topics · IB Maths