Chi-Square Test for Homogeneity

This lesson explains how to conduct a chi-square test for homogeneity.

When to Use a Chi-Square Test for Homogeneity

We use a chi-square test for homogeneity when we want to formally test whether or not there is a difference in proportions between several groups.

Checking Conditions

Before we can conduct a chi-square test for homogeneity, we first need to make sure the following conditions are met to ensure that our test will be valid:

  • Random: A random sample or random experiment should be used to collect the data for all samples.
  • Categorical: The variable we are studying should be categorical.
  • Size: The expected number of observations at each level of the variable should be at least 5.

If these conditions are met, we can then conduct the test. The following example show how to conduct a chi-square test for homogeneity.

Example: Chi-Square Test for Homogeneity

A basketball training facility wants to see if two new training programs improve the proportion of their players who pass a difficult shooting test. 172 players are randomly assigned to program 1, 173 to program 2, and 215 to the current program. After using the training programs for one month, the players then take a shooting test. The table below shows the number of players who pass the shooting test, based on which program they used.

Program 1 Program 2 Current Program Total
# Passed 112 94 130 336
# Failed 60 79 85 224
Total 172 173 215 560


Do all three training programs work equally well? Use a 0.05 level of significance.

Step 1. State the hypotheses. 

The null hypothesis (H0): The proportion of players who pass the shooting test is the same for all three programs.

The alternative hypothesis: (Ha): The proportion is not the same for all three programs.

Step 2. Determine a significance level to use.

The problem tells us that we are to use a .05 level of significance.

Step 3. Find the test statistic.

The test statistic is X2 = Σ [ (Oi – Ei)2 / Ei ]

Where Σ is just a fancy symbol that means “sum”, Oi is the observed frequency at level i of the variable, and Ei is the expected frequency at level i of the variable.

If we simply look at the total proportion of players that passed the shooting test, it would be 336 / 550 = .60. If all three training programs were the same, we would expect 60% of players in each program to pass and 40% in each program to fail.

So now we will calculate the expected number of players to pass and fail in each program. For example, in training program 1 there were a total of 172 players. We would expect 60% of these players to pass, which would be 60% of 172 = .60 x 172 = 103.2. We would also expect 40% of these 172 players to fail, which would be .40 x 172 = 68.8

We can find the expected number of players who pass and fail in all three training programs, and compare this with the observed number of players who actually did pass and fail:

Expected Number of Players to Pass and Fail
Program 1 Program 2 Current Program Total
# Passed 103.2 103.8 129 336
# Failed 68.8 69.2 86 224
Total 172 173 215 550

Observed Number of Players Who Passed and Failed
Program 1 Program 2 Current Program Total
# Passed 112 94 130 336
# Failed 60 79 85 224
Total 172 173 215 550

Lastly, calculate the Chi-Square test statistic X2:  (112 – 103.2)2 / 103.2   +   (60 – 68.8)2 / 68.8   +   (94 – 103.8)2 / 103.8   +   (79 – 69.2)2 / 69.2   +   (130 – 129)2 / 129   +   (85 – 86)2 / 86 = 4.208

Use the Chi-Square Calculator with a degrees of freedom = (r-1)*(c-1) (r = # rows, c = # columns) = (2-1)*(3-1) = 2, Chi-square critical value = 4.208,  and click “Calculate p-value” to find that the p-value = .87803. Then 1 – .87803 = .122.

Step 4. Reject or fail to reject the null hypothesis.

Since the p-value (.122) is not less than our significance level of .05, we fail to reject the null hypothesis.

Step 5. Interpret the results. 

Since we failed to reject the null hypothesis, we do not have sufficient evidence to say that the three programs produce different results.

Leave a Reply

Your email address will not be published. Required fields are marked *