Setting Up a Chi-Square Test for Homogeneity or Independence
AP Statistics· 12 min read
1. Identifying Homogeneity vs Independence Test Scenarios★★☆☆☆⏱ 10 min
While both tests use identical calculation workflows, their use cases are defined entirely by how data was collected, not the structure of the two-way table. A test for homogeneity is used when you sample from two or more separate independent populations, and measure one single categorical variable on each group. A test for independence is used when you sample from one single combined population, and measure two different categorical variables on each individual.
renderer not yet implemented · content will appear once shipped] renderer not yet implemented · content will appear once shipped] renderer not yet implemented · content will appear once shipped] renderer not yet implemented · content will appear once shipped]2. Writing Null and Alternative Hypotheses Correctly★★★☆☆⏱ 12 min
A very common point loss on the AP exam is incorrectly phrasing hypotheses for chi-square tests, which do not reference a single population proportion like 1-proportion z-tests. For homogeneity tests, the null states that the distribution of the categorical variable is identical across all populations, while the alternative states that at least one distribution differs. For independence tests, the null states that the two variables are not associated (independent), while the alternative states that the two variables are associated (dependent).
renderer not yet implemented · content will appear once shipped] renderer not yet implemented · content will appear once shipped]Never write hypotheses that reference "correlation" for categorical variables, or state that "all proportions are different" for the alternative. The alternative only requires at least one cell to differ from the null expectation.
renderer not yet implemented · content will appear once shipped] renderer not yet implemented · content will appear once shipped]3. Calculating Expected Cell Counts★★★☆☆⏱ 10 min
Every cell in your two-way table has an expected count representing the value you would observe if the null hypothesis was perfectly true. You never round expected counts to whole numbers, even if observed counts are integers, this is a common deduction point on the AP exam.
renderer not yet implemented · content will appear once shipped]As a sanity check, the sum of all expected counts across any single row must equal the original observed row total, and the sum across any column must equal the original observed column total.
renderer not yet implemented · content will appear once shipped]4. Verifying Validity Conditions★★★☆☆⏱ 10 min
All three conditions must be explicitly stated and verified to earn full credit for a chi-square test setup on the AP exam. You cannot skip any of them, even if they are implied in the question prompt.
renderer not yet implemented · content will appear once shipped] renderer not yet implemented · content will appear once shipped]5. Common Pitfalls
Wrong move:
Using observed cell counts to check the large counts condition
Why:
The large counts rule is explicitly defined for expected counts under the null, not observed values, leading to automatic deduction on AP rubrics.
Correct move:
Always reference your pre-calculated expected counts to confirm all are ≥5.
Wrong move:
Stating the alternative hypothesis as 'all proportions are different'
Why:
The chi-square alternative only requires at least one cell to deviate from the null expectation, not every single proportion to differ.
Correct move:
Write 'at least one group's distribution differs' for homogeneity, or 'the two variables are associated' for independence.
Wrong move:
Rounding expected counts to whole integers
Why:
Expected counts are theoretical averages, not real observed values, rounding them introduces unnecessary error in the final chi-square statistic.
Correct move:
Keep expected counts to at least 1 decimal place for all calculations.
Wrong move:
Mixing up homogeneity and independence test scenarios
Why:
AP exam rubrics deduct points if you misidentify the test type even if all calculations are correct.
Correct move:
First confirm if you sampled from multiple separate populations (homogeneity) or one single population (independence) before proceeding.
Wrong move:
Writing hypotheses that reference 'correlation' for categorical variables
Why:
Correlation is a statistic exclusively for two quantitative variables, not categorical data, this demonstrates conceptual misunderstanding.
Correct move:
Use terms like 'association' or 'dependence' to describe relationships between two categorical variables.
6. Quick Reference Cheatsheet
Checklist Item | Homogeneity Test | Independence Test |
|---|---|---|
Study Design | Sample from 2+ separate populations, 1 categorical variable | Sample from 1 population, 2 categorical variables measured |
Null Hypothesis | Distribution of variable is identical across all groups | Two variables are independent, no association |
Expected Count Formula | ||
Required Conditions | Random, Independent, All E ≥5 | Random, Independent, All E ≥5 |
What's Next
Now that you have mastered the full setup workflow for chi-square tests, you are ready to calculate the chi-square test statistic, degrees of freedom, and p-value to complete your hypothesis test. These calculation steps are the next required component to earn full credit on AP exam free response questions that assess chi-square inference. You will also learn how to interpret the results of a significant chi-square test to identify which specific cells are driving the significant result, using individual component calculations. Mastering this setup step ensures you do not lose easy points on the first half of any chi-square FRQ, which accounts for roughly 10-15% of the total AP Statistics exam content weight.
