Library Chi Squared Tests
Further Mathematics

Chi Squared Tests

Revise Chi Squared Tests for Further Mathematics — revision notes and instant AI marking. Free to start.

📖 Revision notes · preview
Edexcel A Level Further Maths · Further Statistics 1

Chi Squared Tests

🎯 Big idea: A chi-squared test checks whether the numbers you actually observed are "close enough" to the numbers you'd expect under some model — if they're too far apart, you reject the model.

📋 Summary — What This Chapter Covers

  • Goodness of fit — comparing observed data (O) to expected data (E) predicted by a model, and testing if the model is any good.
  • The test statistic X² — a single number measuring how "off" your observed values are from expected.
  • Degrees of freedom (ν) — how many values were actually "free to vary" once totals and estimated parameters are accounted for.
  • Testing against standard distributions — discrete uniform, binomial, Poisson, geometric — each with its own way of finding expected frequencies and degrees of freedom.
  • Contingency tables — a two-way version of the same idea, testing whether two variables are independent of each other.
  • Throughout: the golden rule that every expected value must be ≥ 5, or you must combine categories.

1. Goodness of Fit

Observed vs Expected

Think of it like this: you have a theory about how something behaves (a "model"), and you have real data from actually doing the thing. Goodness of fit measures how well the real data matches your theory.

Classic example — you flip a coin 20 times assuming it's fair. Your model (theory) says you should expect 10 heads. In reality, you observe 13 heads. Is 13 "close enough" to 10 to still believe the coin is fair? That's exactly the question a chi-squared test answers.

We lay observed values (Oᵢ) and expected values (Eᵢ) out in a table, one column per possible outcome. A really important check: the observed total and expected total must always match —

Always true
∑Oᵢ = ∑Eᵢ = N
N is the total number of observations. If your totals don't match, you've made an arithmetic error somewhere.

Hypotheses

Every chi-squared goodness of fit test starts the same way:

H₀ (null): There is no difference between the observed and the expected distribution (the model IS a good fit).
H₁ (alternative): The observed distribution cannot be modelled by the expected distribution (the model is NOT a good fit).

All chi-squared tests are one-tailed — you're only ever asking "is X² too big?", never "too big or too small."

Calculating the Test Statistic

Step 1 — combine columns. Before you calculate anything, check every expected value. If any Eᵢ is less than 5, you must merge that column with a neighbouring one until the combined expected value is 5 or more. This matters because the chi-squared approximation breaks down with small expected frequencies.

Score1234
Oᵢ15641
Eᵢ12842

Columns 3 and 4 have expected values below 5, so combine them:

Score123+
Oᵢ1565
Eᵢ1286

Step 2 — calculate X². There are two equivalent formulas — use whichever is faster for the numbers you have:

Formula 1 (definition)
X² = ∑ (Oᵢ − Eᵢ)² / Eᵢ
Square the gap between observed and expected, divide by expected, and add up over every category.
Formula 2 (quicker to compute — NOT in the formula booklet, so memorise it)
X² = ∑ (Oᵢ² / Eᵢ) − N
Square each observed value, divide by its expected value, sum them all, then subtract the total N once at the end.

The bigger X² is, the more the observed data disagrees with the model.

Degrees of Freedom (ν)

This trips up almost everyone at first, so here's the intuition: degrees of freedom = how many category values could genuinely vary freely before the rest are forced by constraints.

  • Start with: (number of columns after combining) − 1. You subtract 1 because once you know all-but-one of the expected values, the last one is forced — it must make the totals match (∑Eᵢ = ∑Oᵢ).
  • If you ALSO had to use the observed data to estimate a parameter (like estimating p for a binomial, or λ for a Poisson), subtract 1 more for each parameter estimated.
Think of it as "cost of information used" Every time you use the observed data to help build the expected values, you spend one degree of freedom. Matching totals always costs 1. Estimating a parameter costs 1 more.

Making the Decision

Once you have X² and ν, compare X² against a critical value χ²ᵥ(α%) from tables, using your significance level α%.

