Hypothesis Test: Difference Between Proportions
This lesson explains how to conduct a hypothesis test to determine
whether the difference between two proportions is significant.
The test procedure, called the
twoproportion ztest, is
appropriate when the following conditions are met:
 Each population is at least 20 times as big as its sample.
This approach consists of four steps: (1) state the hypotheses,
(2) formulate an analysis plan, (3) analyze sample data, and
(4) interpret results.
State the Hypotheses
Every hypothesis test requires the analyst
to state a
null hypothesis
and an
alternative hypothesis.
The table below shows three sets of hypotheses. Each makes a
statement about the difference d between
two population proportions, P_{1} and P_{2}.
(In the table, the symbol ≠ means " not equal to ".)
Set 
Null hypothesis 
Alternative hypothesis 
Number of tails 
1

P_{1}  P_{2} = 0 
P_{1}  P_{2} ≠ 0 
2 
2

P_{1}  P_{2} > 0 
P_{1}  P_{2} < 0 
1 
3

P_{1}  P_{2} < 0 
P_{1}  P_{2} > 0 
1 
The first set of hypotheses (Set 1) is an example of a
twotailed test, since an extreme value on either side of the
sampling distribution would cause a researcher to reject the null
hypothesis. The other two sets of hypotheses (Sets 2 and 3) are
onetailed tests, since an extreme value on only one side of the
sampling distribution would cause a researcher to reject the
null hypothesis.
When the null hypothesis states that there is no difference between the
two population proportions (i.e., d = P_{1}  P_{2} = 0), the null and alternative
hypothesis for a twotailed test are often stated in the
following form.
H_{0}: P_{1} = P_{2}
H_{a}: P_{1} ≠ P_{2}
Formulate an Analysis Plan
The analysis plan describes
how to use sample data to accept or reject the null
hypothesis. It should specify the following elements.
 Significance level. Often, researchers choose
significance levels
equal to
0.01, 0.05, or 0.10; but any value between 0 and
1 can be used.
 Test method. Use the twoproportion ztest (described in the
next section) to determine whether the hypothesized
difference between population proportions differs
significantly from the observed sample difference.
Analyze Sample Data
Using sample data, complete the following computations to find
the test statistic and its associated PValue.
The analysis described above is a twoproportion ztest.
Interpret Results
If the sample findings are unlikely, given
the null hypothesis, the researcher rejects the null hypothesis.
Typically, this involves comparing the Pvalue to the
significance level,
and rejecting the null hypothesis when the Pvalue is less than
the significance level.
Test Your Understanding
In this section, two sample problems illustrate how to conduct a
hypothesis test for the difference between two proportions.
The first problem involves a a
twotailed test; the second problem, a onetailed test.
Problem 1: TwoTailed Test
Suppose the Acme Drug Company develops a new drug, designed to
prevent colds. The company states that the drug is equally effective
for men and women. To test this claim, they choose a
a simple random sample of 100 women and 200 men from a population of
100,000 volunteers.
At the end of the study, 38% of the women caught a cold; and
51% of the men caught a cold. Based on these findings,
can we reject the company's claim that the drug is equally
effective for men and women? Use a 0.05 level of significance.
Solution: The solution to this problem takes four steps:
(1) state the hypotheses, (2) formulate an analysis plan,
(3) analyze sample data, and (4) interpret results.
We work through those steps below:
 State the hypotheses. The first step is to
state the null hypothesis and an alternative hypothesis.
Null hypothesis: P_{1} = P_{2}
Alternative hypothesis: P_{1} ≠ P_{2}
Note that these hypotheses constitute a twotailed test.
The null hypothesis will be rejected if the proportion
from population 1
is too big or if it is too small.
 Formulate an analysis plan. For this analysis,
the significance level is 0.05. The test method is a
twoproportion ztest.
 Analyze sample data. Using sample data, we
