Chris Spencer edited chapter 7.tex  almost 10 years ago

Commit id: 48b7a4080d16ae165ee13b2f96b800bf63a365a7

deletions | additions      

       

\subsection{Confidence Interval}  Due to the empirical rule, there is a 95 percent chance that p is no more than 2 SE away from $\hat{p}$\\  if we reach out to 2 SEs, 95 percent sure that p will be in that interval. If we reach out 2 SEs in either direction of$\hat{p}$, we can be 95 percent confident that this interval contains the true proportion, this is called a 95 percent $\textbf{confidence interval}$ \\  \subsection{Why do we calculate CIs?}  Constructing a confidence interval is a way to estimate the true population proportion,p, when all we have is the sample proportion,$\hat{p}$\\  In statistics when we are estimating a population parameter we choose to provide an interval where we believe this parameter may be in, and we also accompany our estimate with a measure of how certain we are.\\  This called the margin of error(ME) to the sample statistic.\\  the confidence interval is then estimate $\pm$ ME\\  \subsection{Calculating ME and CI}  the margin of error depends on two criteria:\\  how variable is $\hat{p}$\\  how confident do you want to be of your estimate\\  In general to calculate the confidence interval \[\hat{p} \pm z*SE(\hat{p})\]\\  where $SE(\hat{p})=\sqrt{\frac{\hat{p}(1-\hat{p})}{n}} and Z* is the critical Z score\\  \subsection{Z score}  the critical z is correlated with how confident we want to be on our measurememt error. so for 95 percent confidence you would look that up on a table and see that the correspong z score 1.96.\\  The majority of the time we will be using 95 percent confidence intervals.\\  \subsection{what does 95 percent mean?}  95 percent confident means that 95 percent of random samples will produce confidence intervals that include the true population proportion.\\  $\textbf{Example}$\\  In a random sample of 100 students, 35 have traveled outside the us. estimate the true population proportion of ucla students who travelled outside the US using a 95 percent confidence interval.\\  SE=$\sqrt{\frac{0.35(0.65}{100}}=0.0477\\  ME=1.96(SE)=0.09\\  (0.35 $\pm$ 0.09 ) is your confidence interval\\  \subsection{Choosing Sample Size}  you can find the sample size needed for a given confidence interval. $ME=z*\sqrt{\frac{\hat{p}(1-\hat{p})}{n}}$ and you can solve for n.\\  with some algebra $n=\frac{(z*)^2\hat{p}(1-\hat{p})}{ME^2}$