This course has been archived. The College Board updated AP Statistics for the 2026–27 school year, and the units and topics changed.
Go to the new AP® Statistics
6m left·0%
Reading Time: 6 min
Last Updated: March 27, 2026
Main Ideas: 7
Reading Time: 6 min
Last Updated: March 27, 2026
Main Ideas: 7

Topic 8.6 Notes – Carrying Out a Chi-Square Test for Homogeneity or Independence

Read aloud
You already know when to use the test and how to check conditions. Now we compute the test statistic, find the p-value using the chi-square distribution, and make a decision in context about association or differences in distributions.

The Chi-Square Test Statistic

In both a test of independence (one population, two categorical variables) and a test of homogeneity (multiple populations, one categorical variable), the math is identical.

We compare what we observed (O) in each cell of a two-way table to what we would expect (E) if the null hypothesis were true.

If H0H_0 is true:

  • Independence → no association between variables
  • Homogeneity → same distribution across populations

Either way, expected counts come from assuming “no relationship.”

The Formula

χ2=∑(O−E)2E \chi^2 = \sum \frac{(O - E)^2}{E}

What each part means:

  • OO = observed count in a cell
  • EE = expected count for that cell
  • Add this value for every cell in the table

Why this structure?

  • O−EO - E measures deviation.
  • Squaring makes everything positive.
  • Dividing by EE adjusts for cell size.
  • Bigger overall deviations → bigger χ2\chi^2.

Important: χ2≥0\chi^2 \ge 0. It can’t be negative.

On your calculator, this is done with the χ²-Test feature, but the AP exam expects you to understand what that number represents.

Degrees of Freedom

The chi-square distribution depends on degrees of freedom, which come from the table size:

df=(rows−1)(columns−1) df = (\text{rows} - 1)(\text{columns} - 1)

Example:
A 4 × 3 table gives
df=(4−1)(3−1)=3⋅2=6 df = (4 - 1)(3 - 1) = 3 \cdot 2 = 6

More rows or columns → larger df → distribution becomes less skewed.

For example, here is a chi-square distribution with df=5df = 5:

Study guide illustration

Chi-square distribution (df = 5)

The curve is right-skewed, and all possible values are at or to the right of 0. That matters when we interpret the p-value.

Finding the P-Value

Once you have:

  • Your test statistic χ2\chi^2
  • Your degrees of freedom

You find the area to the right of your test statistic on the chi-square distribution.

The p-value is:

The probability, assuming the null hypothesis is true, of getting a chi-square statistic as large or larger than the one observed.

Two things to lock in:

  • It is always a right-tailed test.
  • Larger χ2\chi^2 → smaller p-value.

You’ll usually use technology, but you need to know that the calculator is finding a right-tail probability using the correct df.

Making a Decision

The decision rule is the same as other hypothesis tests:

  • If p ≤ α → Reject H0H_0
  • If p > α → Fail to reject H0H_0

Never say “accept the null.” That loses points every time.

Writing the Conclusion in Context

This is where students lose easy credit. Your conclusion must connect back to the actual variables and population.

Step 1 Decision statement

“Since p = 0.012 is less than α = 0.05, we reject H0H_0.”

Step 2 Context statement

For independence:

There is convincing evidence of an association between study method and course outcome for students at this school.

For homogeneity:

There is convincing evidence that the distribution of preferred social media platform differs among teenagers, adults, and seniors.

Notice:

  • Variables are named.
  • Population is identified.
  • We say “association” or “distribution differs.”
  • We do not claim causation.

Interpreting the P-Value Correctly

Be precise. On an FRQ, a correct interpretation sounds like this:

If there is truly no association between pet ownership and apartment type in the population, there is a 3.4% chance of obtaining a chi-square statistic at least as large as the one observed from this sample.

It is not:

  • The probability the null is true.
  • The probability the alternative is true.
  • The probability we made a mistake.

It’s conditional on H0H_0 being true.

Big Picture Logic

Chi-square tests measure how far the observed counts are from what we’d expect under “no relationship.”

  • Small deviations → small χ2\chi^2 → large p-value → not convincing.
  • Large deviations → large χ2\chi^2 → small p-value → convincing evidence of association or different distributions.

Everything revolves around comparing observed vs. expected counts and seeing whether the differences are too large to attribute to chance alone.

Key Takeaways

The chi-square statistic is χ2=∑(O−E)2E\chi^2 = \sum \frac{(O - E)^2}{E} and is always nonnegative.
Degrees of freedom are (r−1)(c−1)(r - 1)(c - 1), not just rows minus columns.
The p-value is the right-tail area from your χ2\chi^2 value.
Interpret the p-value as a probability assuming H0H_0 is true, not as the probability that H0H_0 is true.
Conclusions must name the variables and population and use “association” or “distribution differs,” never causation.

AP® is a trademark registered by the College Board, which is not affiliated with, and does not endorse this website.

Notes

1 credit used · 5/5 remaining