Decision rule
If X² < χ²ᵥ(α%) → insufficient evidence to reject H₀
If X² > χ²ᵥ(α%) → sufficient evidence to reject H₀
Alternatively, find the p-value on your calculator: if p < α, the result is significant and you reject H₀.
Practice Question
A game should award points 2, 4, 8, 10 with probabilities 0.6, 0.2, 0.15, 0.05. Out of 40 players: observed frequencies were 28, 5, 4, 3. Test at the 5% level whether the game is operating correctly.

2. Chi Squared Tests for Standard Distributions

The overall process (hypotheses → expected values → degrees of freedom → X² → critical value → conclusion) never changes. What changes between distributions is how you calculate the expected frequencies and whether you had to estimate a parameter. Here's each one broken down.

Discrete Uniform

Every outcome is equally likely: P(X=x) = 1/k for k possible values. There's never a parameter to estimate here — the model is fully defined just by knowing k.

Expected frequency
Eᵢ = N / k (same for every category)
Degrees of freedom
ν = k − 1
Practice Question
A salesperson's weekly sales over 6 weeks: 15, 17, 11, 21, 14, 12. Test at 5% whether these could be modelled by a discrete uniform distribution.

Binomial

Needs: fixed number of trials n, independent trials, two outcomes (success/failure), constant probability p.

Sometimes you're given p (e.g. testing B(n, 0.2) directly). Other times you must estimate it from the data:

Estimating p (if not given)
p̂ = total successes / (n × N) = ∑(x×f) / (n×N)
f is the frequency of each observed value x, n is the number of trials per observation, N is total observations.
Degrees of freedom
ν = k − 1  (p given)  or   ν = k − 2  (p estimated)
Why the extra −1? Estimating p from your own data "uses up" one more piece of freedom — you needed the observed data to build the model you're testing it against, which is circular in a small way, and the maths accounts for that by reducing ν.
Practice Question
1000 players face 3 boss battles. Bosses defeated: 0→490, 1→384, 2→111, 3→15. Suggested model: B(3, 0.2). Test at 5% whether this binomial model is suitable.

Poisson

Needs: independent events, singly & randomly occurring, constant rate, mean = variance.

Estimating λ (if not given)
λ̂ = ∑(x×f) / N  (just the sample mean)

Poisson variables run from 0 to infinity — so your first and last categories need special handling:

  • The smallest observed value a: calculate P(X ≤ a) for that column.
  • The largest observed value b: calculate P(X ≥ b) = 1 − P(X ≤ b−1) for that column (this "catches" the infinite tail).
Degrees of freedom
ν = k − 1  (λ given)  or   ν = k − 2  (λ estimated)

Geometric

Needs: independent trials, two outcomes, repeated until first success, constant p. The variable counts the number of trials until first success — so it runs from 1 to infinity.

Estimating p (if not given)
p̂ = N / ∑(x×f) = total successes / total trials
Useful formulas for the infinite tails
P(X ≤ x) = 1 − (1−p)ˣ     P(X ≥ x) = (1−p)ˣ⁻¹
Degrees of freedom
ν = k − 1  (p given)  or   ν = k − 2  (p estimated)
Practice Question
Mercurio knocks on doors until getting an answer. Frequencies (1–5 doors): 205, 61, 22, 8, 4 (total 300). He estimates p̂ = 60/89. After combining columns 4, 5 and 6+ into "4≤" with observed 12 and expected 10.37, and columns 1,2,3 with expected 202.24, 65.90, 21.47 — test at 10% whether Geo(p) fits.

3. Chi Squared Tests for Contingency Tables

What's Different Here?

So far we've tested "does this ONE variable follow a particular shape?" Contingency tables ask a different question: "are these TWO variables independent of each other, or related?" For example: is favourite music genre independent of listener age group, or do older listeners really prefer different genres?

This is still a goodness of fit test underneath — you're testing whether the data fits the assumption of independence. A table with h rows and k columns (not counting total rows/columns) is called an h × k contingency table.

Expected Frequencies

Expected frequency for each cell
Expected = (row total × column total) / grand total
Your calculator can often compute this whole matrix automatically once you enter observed frequencies as a matrix (2-way test mode).

