Skip to main content
Statistics LibreTexts

11.5: Comparing Two Proportions

  • Page ID
    20917
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    In Chapter 10, we covered the test for comparing a proportion to a hypothesized value. In this section we want to explore a test to compare two population proportions.

    Like testing means, the usual null hypothesis will be that proportions are the same. We will usually denote each of the two proportions with a subscript, say 1 and 2. Here are some possible two‐tailed and one‐tailed Hypotheses:

    \(\begin{array}{lll}
    H_o: p_{1}=p_{2} & H_o: p_{1} \geq p_{2} & H_o: p_{1} \leq p_{2} \\
    H_a: p_{1} \neq p_{2} & H_a: p_{1}<p_{2} & H_a: p_{1}>p_{2}
    \end{array} \)

    Notice that the Null Hypothesis can be written as \(H_o: p_{1}-p_{2}=0\), meaning we want to look at the distribution of the difference of sample proportions as a random variable.

    Distribution of difference of sample proportions

    Suppose we take a sample of \(n_1\) from population 1 and \(n_2\) from population 2. Let \(X_1\) be the number of success in sample 1 and \(X_2\) be the number of success in sample 2.

    \(\hat{p}_{1}=\dfrac{X_{1}}{n_{1}}\) represents the proportion of successes in sample 1

    \(\hat{p}_{2}=\dfrac{X_{2}}{n_{2}}\) represents the proportion of successes in sample 2

    As long as there are at least 10 successes and 10 failures in each sample, then the difference of sample proportions \(\hat{p}_{1}-\hat{p}_{2}\) will have a Normal Distribution.

    Central Limit Theorem for the difference of proportions \(\hat{p}_{1}-\hat{p}_{2}\)
    1. \(\mu_{\hat{p}_{1}-\hat{p}_{2}}=p_{1}-p_{2}\)
    2. \(\sigma_{\hat{p}_{1}-\hat{p}_{2}}=\sqrt{\dfrac{p_{1}\left(1-p_{1}\right)}{n_{1}}+\dfrac{p_{2}\left(1-p_{2}\right)}{n_{2}}}\)
    3.  If \(n 1 p 1, n 1(1-p 1), n 2 p 2, n 2(1-p 2)\) are all at least 10, then  the Probability Distribution of \(\hat{p}_{1}-\hat{p}_{2}\) is approximately Normal.

    Combining all of the above into a single formula: 

    \[Z=\dfrac{\left(\hat{p}_{1}-\hat{p}_{2}\right)-\left(p_{1}-p_{2}\right)}{\sqrt{\frac{p_{1}\left(1-p_{1}\right)}{n_{1}}+\frac{p_{2}\left(1-p_{2}\right)}{n_{2}}}} \nonumber \]

    Example: Left handedness by gender

    12% of North Americans claim left‐handedness. With regard to gender, men are slightly more likely than women to be left‐handed, with most studies indicating that about 13% of men and about 11% of women are left‐handed82.

    \(p_m\) = 0.13 = proportion of men who are left‐handed

    \(p_w\) = 0.11 = proportion of women who are left‐handed 

    \(p_m ‐ p_w\) = difference in proportion of men and women who are left‐handed

    Solution

    Suppose we take a sample of 100 men and 150 women. Let's investigate the random variable \(\hat{p}_{m}-\hat{p}_{w}\)

    100(0.13) = 13            100(1‐0.13) = 87

    150(0.11) = 16.5         150(1‐0.11) = 133.5

    Since all values are greater than 10, \(\hat{p}_{m}-\hat{p}_{w}\)has approximately a normal distribution.

    \(\mu_{\hat{p}_{m}-\hat{p}_{w}}=0.13-0.11=0.02\)

    \(\sigma_{\hat{p}_{m}-\hat{p}_{w}}=\sqrt{\dfrac{0.13(1-0.13)}{100}+\dfrac{0.11(1-0.11)}{150}}=0.0422\)

    Hypothesis test for difference of proportions

    In conducting a Hypothesis test where the Null hypothesis assumes equal proportions, it is best practice to pool or combine the sample proportions into a single estimated proportion \(\bar{p}\), and use an estimated standard error, \(S_{\hat{p}_{m}-\hat{p}_{w}}\):

    \(\bar{p}=\dfrac{X_{1}+X_{2}}{n_{1}+n_{2}}\)

    \(s_{\hat{p}_{1}-\hat{p}_{2}}=\sqrt{\dfrac{\bar{p}(1-\bar{p})}{n_{1}}+\dfrac{\bar{p}(1-\bar{p})}{n_{2}}}\)

    The test statistic will have a Normal Distribution as long as there are at least 10 successes and 10 failures in both samples.

    \(Z=\dfrac{\left(\hat{p}_{1}-\hat{p}_{2}\right)-\left(p_{1}-p_{2}\right)}{\sqrt{\frac{\bar{p}(1-\bar{p})}{n_{1}}+\frac{\bar{p}(1-\bar{p})}{n_{2}}}}\)

    Example: Background checks at gun shows

    clipboard_e22bc23857f2ae9154d71fd0d5a6db557.png

    Under current United States law, private sales between owners are exempt from background check requirements. This is sometimes called the "Gun Show Loophole" as it may allow criminals, terrorists and the mentally ill to purchase assault weapons, such as those used in mass shootings.83

    In an August 2016 Study, Pew Research analyzed American's opinions about gun laws and rights.84 Pew took a representative sample of 990 men and 1020 women and asked them several questions. In particular, they asked the sampled Americans if background checks required at gun stores should be made universal and extended to all sales of guns between private owners or at gun shows. 772 out 990 men said yes, while 857 out of 1020 women said yes.

    Is there a difference in the proportion of men and women who support universal background checks for purchasing guns? Design and conduct the test with a significance level of 1%.

    Solution

    Design

    \(H_{o}:  p_{m}=p_{w}\) (There is no difference in the proportion of support for background checks by gender)

    \(H_{a}:  p_{m} \neq p_{w}\) (There is a difference in the proportion of support for background checks by gender)

    Model: Two proportion \(Z\) test. This is a two‐tailed test with \(\alpha\) = 0.01.

    Model Assumptions: for men there are 772 yes and 218 no. For women there are 857 yes and 163 no. Since all these numbers exceed 10, the model is appropriate.

    Decision Rules:

    Critical Value Method ‐ Reject \(H_o\) if \(Z\) > 2.58 or \(Z\) < ‐2.58.                             

    \(P\)‐value method ‐ Reject \(H_o\) if \(p\)‐value <0.01

    Data/Results

    \(\hat{p}_{m}=\dfrac{772}{990}=0.780 \qquad \hat{p}_{w}=\dfrac{857}{1020}=0.840 \qquad \bar{p}=\dfrac{772+857}{990+1020}=0.810\)

    \(Z=\dfrac{(0.780-0.840)-0}{\sqrt{\frac{0.810(1-0.810)}{990}+\frac{0.810(1-0.810)}{1020}}}=-3.45 \mathrm{p} \text {-value }=0.0005<\alpha\)

    Reject \(H_o\) under both methods

    Conclusion

    There is a difference in the proportion of support for background checks by gender. Women are more likely to support background checks.

     


    This page titled 11.5: Comparing Two Proportions is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Maurice A. Geraghty via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.