Goodness-of-fit test idea
Big idea: Goodness-of-fit checks whether observed category counts match a claimed distribution.
Example: Is a die fair?
Compare observed rolls to expected equal frequencies.
Same chi-squared framework: You still use chi-squared formula.
The difference is one categorical variable with expected proportions.
Free preview
This is the free notes preview
You're reading the free notes. Aimnova Pro unlocks the full study experience — and you can try it with your first topic free to keep:
- FlashcardsLock in vocabulary and key terms with spaced repetition.
- Practice questionsAnswer exam-style questions and get instant AI marking.
- Mock exams & past-paper vaultSit full mocks and see exactly how examiners award marks.
- Personalised study planA daily plan built around your exam date and weak areas.
Expected counts from proportions
Worked example
A spinner has 4 colors with expected proportions 0.1, 0.2, 0.3, 0.4.
After 200 spins, find expected counts.
Step by step
- Multiply total by each proportion
- E1=200×0.1=20, E2=40, E3=60, E4=80
- Check total expected = 200
Final answer
Expected counts are 20, 40, 60, 80.
Never wonder what to study next
Get a personalized daily plan based on your exam date, progress, and weak areas. We'll tell you exactly what to review each day.
Chi-squared and degrees of freedom
Degrees of freedom: For goodness-of-fit with k categories and no estimated parameters, df = k - 1.
Worked example
There are 6 categories.
What is df?
Solution
- Use df = k - 1
- df = 6 - 1 = 5
Final answer
Degrees of freedom = 5.
IB-style question — χ² goodness-of-fit for normality
A teacher tests whether 200 exam marks follow N(60, 12²), grouping them into 5 classes.
(a) State the degrees of freedom. (b) Explain how each expected frequency is found.
Step by step
- (a) For a goodness-of-fit test, df = (number of classes) − 1. (At AI SL μ and σ are given, so there is no extra subtraction.)
- (b) Expected count for a class = total × P(that class) using normalcdf, with the two end classes open (lower = −1E99, upper = 1E99).
Final answer
(a) df = 4. (b) Eᵢ = 200 × normalcdf over each class (end classes use ±1E99).
Animated graph
Watch the graph build step by step in study mode.
Interpretation and exam communication
A full-marks conclusion
- The comparison first: p with the significance level, or χ² with the critical value
- The decision: reject H₀, or do not reject H₀
- One sentence in context that names the model (fair, the stated percentages, N(μ, σ²))
Exam tips
- State H0 and H1 in words.
- Use p-value or critical-value rule consistently.
- Final sentence must reference context data.
Stop wasting time on topics you know
Our AI identifies your weak areas and focuses your study time where it matters. No more overstudying easy topics.
Expected = total × probability: Every expected frequency is the total number of observations times the probability the model gives that category. They always add up to the total.
See it drawn, step by step
In My Learning, handwritten diagrams build one step at a time. Play, pause and replay each explanation until it clicks. Create your free account to try it.
A "show that" for an expected value: Write the probability line and the multiplication: "P(neither) = 0.8 × 0.75 = 0.6, 200 × 0.6 = 120". The given number must come at the end.
Every expected frequency more than 5: If a category's expected frequency is 5 or less, merge it with a neighbouring category before the test. Then count the categories again for df.
See it drawn, step by step
In My Learning, handwritten diagrams build one step at a time. Play, pause and replay each explanation until it clicks. Create your free account to try it.
Exam-style question — delivery times [6 marks]
A courier claims its delivery times, T minutes, can be modelled by N(30, 5²). For 250 parcels:
| Time (min) | Observed | Expected |
|---|---|---|
| T < 25 | 56 | 39.7 |
| 25 ≤ T < 30 | 79 | 85.3 |
| 30 ≤ T < 35 | 72 | 85.3 |
| 35 ≤ T < 40 | 31 | 34 |
| T ≥ 40 | 12 | 5.7 |
The test is at the 5 % significance level and the critical value is 9.488.
(a) Write down the null and alternative hypotheses. [2]
(b) Write down the degrees of freedom. [1]
(c) Perform the test, stating the conclusion in context. [3]
Step by step
- (a) H₀: the delivery times can be modelled by N(30, 5²). H₁: they cannot be modelled by N(30, 5²).
- (b) 5 classes, every expected value more than 5.
- (c) Observed in L1, expected in L2, χ²GOF-Test with df = 4.
- Comparison first, then the decision in context.
Final answer
(a) H₀: the times can be modelled by N(30, 5²); H₁: they cannot. (b) 4 (c) χ² = 16.5 > 9.488 (p = 0.00246 < 0.05), so reject H₀: there is sufficient evidence that the delivery times cannot be modelled by N(30, 5²).