calculate the pooled sample proportion (p) and the standard error
(SE). Using those measures, we compute the zscore
test statistic (z).
p = (p_{1} * n_{1} + p_{2} * n_{2})
/ (n_{1} + n_{2})
p = [(0.38 * 100) + (0.51 * 200)] / (100 + 200)
p = 140/300 = 0.467
SE =
sqrt{ p * ( 1  p ) * [ (1/n_{1}) + (1/n_{2}) ] }
SE = sqrt [ 0.467 * 0.533 * ( 1/100 + 1/200 ) ]
SE = sqrt [0.003733] = 0.061
z = (p_{1}  p_{2}) / SE
= (0.38  0.51)/0.061
= 2.13
where p_{1} is the sample proportion in sample 1,
where p_{2} is the sample proportion in sample 2,
n_{1} is the size of sample 1,
and n_{2} is the size of sample 2.
Since we have a
twotailed test, the Pvalue is the probability that the
zscore is less than 2.13 or greater than 2.13.
We use the
Normal Distribution Calculator
to find P(z < 2.13) = 0.017, and
P(z > 2.13) = 0.017. Thus, the Pvalue = 0.017 + 0.017 = 0.034.
 Interpret results. Since the Pvalue (0.034) is
less than the significance level (0.05), we cannot accept the
null hypothesis.
Note: If you use this approach on an exam, you may also want to mention
why this approach is appropriate.
Specifically, the approach is appropriate because
the sampling method was simple random sampling, the
samples were independent, each population was at least 10 times
larger than its sample, and
each sample included at least 10 successes and 10 failures.
Problem 2: OneTailed Test
Suppose the previous example is stated a little bit differently.
Suppose the Acme Drug Company develops a new drug, designed to
prevent colds. The company states that the drug is more effective
for women than for men. To test this claim, they choose a
a simple random sample of 100 women and 200 men from a population of
100,000 volunteers.
At the end of the study, 38% of the women caught a cold; and
51% of the men caught a cold. Based on these findings,
can we conclude that the drug is more effective for women than
for men? Use a 0.01 level of significance.
Solution: The solution to this problem takes four steps:
(1) state the hypotheses, (2) formulate an analysis plan,
(3) analyze sample data, and (4) interpret results.
We work through those steps below:
 State the hypotheses. The first step is to
state the null hypothesis and an alternative hypothesis.
Null hypothesis: P_{1} >= P_{2}
Alternative hypothesis: P_{1} < P_{2}
Note that these hypotheses constitute a onetailed test.
The null hypothesis will be rejected if the proportion
of women catching cold (p_{1}) is sufficiently
smaller than the proportion of men catching cold
(p_{2}).
 Formulate an analysis plan. For this analysis,
the significance level is 0.01. The test method is a
twoproportion ztest.
 Analyze sample data. Using sample data, we
calculate the pooled sample proportion (p) and the standard error
(SE). Using those measures, we compute the zscore
test statistic (z).
p = (p_{1} * n_{1} + p_{2} * n_{2})
/ (n_{1} + n_{2})
p = [(0.38 * 100) + (0.51 * 200)] / (100 + 200)
p = 140/300 = 0.467
SE = sqrt{ p * ( 1  p ) * [ (1/n_{1}) + (1/n_{2}) ] }
SE = sqrt [ 0.467 * 0.533 * ( 1/100 + 1/200 ) ]
SE = sqrt [0.003733] = 0.061
z = (p_{1}  p_{2}) / SE
= (0.38  0.51)/0.061
= 2.13
where p_{1} is the sample proportion in sample 1,
where p_{2} is the sample proportion in sample 2,
n_{1} is the size of sample 1,
and n_{2} is the size of sample 2.
Since we have a
onetailed test, the Pvalue is the probability that the
zscore is less than 2.13.
We use the
Normal Distribution Calculator
to find P(z < 2.13) = 0.017. Thus, the Pvalue = 0.017.
 Interpret results. Since the Pvalue (0.017) is
greater than the significance level (0.01), we cannot reject the
null hypothesis.
Note: If you use this approach on an exam, you may also want to mention
why this approach is appropriate.
Specifically, the approach is appropriate because
the sampling method was simple random sampling, the
samples were independent, each population was at least 10 times
larger than its sample, and
each sample included at least 10 successes and 10 failures.