Chi-Squared Test for Homogeneity
What you'll learn: You'll learn how to test whether multiple populations share the same categorical distribution using the chi-squared test for homogeneity.
The Core Idea
Imagine you're comparing customer preferences across three different cities. In each city, you survey people about which smartphone brand they prefer (Apple, Samsung, or Google). The chi-squared test for homogeneity helps you answer: "Do all three cities have the same distribution of preferences, or do preferences vary by location?"
The test for homogeneity is structurally identical to the test for independence, but with a different research question. Instead of asking whether two variables within one population are independent, you're asking whether the same categorical variable has the same distribution across multiple populations.
How It Works
- Collect samples from each population (e.g., City A, City B, City C)
- Organize data in a contingency table where rows represent populations and columns represent categories
- Calculate expected counts assuming all populations share the same distribution
- Compute the chi-squared statistic: χ² = Σ[(Observed - Expected)²/Expected]
- Compare to the chi-squared distribution with df = (rows - 1)(columns - 1)
The null hypothesis states that all populations have identical categorical distributions. If you reject it, you conclude the distributions differ across populations.
Example Context
Testing whether disease prevalence is the same across regions, whether product preferences differ by age group, or whether voting patterns are consistent across neighborhoods—these all use the test for homogeneity.
Key Takeaway: The chi-squared test for homogeneity determines whether multiple independent populations exhibit the same categorical distribution, using the same computational mechanics as the test for independence but addressing a different research question.