Chi-Square Tests

AP Statistics guide to chi-square tests: goodness-of-fit, test of independence, test of homogeneity, expected counts, and conditions.

# Chi-Square Tests — AP Statistics

Chi-square (χ2\chi^2) tests analyze categorical data. AP Statistics covers three types: goodness-of-fit, independence, and homogeneity. All use the same test statistic but apply to different research questions.

Key Concepts

Chi-Square Test Statistic

χ2=(OE)2E\chi^2 = \sum \frac{(O - E)^2}{E} where OO = observed count, EE = expected count.

1. Goodness-of-Fit Test

  • Purpose: Does the distribution of one categorical variable match a claimed distribution?
  • H0H_0: The distribution matches the claimed proportions.
  • df=k1df = k - 1 where kk = number of categories.
  • Expected: Ei=npiE_i = n \cdot p_i.

2. Test of Independence

  • Purpose: Are two categorical variables independent (in a single population)?
  • H0H_0: The variables are independent.
  • Data in a two-way table.
  • df=(r1)(c1)df = (r-1)(c-1).
  • Expected: E=row total×column totalnE = \frac{\text{row total} \times \text{column total}}{n}.

3. Test of Homogeneity

  • Purpose: Do different populations have the same distribution of a categorical variable?
  • Same mechanics as the test of independence.
  • H0H_0: The distribution is the same across populations.

Conditions

  1. Random sample(s).
  2. All expected counts 5\geq 5.
  3. Independence (10% condition).

Properties of χ2\chi^2

  • Always 0\geq 0.
  • Right-skewed distribution.
  • Larger χ2\chi^2 → more evidence against H0H_0.
  • Always a right-tail test.

Worked Example

Problem: A die is rolled 60 times. Results: 8, 12, 10, 9, 11, 10 for faces 1-6. Test if the die is fair (α=0.05\alpha = 0.05).

Solution:

H0H_0: The die is fair (each face has probability 1/6). E=60/6=10E = 60/6 = 10 for each face.

χ2=(810)210+(1210)210+(1010)210+(910)210+(1110)210+(1010)210\chi^2 = \frac{(8-10)^2}{10} + \frac{(12-10)^2}{10} + \frac{(10-10)^2}{10} + \frac{(9-10)^2}{10} + \frac{(11-10)^2}{10} + \frac{(10-10)^2}{10} =0.4+0.4+0+0.1+0.1+0=1.0= 0.4 + 0.4 + 0 + 0.1 + 0.1 + 0 = 1.0

df=5df = 5. χcrit2=11.07\chi^2_{\text{crit}} = 11.07 at α=0.05\alpha = 0.05. Since 1.0<11.071.0 < 11.07, fail to reject H0H_0. No evidence the die is unfair.

Practice Questions

  1. 1. A two-way table has 3 rows and 4 columns. What are the degrees of freedom?

    df=(31)(41)=6df = (3-1)(4-1) = 6.

    2. If an expected count is 3, is the condition met?

    No — all expected counts should be at least 5.

    3. A test of independence yields χ2=15.3\chi^2 = 15.3 with df=4df = 4. The p-value is approximately 0.004. What do you conclude at α=0.05\alpha = 0.05?

    Reject H0H_0. There is convincing evidence of an association between the two variables.

Want to check your answers and get step-by-step solutions?

Get it on Google PlayDownload on the App Store

Summary

  • χ2=(OE)2/E\chi^2 = \sum (O-E)^2/E for all cells.
  • Goodness-of-fit: one variable, known distribution.
  • Independence/Homogeneity: two-way tables; same calculation, different context.
  • Conditions: random, expected counts ≥ 5, independence.
  • Always a right-tail test.

Ready to Ace Your AP STATISTICS statistics?

Get instant step-by-step solutions to any problem. Snap a photo and learn with Tutor AI — your personal exam prep companion.

Get it on Google PlayDownload on the App Store