All subjects · Mathematics · WST03 Statistics 3
Goodness of fit: the chi-squared statistic
Edexcel IAL Mathematics · WST03 Statistics 3
A goodness of fit test asks whether observed frequencies are consistent with a proposed model. The statistic Σ(O - E)2/E measures how far the observations are from what the model predicts.
Hypotheses and statistic
- H0: the model fits (for example 'the die is fair', 'the data can be modelled by a Poisson distribution').
- H1: the model does not fit.
Compute expected frequencies E from the model (total × probability) and
X2 = Σ (O - E)2 / E, which is approximately χ2 with ν degrees of freedom when H0 is true. An equivalent form is X2 = Σ O2/E - N.
Hypotheses must name the model: examiners do not accept 'the claim is correct' on its own.
| Score | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| Observed | 16 | 25 | 17 | 23 | 14 | 25 |
| Expected | 20 | 20 | 20 | 20 | 20 | 20 |
120 throws of a die
Degrees of freedom and critical values
ν = number of cells - 1 - number of parameters estimated from the data. The 1 is for the total, which the expected frequencies are forced to match.
The test is always upper-tailed: large X2 means poor fit. Reject H0 if X2 > the critical value χ2_ν(α) from the table.
| ν | 10% | 5% | 2.5% | 1% |
|---|---|---|---|---|
| 1 | 2.705 | 3.841 | 5.024 | 6.635 |
| 2 | 4.605 | 5.991 | 7.378 | 9.210 |
| 3 | 6.251 | 7.815 | 9.348 | 11.345 |
| 4 | 7.779 | 9.488 | 11.143 | 13.277 |
| 5 | 9.236 | 11.070 | 12.832 | 15.086 |
| 6 | 10.645 | 12.592 | 14.449 | 16.812 |
Upper percentage points of χ2 (Pearson tables)
Expected frequencies at least 5
The χ2 approximation is poor if any expected frequency is less than 5. Then combine adjacent cells (adding O and E) before calculating X2, and count cells after combining when finding ν. Yates' correction is not used in S3.
Example: a fair die
120 throws, E = 20 each. X2 = (16 + 25 + 9 + 9 + 36 + 25)/20 = 6. ν = 6 - 1 = 5, critical value at 5% = 11.070. 6 < 11.070, so do not reject H0: there is no evidence that the die is biased.
Worked example
A shop believes sales of three sizes are in the ratio 3 : 2 : 1. In 240 sales the counts are 131, 70 and 39. Test at the 5% level.
- H0: sales are in the ratio 3 : 2 : 1. H1: they are not.
- E = 120, 80, 40.
- X2 = 112/120 + 102/80 + 12/40 = 2.2833
- ν = 3 - 1 = 2; critical value 5.991; 2.283 < 5.991.
Answer: Do not reject H0: the sales are consistent with the ratio 3 : 2 : 1.
Check yourself
- A die is thrown 120 times with observed frequencies 16, 25, 17, 23, 14, 25 for scores 1 to 6. Calculate X2 for the hypothesis that the die is fair.
Show answer
6. E = 20 each; Σ(O - E)2 = 120; X2 = 120/20 = 6.
- In the die test, how many degrees of freedom are there?
Show answer
5. 6 cells, minus 1 for the total, no parameters estimated: ν = 5.
- Find the 5% critical value of χ2 with 5 degrees of freedom. Give your answer to 3 decimal places.
Show answer
11.070. From the table: 11.070.
- Sales of three sizes are believed to be in the ratio 3 : 2 : 1. In 240 sales the counts are 131, 70 and 39. Calculate X2. Give your answer to 3 significant figures.
Show answer
2.28. E = 120, 80, 40; X2 = 2.2833.
- Observed frequencies 30, 50, 20 have expected frequencies 25, 50, 25. Calculate X2 using ΣO2/E - N.
Show answer
2. 36 + 50 + 16 - 100 = 2.
- The die test gives X2 = 6 with critical value 11.070. Which conclusion is correct?
- Reject H0: the die is biased
- Do not reject H0: there is no evidence that the die is biased
- Do not reject H0: the die is proved to be fair
- Reject H0, because X2 is positive
Show answer
Do not reject H0: there is no evidence that the die is biased. 6 < 11.070, so the fit is acceptable. A test never proves H0.
- Expected frequencies in a goodness of fit test are 18.2, 12.6, 6.1, 2.4 and 0.7. What should you do before calculating X2?
- Delete the cells with E < 5
- Use Yates' correction
- Multiply the small expected frequencies by 5
- Combine the last three cells, so every expected frequency is at least 5
Show answer
Combine the last three cells, so every expected frequency is at least 5. 6.1 + 2.4 + 0.7 = 9.2 ≥ 5 (combining only the last two gives 3.1). The observed frequencies are combined in the same way.
Sources
- Pearson Edexcel International Advanced Level in Mathematics specification (issue 3), Unit S3
- Pearson Edexcel IAL Statistics S3 (WST03) mark scheme, June 2024
- Pearson Edexcel IAL Statistics S3 (WST03) examiners' report, June 2025
- Pearson Edexcel Mathematical Formulae and Statistical Tables
Last updated 8 November 2026. Spotted a mistake? Tell us.