Skip to main content
Statistics LibreTexts

Confidence Intervals for Proportions and Sample Size

  • Page ID
    64212
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \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}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \(\newcommand{\longvect}{\overrightarrow}\)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

     

    A Large Sample Confidence Interval for a Population Proportion

    Recall that a confidence interval for a population mean is given by

     

     

      Confidence Interval for a Population Mean

    \[ \bar{x} \pm \frac{z_{c}s}{\sqrt{n}}\]                   

     

    We can make a similar construction for a confidence interval for a population proportion.  Instead of x, we can use \(\hat{p} and instead of s, we use \(\sqrt{\hat{p}(1-\hat{p})}\) , hence, we can write the confidence interval for a large sample proportion as

     

      

      Confidence Interval Margin of Error for a Population Proportion

              \[ E = z_{c}\sqrt{\frac{\hat{p}(1 - \hat{p})}{n}}\]

     

     

    Example

    1000 randomly selected Americans were asked if they believed the minimum wage should be raised.  600 said yes.  Construct a 95% confidence interval for the proportion of Americans who believe that the minimum wage should be raised.

     

    Solution:  

    We have 

            \(\hat{p}\) = 600/1000 = .6         zc = 1.96         and     n = 1000  

    We calculate:

         \( 0.6 \pm 1.96 \sqrt{\frac{(0.6)(0.4)}{1000}} = 0.6 \pm 0.03 \)

    Hence we can conclude that between 57 and 63 percent of all Americans agree with the proposal. In other words, with a margin of error of .03 , 60% agree.

     


     

    Calculating n for Estimating a Mean

     

    Example

    Suppose that you were interested in the average number of units that students take at a two year college to get an AA degree.  Suppose you wanted to find a 95% confidence interval with a margin of error of  .5 for m knowing s = 10.  How many people should we ask?

     

    Solution

    Solving for n in

            Margin of Error  =  E  = \( \pm \frac{z_{c} s}{\sqrt{n}} \)

    we have

         \( E \sqrt{n} = z_c s \)

         \( \sqrt{n} = \frac{z_c s}{E} \)

    Squaring both sides, we get

         \( n = (\frac{z_c s}{E})^2 \)

    We use the formula:  

         \( n = (\frac{1.96(10)}{0.5})^{2} = 1,536 \)  

     


    Example

    A Subaru dealer wants to find out the age of their customers  (for advertising purposes).  They want the margin of error to be 3 years old.  If they want a 90% confidence interval, how many people do they need to know about?

     

    Solution: 

    We have 

            E = 3,       zc = 1.65

    but there is no way of finding sigma exactly.  They use the following reasoning: most car customers are between 16 and 68 years old hence the range is 

            Range  =  68 - 16  =  52

    The range covers about four standard deviations hence one standard deviation is about

         \( s \approx \frac{52}{4} = 13 \)

    We can now calculate n:

         \( n = (\frac{1.65(13)}{3})^2 = 51.1 \)

    Hence the dealer should survey at least 52 people.

     


    Finding n to Estimate a Proportion

     

    Example 

    Suppose that you are in charge to see if dropping a computer will damage it.  You want to find the proportion of computers that break.  If you want a 90% confidence interval for this proportion, with a margin of error of \(\pm 4\)%, How many computers should you drop?

     

    Solution

    The formula states that

         \( E = z_{c}\sqrt{\frac{\hat{p}(1 - \hat{p})}{n}}\)

    Squaring both sides, we get that

         \( E^{2} = \frac{z_{c}^{2}\hat{p}(1 - \hat{p})}{n} \)

    Multiplying by n, we get

         \( nE^{2} = z_{c}^{2}\hat{p}(1 - \hat{p}) \)

         \( n = \frac{z_{c}^{2}\hat{p}(1 - \hat{p})}{E^{2}} \)

    This is the formula for finding n.

    Since we do not know p, we use .5  ( A conservative estimate)

          \( n = \frac{1}{4}(\frac{z_{c}}{E})^{2} \)

         \(n = \frac{1}{4}(\frac{1.645}{0.04})^{2} \approx 425.4 \)   We round 425.4 up for greater accuracy

    We will need to drop at least 426 computers.  This could get expensive.

    Handout of more examples and exercises on finding the sample size


    Back to the Estimation Home Page

     

    Confidence Intervals for Proportions and Sample Size is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?