Chi-square
AP Statistics · Unit 4: Inference
Chi-square notes
Fact-checked by a second, independent AI review.
Chi-square tests use categorical data to test hypotheses about distributions or relationships. They compare observed counts to expected counts under a null model using a chi-square statistic.
- Chi-square statistic
- Compute sum of (O − E)² / E across all cells; large values suggest data do not fit the null model.
- Goodness-of-fit test
- Tests whether an observed categorical distribution matches a specified theoretical distribution.
- Independence test (two-way table)
- Tests whether two categorical variables are independent by comparing observed vs expected counts in the table.
- Degrees of freedom
- For goodness-of-fit: df = number of categories − 1 minus any parameters estimated; for independence: df = (rows − 1) × (columns − 1).
- Assumptions & conditions
- Random sample; all expected counts ≥ 5 for the chi-square approximation to be valid. If some expected counts are less than 5, combine categories to reach at least 5 per cell or use an exact test (e.g., Fisher’s exact) when appropriate.
Remember it: O minus E, square, divide, sum — the 4-step Chi-square rhythm.
Exam tip: Examiners look for correct identification of test type (goodness-of-fit vs independence), correct df, valid expected counts, and clear conclusion with p-value interpretation.
Syllabus checklist
- Chi-square: core ideas
- Terms and typical exam questions for "Inference" in AP Statistics (College Board)
Practice questions
1. Q1: For a chi-square test of independence on a 2×3 table, the degrees of freedom are __.
Answer checked
Show answer
Answer: 2. df = (rows−1)×(cols−1) = (2−1)×(3−1) = 2.
2. Q2: Which statement is true about chi-square tests?
Answer checked
Show answer
Answer: They require expected counts of at least 5 in each cell. A common rule is that expected counts should be at least 5 for the test to be valid.
3. Q3: If observed counts equal the expected counts in all cells, the chi-square statistic is ____.
Answer checked
Show answer
Answer: 0. When O = E for all cells, each term is (O−E)²/E = 0, so the sum is 0.
4. Q4 (typed answer): A goodness-of-fit test has O = [30, 50, 20] and E = [25, 50, 25]. The chi-square statistic is ____.
Answer checked
Show answer
Answer: 2. Compute (30−25)²/25 + (50−50)²/50 + (20−25)²/25 = 25/25 + 0 + 25/25 = 2.
5. Q5: If the chi-square statistic is 4.5 with df=2, and the 0.05 critical value is about 5.99, what is the conclusion?
Answer checked
Show answer
Answer: Fail to reject H0. Since 4.5 < 5.99, we fail to reject the null hypothesis at α = 0.05.

Practise chi-square as a game
Hearts, combos, streaks and an AI tutor that explains every answer. Start free.