10.07.2015 Views

Using R for Introductory Statistics : John Verzani

Using R for Introductory Statistics : John Verzani

Using R for Introductory Statistics : John Verzani

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Using</strong> R <strong>for</strong> introductory statistics 182Asis approximately normal, we standardize it to get this relationship:(7.1)That is, with probability 1−α, p is in the intervalThis almost specifies a confidence interval, except that involves the unknownvalue of p. There are two ways around this problem. In this case, we can actually solvethe equations and get an interval <strong>for</strong> p in terms of alone. However, <strong>for</strong> instructivepurposes, we will make another assumption to simplify the math. Let’s assume that thevalue of is approximately The centrallimit still applies with this divisor. Consequently, <strong>for</strong> n large enoughThe value is called the standard error of It is known from the sample and isfound by replacing the unknown population parameter in the standard deviation with theknown statistic. This assumption is good provided n is large enough.Confidence intervals <strong>for</strong> pAssume n is large enough so thatis approximately normal whereLet α and z* be related by the distribution of a standard normal random variablethroughP(−z*≤Z≤z*)=1−α.Then the intervalcontains p with approximate probability1−α. The interval is referred to as a (1−α) 100% confidence interval and is oftenabbreviatedThe probability is called the level of confidence and the valuethe margin of error.The prop.test() function can be used to compute confidence intervals of proportions.Finding z* from a. From Figure 7.3 we see that z* (also called z α/2 in other books) isrelated to α/2. In particular, either

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!