Same rule as before: if any expected value is below 5, combine the corresponding row or column with an adjacent one — choosing whichever combination makes the most logical sense in context (e.g. merging two similar age brackets rather than merging two very different genres).

Degrees of Freedom

For an h × k contingency table (after combining)
ν = (h − 1) × (k − 1)
Why? Once you know the row and column totals, only (h−1) rows and (k−1) columns of values are "free" — the rest are forced to make totals match.

Hypotheses & Conclusion

H₀: Variable X and Variable Y are independent.
H₁: Variable X and Variable Y are not independent.

Same decision rule as always: X² > critical value (or p < α) → reject H₀ → the variables are not independent. Otherwise → insufficient evidence to reject → the variables are independent.

Practice Question
500 students: favourite subject (Maths/Sports/Geography) vs favourite film genre (Comedy/Action/Romance/Thriller). Calculated X² = 12.817 using the full 3×4 table. Test at 1% for association.

🧠 What to Memorise

X² formula (definition)
X² = ∑(Oᵢ−Eᵢ)²/Eᵢ — measures total squared deviation, scaled by expected size.
X² formula (quick version — not in booklet!)
X² = ∑(Oᵢ²/Eᵢ) − N — faster to compute by hand, must be memorised.
Combine rule
Any category with expected frequency < 5 must be merged with a neighbour until Eᵢ ≥ 5, before calculating X² or ν.
Degrees of freedom (goodness of fit)
ν = (number of categories after combining) − 1 − (number of parameters estimated from the data).
Degrees of freedom (contingency table)
ν = (rows − 1) × (columns − 1), using the table after any combining.
Discrete Uniform
Eᵢ = N/k for all categories; never any parameter to estimate; ν = k−1.
Binomial estimate of p
p̂ = ∑(x×f) / (n×N) — total successes over total trials.
Poisson estimate of λ
λ̂ = ∑(x×f) / N — the sample mean.
Geometric estimate of p
p̂ = N / ∑(x×f) — total successes over total trials (inverted compared to binomial's formula shape).
Decision rule
X² > critical value (or p-value < α) → reject H₀. All chi-squared tests are one-tailed.

✅ Concepts Checklist

🎯 Exam Tips & Common Mistakes

⚠️ Forgetting to combine BEFORE calculating ν Degrees of freedom is based on the number of categories combining, not before. If you combine two columns into one, your category count drops by one — students often forget this and use the original number of columns.
⚠️ Wrong degrees of freedom when a parameter is estimated If the question gives you the value of p or λ, you only subtract 1 (for the totals matching). If YOU had to estimate it from the data, subtract 2 total. Always double check: "was I given this parameter, or did I have to work it out?"
✅ Always state hypotheses in context Examiners want "H₀: the number of sales follows a discrete uniform distribution" — NOT just "H₀: uniform is a good fit for Variable X." Name the actual variable from the question.
⚠️ Missing the infinite tail for Poisson/Geometric These distributions technically extend to infinity. Your largest observed category's expected value must be calculated as P(X ≥ b), not P(X = b) — otherwise your expected frequencies won't sum to N.
✅ Use the quick formula to save time X² = ∑(Oᵢ²/Eᵢ) − N is faster than the definition formula when doing calculations by hand, since you don't need to compute each (O−E)² separately. Just remember it isn't in the formula booklet — you need it memorised.
⚠️ Always a one-tailed test There's no "less different than expected" side to worry about — you only ever compare X² to the upper critical value. Don't halve α or look for a two-tailed critical value.
✅ Full conclusions score marks Don't just write "reject H₀." Write: "There is sufficient evidence to reject H₀. This suggests that [model] is not a suitable model for [variable, in context]." Mark schemes reward context.
Chi Squared Tests — Revision Guide · Based on Edexcel A Level Further Maths, Further Statistics 1
Also in the full note
  • 🎯 Exam Tips & Common Mistakes
  • Hypotheses & Conclusion
What's inside
📖 Revision notes ✦ AI flashcards ✓ Instant AI marking

Read the full Chi Squared Tests notes free

That's the preview — create a free account to read the rest, plus flashcards and practice questions with instant AI marking. No credit card.

Unlock the full notes free →