χ2-tests

Further Maths · Further Probability & Statistics. The idea in plain words, the rules to remember, the mistake to avoid and a worked example, written and checked by Mega Lecture.

Test this topic freeAll Further Maths topics

The idea

A χ2-test compares the frequencies you observed (O) with the frequencies a hypothesis says you should expect (E). If the hypothesis is true, O and E should be close and the test statistic is small. A large statistic is evidence against the hypothesis, so the test always uses the upper tail.

In a goodness of fit test the hypothesis is that the data follow a stated distribution, such as a fair die, a binomial or a Poisson. In a test for independence the data are in a contingency table and the hypothesis is that the two factors are not associated.

The critical value depends on the degrees of freedom. Every expected frequency must be at least 5, so small classes are combined first.

Rules to remember

Common mistake

Students count the degrees of freedom before combining classes, or forget to subtract 1 for each parameter estimated from the data (for example a Poisson mean worked out from the sample). Combine first, then count the classes that are left.

Worked example

A model predicts that three types of offspring occur in the ratio 1 : 2 : 1. In a sample of 80 offspring the observed frequencies are 14, 46 and 20. Test at the 5% significance level whether the model fits. The critical value for ν = 2 is 5.991.

  1. Expected frequencies: 80 × 1/4 = 20, 80 × 2/4 = 40, 80 × 1/4 = 20.
  2. χ2 = (14 − 20)2/20 + (46 − 40)2/40 + (20 − 20)2/20 = 1.8 + 0.9 + 0 = 2.7.
  3. ν = 3 − 1 = 2 (no parameters estimated). 2.7 < 5.991, so the result is not in the critical region.

Answer: χ2 = 2.7; do not reject H0. The data are consistent with the ratio 1 : 2 : 1.

Ask about this

Type what you are stuck on. The helper finds the explanation, worked examples and the notes to read, free and instant.

Keep going

← Inference using normal and t-distributionsNon-parametric tests →Take a Further Maths test