AP Statistics Unit 8: Inference for Categorical Data: Chi-Square
Goodness-of-fit, homogeneity and independence tests.
Unit overview
Chi-square procedures handle categorical variables with more than two categories. A goodness-of-fit test compares one variable's observed counts with a claimed distribution. Tests for homogeneity and independence use a two-way table: homogeneity compares several populations, while independence looks at two variables in one population.
The statistic is , which is large when observed counts differ a lot from expected counts. For two-way tables, . Conditions are random samples and all expected counts at least 5; degrees of freedom are categories minus one, or for tables.
Key topics
- Goodness of fit
- One categorical variable against a hypothesised distribution; .
- Homogeneity
- Same categorical variable across several populations or treatments.
- Independence
- Association between two categorical variables in one sample.
- Expected counts
- Computed under ; each must be at least 5.
Worked example
A die is rolled 60 times. A face appears 16 times when 10 are expected. What does that face contribute to ?
- Contribution is .
- .
- Contribution .
Answer:
Common mistakes
- Using percentages or proportions instead of counts in the formula.
- Checking that observed counts are at least 5 instead of expected counts.
- Mixing up homogeneity and independence; the difference is how the data were collected.
Exam tips
- Show at least one expected-count calculation to justify the condition.
- When a test is significant, the largest components of tell you which cells drove the result.
More practice on this site
- Descriptive Statistics Study Guide (study guide)
- Statistics Formulas cheat sheet (one-page formulas)
- Descriptive Statistics Quiz (quick quiz)
- Statistics practice problems (with worked solutions)
See the AP Statistics exam format and every unit on the course page.