A goodness-of-fit test compares observed counts in categories against the counts a claimed distribution predicts.
Step 1: Let's Learn
Read it, or press Listen and follow the words.
Expected counts
Multiply the total by each claimed proportion. Expected counts are rarely whole numbers, and should not be rounded.
The statistic
Add (observed minus expected) squared, divided by expected, across every category.
Why squared and divided
Squaring stops the differences cancelling. Dividing by expected scales each term, so a gap of 5 matters more in a small category.
Degrees of freedom
For goodness of fit, df is the number of categories minus 1.
The condition
Every expected count must be at least 5. Small expected counts make the chi-square approximation unreliable.
Do the counts match the claimed distribution?
Goodness of fit compares observed category counts with those a hypothesised distribution predicts. The null is that the claimed distribution holds; the alternative is simply that it does not.
The statistic sums scaled discrepancies
Chi-square adds (observed − expected)²/expected over the categories. Dividing by the expected count scales each discrepancy relative to how large it should have been, which makes the categories comparable.
Expected counts must be large enough
Every expected count should be at least 5. This is checked on the expected counts, not the observed ones, and the exam awards marks specifically for getting that right.
A significant result does not say which category
Rejecting the null says the distribution does not fit; it does not identify the offending category. Examining the individual contributions to the statistic is the follow-up, and it should be described rather than assumed.
Step 2: Try It Yourself
Tap and try it out.
Category A has the most. It has 10 more than Category C.
Step 3: Watch an Example
One step at a time.
Watch Ines Compute Expected Counts
A claim says four categories are equally likely, and Ines has 100 observations.
- Step 1
Equally likely across four categories means each proportion is 0.25.
Step 4: Your Turn
Practice makes it stick.
The Expected Count
Problem 1 of 2
100 observations across 4 equally likely categories. What is each expected count?
The Degrees of Freedom
Problem 2 of 2
Four categories in a goodness-of-fit test. Degrees of freedom?
Test the Fit
1 of 8
200 observations across 5 equally likely categories. Each expected count?
2 of 8
Six categories. Degrees of freedom?
3 of 8
Observed 30, expected 25. What is (observed − expected) squared over expected?
4 of 8
Every expected count must be at least what number?
5 of 8
300 observations, claimed proportion 0.2. Expected count?
6 of 8
Should expected counts be rounded to whole numbers? 1 yes, 0 no.
7 of 8
Put the goodness-of-fit procedure in order.
- 1Compute the expected count for each category.
- 2Check that all expected counts reach 5.
- 3Compute the chi-square statistic and the p-value.
- 4State hypotheses about the claimed distribution.
8 of 8
80 observations across 4 equally likely categories. Each expected count?
Step 5: Quick Check
Show what you know.
Question 1 of 2
150 observations across 5 equally likely categories. Each expected count?
Question 2 of 2
Why is each term divided by the expected count?
What You Learned
- Goodness of fit compares observed counts against a claimed distribution.
- The statistic sums (observed − expected)² ÷ expected.
- Degrees of freedom are categories minus 1, and every expected count must reach 5.