Learning Outcomes
- Conduct a hypothesis test for a difference in two population proportions and interpret the conclusion in context
When conducting a hypothesis test that compares two independent population proportions, the following characteristics should be present:
- The two independent samples are simple random samples that are independent.
- The number of successes is at least five, and the number of failures is at least five for each of the samples.
- Growing literature states that the population must be at least ten or 20 times the size of the sample. This keeps each population from being over-sampled and causing incorrect results.
Comparing two proportions, like comparing two means, is common. If two estimated proportions are different, it may be due to a difference in the populations or it may be due to chance. A hypothesis test can help determine if a difference in the estimated proportions reflects a difference in the population proportions.
The difference of two proportions follows an approximate normal distribution. Generally, the null hypothesis states that the two proportions are the same. That is, H0: pA = pB. To conduct the test, we use a pooled proportion, pc.
The pooled proportion is calculated as follows: [latex]\displaystyle{p}_{{c}}=\dfrac{{{x}_{{A}}+{x}_{B}}}{{{n}_{{A}}+{n}_{{B}}}}[/latex]
The distribution for the differences is: [latex]\displaystyle{P}\prime_{{A}}-{P}\prime_{{B}}[/latex] [latex]\sim[/latex] [latex]{N}{\Bigg[{0},\sqrt{{{p}_{{c}}{\big({1}-{p}_{{c}}\big)}{\bigg(\dfrac{{1}}{{n}_{{A}}}+\dfrac{{1}}{{n}_{{B}}}\bigg)}}}\Bigg]}[/latex]
The test statistic (z-score) is: [latex]\displaystyle{z}=\dfrac{(p\prime_{A}-p\prime_{B})-(p_A-p_B)}{\sqrt{p_c(1-p_c)(\dfrac{1}{n_A}+\dfrac{1}{n_B})}}[/latex]
Recall: ORDER OF OPERATIONS
Please |
Excuse |
My |
Dear |
Aunt |
Sally |
parentheses |
exponents |
multiplication |
division |
addition |
subtraction |
[latex]( \ )[/latex] |
[latex]x^2[/latex] |
[latex]\times \ \mathrm{or} \ \div[/latex] |
[latex]+ \ \mathrm{or} \ -[/latex] |
To calculate the test statistic (z-score) follow these steps:
First, find the numerator. Calculate the difference in the estimated proportions [latex](p'_A- p''_B)[/latex] and subtract the difference in the population proportions [latex](p_A-p_B)[/latex].
Second, find the denominator. You will end up taking the square root of the entire bottom; a square root can be understood as a parentheses.
Step 1: Calculate the pooled proportion, [latex]p_C[/latex], where [latex]p_C = \frac{x_A + x_B}{n_A + n_B}[/latex].
Step 2: Subtract the pooled proportion by [latex]1[/latex], [latex]1-p_C[/latex]
Step 3: Add [latex](\frac{1}{n_A})[/latex] and [latex](\frac{1}{n_B})[/latex].
Step 4: Multiply Step 1, Step 2, and Step 3.
Step 5: Find the square root of the value you found in Step 4.
Third, take the numerator and divide by the denominator.
Example 1
Two types of medication for hives are being tested to determine if there is a difference in the proportions of adult patient reactions. Twenty out of a random sample of 200 adults given medication A still had hives 30 minutes after taking the medication. Twelve out of another random sample of 200 adults given medication B still had hives 30 minutes after taking the medication. Test at a 1% level of significance.
Show Answer
The problem asks for a difference in proportions, making it a test of two proportions.
Let A and B be the subscripts for medication A and medication B, respectively. Then pA and pB are the desired population proportions.
Random Variable: P′A – P′B = difference in the proportions of adult patients who did not react after 30 minutes to medication A and to medication B.
H0: pA = pB
pA – pB = 0
Ha: pA ≠ pB
pA – pB ≠ 0
The words “is a difference” tell you the test is two-tailed.
Distribution for the test: since this is a test of two binomial population proportions, the distribution is normal:
[latex]\displaystyle{p_c}=\frac{x_A-x_B}{n_A-n_B}=\frac{20+12}{200+200}=0.08[/latex] 1 – pc = 0.92
[latex]\displaystyle{P}\prime_{{A}}-{P}\prime_{{B}}[/latex]~[latex]{N}{\Bigg[{0},\sqrt {{{({0.08})}{({0.92})}{\bigg(\frac{{1}}{{200}}+\frac{{1}}{{200}}\bigg)}}}}\Bigg][/latex]
P′A – P′B follows an approximate normal distribution.
Calculate the p-value using the normal distribution: p-value = 0.1404.
Estimated proportion for group A: [latex]\displaystyle{p}\prime_{{A}}=\frac{{x}_{{A}}}{{n}_{{A}}}=\frac{{20}}{{200}}={0.1}[/latex]
Estimated proportion for group B: [latex]\displaystyle{p}\prime_{{B}}=\frac{{x}_{{B}}}{{n}_{{B}}}=\frac{{12}}{{200}}={0.06}[/latex]
Graph:
P′A – P′B = 0.1 – 0.06 = 0.04.
Half the p-value is below –0.04, and half is above 0.04.
Compare α and the p-value: α = 0.01 and the p-value = 0.1404. α <p-value.
Make a decision: since α < p-value, do not reject H0.
Conclusion: at a 1% level of significance, from the sample data, there is not sufficient evidence to conclude that there is a difference in the proportions of adult patients who did not react after 30 minutes to medication A and medication B.
USING THE TI-83, 83+, 84, 84+ CALCULATOR
- Press
STAT
.
- Arrow over to
TESTS
and press 6:2-PropZTest
.
- Arrow down and enter
20
for x1, 200
for n1, 12
for x2, and 200
for n2.
- Arrow down to
p1
: and arrow to not equal p2
. Press ENTER
.
- Arrow down to
Calculate
and press ENTER
.
- The p-value is p = 0.1404 and the test statistic is 1.47.
- Do the procedure again, but instead of
Calculate
do Draw
.
try it 1
Two types of valves are being tested to determine if there is a difference in pressure tolerances. Fifteen out of a random sample of 100 of Valve A cracked under 4,500 psi. Six out of a random sample of 100 of ValveB cracked under 4,500 psi. Test at a 5% level of significance.
Show Answer
The p-value is 0.0379, so we can reject the null hypothesis. At the 5% significance level, the data support that there is a difference in the pressure tolerances between the two valves.
Example 2
A research study was conducted about gender differences in “sexting.” The researcher believed that the proportion of girls involved in “sexting” is less than the proportion of boys involved. The data collected in the spring of 2010 among a random sample of middle and high school students in a large school district in the southern United States is summarized in the table. Is the proportion of girls sending sexts less than the proportion of boys “sexting?” Test at a 1% level of significance.
|
Males |
Females |
Sent “sexts” |
183 |
156 |
Total number surveyed |
2231 |
2169 |
Show Answer
This is a test of two population proportions. Let M and F be the subscripts for males and females. Then pM and pF are the desired population proportions.
Random variable: p′F − p′M = difference in the proportions of males and females who sent “sexts.”
H0: pF = pM H0: pF – pM = 0
Ha: pF < pM Ha: pF – pM < 0
The words “less than” tell you the test is left-tailed.
Distribution for the test: since this is a test of two population proportions, the distribution is normal:
[latex]\displaystyle{p}_c=\frac{x_F+x_M}{n_F+n_M}=\frac{156+183}{2169+2231}=0.077[/latex]
Therefore,
[latex]\displaystyle{P}\prime_{{F}}-{P}\prime_{{M}}[/latex]~[latex]{N}{\Bigg[{0},\sqrt {{{({0.077})}{({0.923})}{\bigg(\frac{{1}}{{2169}}+\frac{{1}}{{2231}}\bigg)}}}}\Bigg][/latex]
P′F – P′M follows an approximate normal distribution.
Calculate the p-value using the normal distribution:
p-value = 0.1045
Estimated proportion for females: 0.0719
Estimated proportion for males: 0.082
Graph:
Decision: since α < p-value, Do not reject H0
Conclusion: at the 1% level of significance, from the sample data, there is not sufficient evidence to conclude that the proportion of girls sending “sexts” is less than the proportion of boys sending “sexts.”
USING THE TI-83, 83+, 84, 84+ CALCULATOR
- Press STAT.
- Arrow over to TESTS and press 6:2-PropZTest.
- Arrow down and enter 156 for x1, 2169 for n1, 183 for x2, and 2231 for n2.
- Arrow down to p1: and arrow to less than p2.
- Press
ENTER
.
- Arrow down to Calculate and press ENTER.
- The p-value is P = 0.1045 and the test statistic is z = –1.256.
Example 3
Researchers conducted a study of smartphone use among adults. A cell phone company claimed that iPhone smartphones are more popular with Whites (non-Hispanic) than with African Americans. The results of the survey indicate that of the 232 African American cell phone owners randomly sampled, 5% have an iPhone. Of the 1,343 White cell phone owners randomly sampled, 10% own an iPhone. Test at the 5% level of significance. Is the proportion of White iPhone owners greater than the proportion of African American iPhone owners?
Show Answer
This is a test of two population proportions. Let W and A be the subscripts for the Whites and African Americans. Then pW and pA are the desired population proportions.
Random variable: p′W – p′A = difference in the proportions of Android and iPhone users.
H0: pW = pA H0: pW – pA = 0
Ha: pW > pA Ha: pW – pA > 0
The words “more popular” indicate that the test is right-tailed.
Distribution for the test: the distribution is approximately normal:
[latex]\displaystyle{p}_c=\frac{x_W+x_A}{n_W+n_A}=\frac{134+12}{1343+232}=0.0927[/latex]
Therefore,
[latex]\displaystyle{P}\prime_{{W}}-{P}\prime_{{A}}~{N}{\Bigg[{0},\sqrt {{{({0.0927})}{({0.9073})}{\bigg(\frac{{1}}{{1343}}+\frac{{1}}{{232}}\bigg)}}}}\Bigg][/latex]
[latex]\displaystyle{P}\prime_{{W}}-{P}\prime_{{A}}[/latex] follows an approximate normal distribution.
Calculate the p-value using the normal distribution:
p-value = 0.0077
Estimated proportion for group A: 0.10
Estimated proportion for group B: 0.05
Graph:
Decision: since α > p-value, reject the H0.
Conclusion: at the 5% level of significance, from the sample data, there is sufficient evidence to conclude that a larger proportion of White cell phone owners use iPhones than African Americans.
USING THE TI-83, 83+, 84, 84+ CALCULATOR
- Press STAT.
- Arrow over to TESTS and press 6:2-PropZTest.
- Arrow down and enter 135 for x1, 1343 for n1, 12 for x2, and 232 for n2.
- Arrow down to p1: and arrow to greater than p2.
- Press ENTER.
- Arrow down to Calculate and press ENTER.
- The P-value is P = 0.0092 and the test statistic is Z = 2.33.
try it 2
A concerned group of citizens wanted to know if the proportion of forcible rapes in Texas was different in 2011 than in 2010. Their research showed that of the 113,231 violent crimes in Texas in 2010, 7,622 of them were forcible rapes. In 2011, 7,439 of the 104,873 violent crimes were in the forcible rape category. Test at a 5% significance level. Answer the following questions:
- Is this a test of two means or two proportions?
- Which distribution do you use to perform the test?
- What is the random variable?
- What are the null and alternative hypothesis? Write the null and alternative hypothesis in symbols.
- Is this test right-, left-, or two-tailed?
- What is the p-value?
- Do you reject or not reject the null hypothesis?
- At the ___ level of significance, from the sample data, there ______ (is/is not) sufficient evidence to conclude that ____________.
Show Answer
- two proportions
- normal for two proportions
- subscripts: 1 = 2010, 2 = 2011
P′2 – P′2
- subscripts: 1 = 2010, 2 = 2011
H0: p1 = p2 H0: p1 − p2 = 0
Ha: p1 ≠ p2 Ha: p1 − p2 ≠ 0
- two-tailed
- p-value = 0.00086
- reject the H0.
- at the 5% significance level, from the sample data, there is sufficient evidence to conclude that there is a difference between the proportion of forcible rapes in 2011 and 2010.