Hypothesis Testing for a Difference in Proportions

This lesson explains how to conduct a hypothesis test for a difference between two population proportions. This type of test is known as a two-proportion z-test.

Checking Conditions

Before we can conduct a hypothesis test for a difference between two population proportions, we first need to make sure the following conditions are met to ensure that our hypothesis test will be valid:

  • Random: A random sample or random experiment should be used to collect data for both samples.
  • Independence: The two samples are independent. 
  • Successes & Failures: Each sample includes at least 10 successes and 10 failures.
  • Size: The size of each sample is at most 5% of its population.

If these conditions are met, we can then conduct the hypothesis test. The following two examples show how to conduct a hypothesis test for a difference between two population proportions.

Hypothesis Test for a Difference in Proportions (Two-Tailed)

A superintendent of a school district claims that the percentage of students who prefer chocolate milk over regular milk in school cafeterias is the same for school 1 and school 2. To test this claim, an independent researcher obtains a simple random sample of 100 students from each school and surveys them about their preferences. He finds that 70% of students prefer chocolate milk in school 1 and 68% of students prefer chocolate milk in school 2.

Based on these results, can we reject the superintendent’s claim that the percentage of students who prefer chocolate milk is the same for school 1 and school 2? Use a .05 level of significance. 

Step 1. State the hypotheses. 

The null hypothesis (H0): P1 = P2

The alternative hypothesis: (Ha): P1 ≠ P2

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.

First, find the pooled sample proportion p:

p = (p1 * n1 + p2 * n2) / (n1 + n2)

p = (.70*100 + .68*100) / (100 + 100) = .69

Then use p in the following formula to find the test statistic z:

z = (p1-p2) / √p * (1-p) * [ (1/n1) + (1/n2)]

z = (.70-.68) / √.69 * (1-.69) * [ (1/100) + (1/100)] = .02 / .0654 = .306

Use the Z Score to P Value Calculator with a z score of .306 and a two-tailed test to find that the p-value = 0.759.

4. Reject or fail to reject the null hypothesis.

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

5. Interpret the results. 

Since we failed to reject the null hypothesis, we do not have sufficient evidence to say that the percentage of students who prefer chocolate milk is different for school 1 and school 2.

Hypothesis Test for a Difference in Means (One-Tailed)

A superintendent of a school district claims that the percentage of students who prefer chocolate milk over regular milk in school 1 is less than or equal to the percentage in school 2. To test this claim, an independent researcher obtains a simple random sample of 100 students from each school and surveys them about their preferences. He finds that 70% of students prefer chocolate milk in school 1 and 68% of students prefer chocolate milk in school 2.

Based on these results, can we reject the superintendent’s claim that the percentage of students who prefer chocolate milk in school 1 is less than or equal to the percentage in school 2? Use a .05 level of significance. 

Step 1. State the hypotheses. 

The null hypothesis (H0): P1 ≤ P2

The alternative hypothesis: (Ha): P1 > P2

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.

First, find the pooled sample proportion p:

p = (p1 * n1 + p2 * n2) / (n1 + n2)

p = (.70*100 + .68*100) / (100 + 100) = .69

Then use p in the following formula to find the test statistic z:

z = (p1-p2) / √p * (1-p) * [ (1/n1) + (1/n2)]

z = (.70-.68) / √.69 * (1-.69) * [ (1/100) + (1/100)] = .02 / .0654 = .306

Use the Z Score to P Value Calculator with a z score of .306 and a two-tailed test to find that the p-value = 0.379.

4. Reject or fail to reject the null hypothesis.

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

5. Interpret the results. 

Since we failed to reject the null hypothesis, we do not have sufficient evidence to say that the percentage of students who prefer chocolate milk in school 1 is not less than or equal to the percentage in school 2.

Leave a Reply

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