Chi-Square Tests
Chi-square tests compare the counts you actually observed in categories against the counts you'd expect under a hypothesis, measuring whether the mismatch is bigger than chance alone would produce.
Definition
Chi-square (χ²) tests work with categorical data organized as counts. There are three common versions: goodness-of-fit (does one categorical variable match a claimed distribution?), independence (are two categorical variables associated within one sample?), and homogeneity (do several populations share the same distribution of a categorical variable?). All three compare observed counts to the counts expected if the null hypothesis were true.
The formula & procedure
χ² = Σ (observed − expected)² / expected, summed over every cell. In a two-way table, the expected count for a cell is (row total × column total) / grand total. Degrees of freedom are (categories − 1) for goodness-of-fit and (rows − 1)(columns − 1) for a two-way table. Conditions: the data are random, every expected count is at least 5, and the 10% condition holds. A larger χ² means observed and expected disagree more, which gives a smaller p-value.
Worked example
A board-game café claims its four table sections are used equally. Over a random hour it logs 120 seatings: A = 24, B = 30, C = 42, D = 24. Under "equal use," each expected count is 120/4 = 30. Then χ² = (24−30)²/30 + (30−30)²/30 + (42−30)²/30 + (24−30)²/30 = 1.2 + 0 + 4.8 + 1.2 = 7.2, on 4 − 1 = 3 degrees of freedom. Comparing χ² = 7.2 to a chi-square distribution with 3 df gives a p-value of about 0.066 — not quite small enough to reject "equal use" at the 5% level, though section C does look busier than expected.
The classic mistake
Running the test on percentages, averages, or rates instead of raw counts — chi-square only works on observed frequencies. A second trap is mixing up the three versions, especially calling it a test of independence when the design actually sampled several separate populations (that's homogeneity). And a significant χ² tells you the variables are associated, not that one causes the other or how strong the link is.
See how you’d score on this.
Reading about it is one thing — a short, free diagnostic shows you exactly where chi-square tests sits in your AP Statistics score, and what to fix first.
Start a free diagnostic