# The Chi-Square Distribution

## Test for Homogeneity

The goodness-of-fit test can be used to decide whether a population fits a given distribution, but it will not suffice to decide whether two populations follow the same unknown distribution. A different test, called the test for homogeneity, can be used to draw a conclusion about whether two populations have the same distribution. To calculate the test statistic for a test for homogeneity, follow the same procedure as with the test of independence.
HypothesesH: The distributions of the two populations are the same.
    H:  The distributions of the two populations are not the same.
 Test StatisticUse a    test statistic.  It is computed in the same way as the test for independence.  
Degrees of freedom (df = number of columns – 1
 RequirementsAll values in the table must be greater than or equal to five. 
 Common UsesComparing two populations. For example:  men vs. women, before vs. after, east vs. west. The variable is categorical with more than two possible response values. 

### References

Bielick, S. (2008, December). 1.5 million homeschooled students in the United States in 2007 (NCES 2009030).
Washington, DC: National Center for Education Statistics. Retrieved from http://nces.ed.gov/pubsearch/pubsinfo.asp?pubid=2009030
Bielick, S. (2008, December). 1.5 million homeschooled students in the United States in 2007supplemental tables (NCES 2009030). Washington, DC: National Center for Education Statistics. Retrieved from http://nces.ed.gov/pubs2009/2009030_sup.pdf
Insurance Institute for Highway Safety. (n.d.). Ratings. Retrieved from www.iihs.org/iihs/ratings
World Bank Group. (2014). Energy use (kg of oil equivalent per capita). Retrieved from http://data.worldbank.org/indicator/EG.USE.PCAP.KG.OE/countries

### Chapter Review

To assess whether two data sets are derived from the same distribution, which need not be known, you can apply the test for homogeneity that uses the chi-square distribution. The null hypothesis for this test states that the populations of the two data sets come from the same distribution. The test compares the observed values against the expected values if the two populations followed the same distribution. The test is right-tailed. Each observation or cell category must have an expected value of at least five.

### Formula Review


     Homogeneity test statistic where	O = observed values   E = expected values i = number of rows in data contingency table j = number of columns in data contingency table
df = (i −1)(j −1)  degrees of freedom
Use the following information to answer the next five exercises. Do private practice doctors and hospital doctors have the same distribution of working hours? Suppose that a sample of 100 private practice doctors and 150 hospital doctors are selected at random and asked about the number of hours a week they work. The results are shown in .

### Homework

For each word problem, use a solution sheet to solve the hypothesis test problem. Go to 