The χ² statistic — comparing observed with expected
Add up (O − E)²/E across all categories; a large total signals the model fits badly.
The big idea. Every test asks the same question: do the frequencies I observed match the frequencies my model predicts? You measure the gap between observed () and expected () frequencies and add up a standardised version of it.
The test statistic:
- The numerator measures how far each observed count is from its expected count — squared so positives and negatives do not cancel.
- Dividing by standardises the gap: being 5 out from an expected 100 barely matters, but 5 out from an expected 6 is huge.
- A small means everywhere (good fit). A large means at least one category is badly off (poor fit).
The hypothesis test structure (always state these):
- : the data fit the stated model (the distribution holds / the two variables are independent).
- : the data do not fit the stated model.
- Compare your calculated with the critical value from the MF19 table at the stated significance level and the correct degrees of freedom .
- Reject if critical value. Otherwise there is insufficient evidence to reject .
Cambridge tip. Always lay the calculation out as a table with columns , , , and . The final column is summed to give . Examiners award method marks for a clearly structured table even if one arithmetic entry slips.
- — divide by to standardise each gap.
- Small = good fit; large = reject .
- Reject when critical value from MF19.
See the full worked example for χ² tests for categorical data →