Test for Homogeneity
Learning Outcomes
- Conduct and interpret chi-square homogeneity hypothesis tests
Note: The expected value for each cell needs to be at least five in order for you to use this test.
Hypotheses
H0: The distributions of the two populations are the same.Ha: The distributions of the two populations are not the same.
Test Statistic
Use a test statistic. It is computed in the same way as the test for independence.Degrees of Freedom (df)
df = number of columns – 1Requirements
All values in the table must be greater than or equal to five.Common Uses
Comparing two populations. For example: men vs. women, before vs. after, east vs. west. The variable is categorical with more than two possible response values.Example
Do male and female college students have the same distribution of living arrangements? Use a level of significance of 0.05. Suppose that 250 randomly selected male college students and 300 randomly selected female college students were asked about their living arrangements: dormitory, apartment, with parents, other. The results are shown in the table below. Do male and female college students have the same distribution of living arrangements?Distribution of Living Arrangements for College Males and College Females | ||||
---|---|---|---|---|
Dormitory | Apartment | With Parents | Other | |
Males | 72 | 84 | 49 | 45 |
Females | 91 | 86 | 88 | 35 |
H0: The distribution of living arrangements for male college students is the same as the distribution of living arrangements for female college students.
Ha: The distribution of living arrangements for male college students is not the same as the distribution of living arrangements for female college students.
Degrees of Freedom (df): df = number of columns – 1 = 4 – 1 = 3
Distribution for the test:
Calculate the test statistic: χ2 = 10.1287 (calculator or computer)
Probability statement: p-value = P(χ2 >10.1287) = 0.0175
MATRX
key and arrow over to EDIT
. Press 1:[A]
. Press 2 ENTER 4 ENTER
. Enter the table values by row. Press ENTER
after each. Press 2nd QUIT
. Press STAT
and arrow over to TESTS
. Arrow down to C:χ2-TEST
. Press ENTER
. You should see Observed:[A] and Expected:[B]
. Arrow down to Calculate
. Press ENTER
. The test statistic is 10.1287 and the p-value = 0.0175. Do the procedure a second time but arrow down to Draw
instead of calculate
.Compare α and the p-value: Since no α is given, assume α = 0.05. p-value = 0.0175. α > p-value.
Make a decision: Since α > p-value, reject H0. This means that the distributions are not the same.
Conclusion: At a 5% level of significance, from the data, there is sufficient evidence to conclude that the distributions of living arrangements for male and female college students are not the same.
Notice that the conclusion is only that the distributions are not the same. We cannot use the test for homogeneity to draw any conclusions about how they differ.
try it
Do families and singles have the same distribution of cars? Use a level of significance of 0.05. Suppose that 100 randomly selected families and 200 randomly selected singles were asked what type of car they drove: sport, sedan, hatchback, truck, van/SUV. The results are shown in the table. Do families and singles have the same distribution of cars? Test at a level of significance of 0.05.
Sport | Sedan | Hatchback | Truck | Van/SUV | |
---|---|---|---|---|---|
Family | 5 | 15 | 35 | 17 | 28 |
Single | 45 | 65 | 37 | 46 | 7 |
Example
Perez | Chung | Stevens | |
Before | 167 | 128 | 135 |
After | 214 | 197 | 225 |
Solution:
H0: The distribution of voter preferences was the same before and after the earthquake.
Ha: The distribution of voter preferences was not the same before and after the earthquake.Degrees of Freedom (df): df = number of columns – 1 = 3 – 1 = 2
Distribution for the test:
Calculate the test statistic: χ2 = 3.2603 (calculator or computer)
Probability statement: p-value = P(χ2 > 3.2603) = 0.1959
Press the MATRX
key and arrow over to EDIT
. Press 1:[A]
. Press 2 ENTER 3 ENTER
. Enter the table values by row. Press ENTER
after each. Press 2nd QUIT
. Press STAT
and arrow over to TESTS
. Arrow down to C:χ2-TEST
. Press ENTER
. You should seeObserved:[A] and Expected:[B]
. Arrow down to Calculate
. Press ENTER
. The test statistic is 3.2603 and the p-value = 0.1959. Do the procedure a second time but arrow down to Draw
instead of calculate
.
Compare α and the p-value: α = 0.05 and the p-value = 0.1959. α < p-value.
Make a decision: Since α < p-value, do not reject Ho.
Conclusion: At a 5% level of significance, from the data, there is insufficient evidence to conclude that the distribution of voter preferences was not the same before and after the earthquake.
try it
Ivy League schools receive many applications, but only some can be accepted. At the schools listed in the table, two types of applications are accepted: regular and early decision.
Application Type Accepted | Brown | Columbia | Cornell | Dartmouth | Penn | Yale |
---|---|---|---|---|---|---|
Regular | 2,115 | 1,792 | 5,306 | 1,734 | 2,685 | 1,245 |
Early Decision | 577 | 627 | 1,228 | 444 | 1,195 | 761 |
H0: The distribution of regular applications accepted is the same as the distribution of early applications accepted.
Ha: The distribution of regular applications accepted is not the same as the distribution of early applications accepted.
df = 5χ2 test statistic = 430.06

Press the MATRX
key and arrow over to EDIT
. Press 1:[A]
. Press 3 ENTER 3 ENTER
. Enter the table values by row. PressENTER
after each. Press 2nd QUIT
. Press STAT
and arrow over to TESTS
. Arrow down toC:χ2-TEST
. Press ENTER
. You should see Observed:[A] and Expected:[B]
. Arrow down toCalculate
. Press ENTER
. The test statistic is 430.06 and the p-value = 9.80E-91. Do the procedure a second time but arrow down to Draw
instead of calculate
.
References
Data from the Insurance Institute for Highway Safety, 2013. Available online at www.iihs.org/iihs/ratings (accessed May 24, 2013).
“Energy use (kg of oil equivalent per capita).” The World Bank, 2013. Available online at http://data.worldbank.org/indicator/EG.USE.PCAP.KG.OE/countries (accessed May 24, 2013).
“Parent and Family Involvement Survey of 2007 National Household Education Survey Program (NHES),” U.S. Department of Education, National Center for Education Statistics. Available online at http://nces.ed.gov/pubsearch/pubsinfo.asp?pubid=2009030 (accessed May 24, 2013).
“Parent and Family Involvement Survey of 2007 National Household Education Survey Program (NHES),” U.S. Department of Education, National Center for Education Statistics. Available online at http://nces.ed.gov/pubs2009/2009030_sup.pdf (accessed May 24, 2013).