Presume that from a sample of size n = 400 you get Y = 144 successes. Determine 95% two-sided confidence intervals for the actual p using all three of the methods above. Note that for each you will utilize \(z_{\alpha/2} = z_{0.025} = 1.960\) and \(\tilde{p} = \frac{144}{400} = 0.36\text{.}\)
Normal Interval:
\begin{equation*}
P( 0.36 - 1.96 \sqrt{0.36 \cdot 0.64) / 400} \lt p \lt 0.36 + 1.96 \sqrt{0.36 \cdot 0.64) / 400}) = 1 - \alpha.
\end{equation*}
or
\begin{equation*}
P( 0.36 - 1.96 \cdot 0.6 \cdot 0.8) / 20 \lt p \lt 0.36 + 1.96 \cdot 0.6 \cdot 0.8) / 20) = 0.95
\end{equation*}
or
\begin{equation*}
P( 0.36 - 0.04704 \lt p \lt 0.36 + 0.04704) = 0.95 .
\end{equation*}
or
\begin{equation*}
P( 0.31296 \lt p \lt 0.40704) = 0.95 .
\end{equation*}
So, there is a 95% chance that the actual value for p lies inside the interval \((0.31296 , 0.40704).\)
Maximal Interval:
\begin{equation*}
P( 0.36 - 1.960 \frac{1}{2\sqrt{400}} \lt p \lt 0.36 + 1.960 \frac{1}{2\sqrt{400}} ) = 1 - \alpha.
\end{equation*}
or
\begin{equation*}
P( 0.36 - 1.960 \frac{1}{40} \lt p \lt 0.36 + 1.960 \frac{1}{40} ) = 1 - \alpha.
\end{equation*}
or
\begin{equation*}
P( 0.311 \lt p \lt 0.409 ) = 1 - \alpha.
\end{equation*}
Notice the interval is only slightly wider than when using \(\tilde{p}\) to estimate p in the first case.
Wilson Score Interval: Let’s do this on in parts...
\begin{equation*}
z_{\alpha/2} \sqrt{\frac{\tilde{p}(1-\tilde{p}) + \frac{z_{\alpha/2}^2}{4n}}{n}} = 1.96 \sqrt{ \frac{0.36 \cdot 0.64 + \frac{1.96^2}{1600}}{400}} \approx 0.04728
\end{equation*}
Therefore,
\begin{equation*}
\frac{0.36 + \frac{1.96^2}{800} - 0.04728}{1 + \frac{1.96^2}{400}} \lt p \lt \frac{0.36 + \frac{1.96^2}{800} + 0.04728}{1 + \frac{1.96^2}{400}}
\end{equation*}
or
\begin{equation*}
0.3145 \lt p \lt 0.4082
\end{equation*}
which is slightly different than the first and slightly smaller than the second.