Chi-Square Homogeneity Test - Stat Trek

Compute the test statistic. Applying the chi-square test for homogeneity to sample data, we compute the degrees of freedom (df), the expected frequency counts (Er,c), and the chi-square test statistic (χ2).

df = (r - 1) * (c - 1) df = (r - 1) * (c - 1) = (2 - 1) * (3 - 1) = 2

Er,c = (nr * nc) / n E1,1 = (100 * 100) / 300 = 10000/300 = 33.3 E1,2 = (100 * 110) / 300 = 11000/300 = 36.7 E1,3 = (100 * 90) / 300 = 9000/300 = 30.0 E2,1 = (200 * 100) / 300 = 20000/300 = 66.7 E2,2 = (200 * 110) / 300 = 22000/300 = 73.3 E2,3 = (200 * 90) / 300 = 18000/300 = 60.0

χ2 = Σ[ (Or,c - Er,c)2 / Er,c ] χ2 = (50 - 33.3)2/33.3 + (30 - 36.7)2/36.7 + (20 - 30)2/30 + (50 - 66.7)2/66.7 + (80 - 73.3)2/73.3 + (70 - 60)2/60 χ2 = (16.7)2/33.3 + (-6.7)2/36.7 + (-10.0)2/30 + (-16.7)2/66.7 + (3.3)2/73.3 + (10)2/60 χ2 = 8.38 + 1.22 + 3.33 + 4.18 + 0.61 + 1.67 = 19.39

where df is the degrees of freedom, r is the number of populations, c is the number of levels of the categorical variable, nr is the number of observations from population r, nc is the number of observations from level c of the categorical variable, n is the number of observations in the sample, Er,c is the expected frequency count in population r for level c, and Or,c is the observed frequency count in population r for level c, and χ2 is the chi-square test statistic.

Tag » When To Use Chi Square Test Of Homogeneity