Tu cunsiruct a large-sampple confidence interval for a proportion $\pi$, it is not necessary to substitule $\vec{\pi}$ for the unh nown value of $\pi$ in the formula for the standard error of $\hat{\pi}$. A less approximate method for constructing a $95 \%$ confidence interval finds the endpoints by delermining the $\pi$ values that dre 1.96 standard errors from the sample proportion. That is, one colves for $\pi$ it the equation
$$
|\hat{\pi}-\pi|=1.96 \sqrt{\frac{\pi(1-\pi)}{n}}
$$
One can solve this by trial and esror. using the endpoints of the usual confidence interval as initial guesses. Oi one can equare both sides of the equation and solve the resulting quadratic equation.
a) Use this method for the datd un Problem 5.16, and compare the result to that ubtained with the usual method.
b) Explan what happens with the usual melhod when the sample proportion equals 0 or 1 . (The two methods give similar results for very large samples. but otherwise can be quite different if the sample proportion is near 0 or 1. )