Choosing Among the Three Tests
AP Statistics · Unit 3 — Inference for Categorical Data: Proportions
Key takeaway
From the May 2027 exam, the goodness-of-fit test is no longer tested. Only the two chi-square tests for two-way tables remain: homogeneity and independence.Count the variables and the samples
- Goodness of fit — one categorical variable, one sample, compared with a claimed distribution. $df=k-1$ where $k$ is the number of categories.
- Homogeneity — the same categorical variable measured in several separate populations or treatment groups. $df=(r-1)(c-1)$.
- Independence — two categorical variables measured on one sample. $df=(r-1)(c-1)$.
Homogeneity and independence use identical arithmetic; they differ only in how the data were collected and therefore in how the conclusion is worded. Homogeneity concludes about differences between groups; independence concludes about an association between variables.
Worked example: goodness-of-fit test
A die rolled $120$ times gives faces $1$–$6$ with counts $15,25,18,22,20,20$. Test whether the die is fair.
Solution
Type: one variable (the face of the die), one sample, compared with a uniform distribution ⇒ goodness-of-fit test.
Expected count per face: $\frac{120}{6}=20$ — every cell $\ge5$ ✓.
$$\chi^2=\frac{25}{20}+\frac{25}{20}+\frac{4}{20}+\frac{4}{20}+0+0=\frac{58}{20}=2.9$$$df=6-1=5$. With $df=5$, the value $\chi^2=2.9$ gives $P\approx0.72$ — very large.
Conclusion: there is not enough evidence that the die is unfair.