Chi-Square Goodness of Fit
- State hypotheses for a goodness-of-fit test
- Compute expected counts and the chi-square statistic
- Determine degrees of freedom and interpret the result
One categorical variable against a claimed distribution
A chi-square goodness-of-fit (GOF) test checks whether the distribution of a single categorical variable matches a claimed set of proportions — for example, whether a die is fair or whether observed blood types match expected percentages. H₀ states the claimed distribution ("the proportions are as specified"); Hₐ states that at least one proportion differs.
Expected counts and the chi-square statistic
For each category, the expected count is n times the proportion claimed under H₀. The chi-square statistic sums, over all categories, (observed − expected)² / expected. Large discrepancies between observed and expected counts make χ² large, which produces a small p-value (χ² tests are always upper-tailed). The condition is Large Counts: every expected count ≥ 5.
A die is rolled 60 times with counts: 1→8, 2→10, 3→9, 4→12, 5→11, 6→10. Set up the GOF test for a fair die and compute the chi-square statistic.
- 1.H₀: the die is fair (each face p = 1/6); Hₐ: at least one proportion differs. Expected count per face = 60·(1/6) = 10 (all ≥ 5).
- 2.Compute (O − E)²/E for each face: (8−10)²/10 = 0.4; (10−10)²/10 = 0; (9−10)²/10 = 0.1; (12−10)²/10 = 0.4; (11−10)²/10 = 0.1; (10−10)²/10 = 0.
- 3.Sum: χ² = 0.4 + 0 + 0.1 + 0.4 + 0.1 + 0 = 1.0.
- 4.df = 6 − 1 = 5; χ² = 1.0 is small, so the p-value is large.
A goodness-of-fit test involves a categorical variable with 5 categories. How many degrees of freedom does the chi-square statistic have?
Chi-square procedures use counts, never proportions or percentages. If a problem gives percentages, convert them to observed counts first. The Large Counts condition — every expected count ≥ 5 — is also about counts, and must be checked before trusting the χ² distribution.
In a chi-square test, one category has observed count 30 and expected count 20. What is this category’s contribution to the chi-square statistic?
Answer the 2 checkpoints as you read.
Sign in to save your progress