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.

Confidence intervals 195contains the place of the runner in the sample and is randomly sampled from all thepossible places.7.5 Confidence intervals <strong>for</strong> differencesWhen we have two samples, we might ask whether the two came from the samepopulation. For example, Figure 7.5 shows results <strong>for</strong> several polls on presidentialapproval rating from early 2001 to early 2004. * The rating varies over time, but <strong>for</strong> anygiven time period the polls are all pretty much in agreement. This is to be expected, as thepolls are tracking the same population proportion <strong>for</strong> a given time period. However, howcan we tell if the differences between polls <strong>for</strong> different time periods are due to a changein the underlying population proportion or merely an artifact of sampling variation?7.5.1 Difference of proportionsWe compare two proportions when assessing the results of surveys, as with the approvalratings, but we could do the same to compare other proportions, such as market shares.To see if a difference in the proportions is explainable by sampling error, we look atand find a confidence interval <strong>for</strong> p 1 −p 2 . This can be done, as* A similar figure appeared in a February 9, 2004, edition of Salon (http://www.salon.com/). Thedata is in the data set BushApproval (<strong>Using</strong>R), and the graphic can be produced by runningexample(BushApproval).the statisticFigure 7.5 Presidential approvalrating in United States from spring2001 to spring 2004

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

Saved successfully!

Ooh no, something went wrong!