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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Using</strong> R <strong>for</strong> introductory statistics 218> x = c(140, 125, 150, 124, 143, 170, 125, 94, 127, 53)> qqnorm(x) # check normality, OK> t.test(x, mu = 101.75, alt="greater")One Sample t-testdata: xt = 2.291, df = 9, p-value = 0.02385alternative hypothesis: true mean is greater than 101.895 percent confidence interval:106.4 Infsample estimates:mean of x125.1The p-value is small, indicating that the true amount per class may be more than thatindicated under the null hypothesis.8.2.1 Problems8.9 A study of the average salaries of New York City residents was conducted <strong>for</strong> 770different jobs. It was found that massage therapists average $58,260 in yearly income.Suppose the study surveyed 25 massage therapists and had a standard deviation of$3,250. Per<strong>for</strong>m a significance test of the null hypothesis that the average massagetherapist makes $55,000 per year against the one-sided alternative that it is more. Assumethe data is normally distributed.8.10 The United States Department of Energy conducts weekly phone surveys on theprice of gasoline sold in the United Stat es. Suppose one week the sample average was$2.03, the sample standard deviation was $0.22, and the sample size was 800. Per<strong>for</strong>m aone-sided significance test of H 0 :µ=2.00 against the alternative H A :µ>2.00.8.11 The variable sat .m in the data set stud. recs (<strong>Using</strong>R) contains math SAT scores<strong>for</strong> a group of students. Test the null hypothesis that the mean score is 500 against a twosidedalternative. Would you accept or reject at a 0.05 significance level?8.12 In the babies (<strong>Using</strong>R) data set, the variable dht contains the father’s height. Do asignificance test of the null hypothesis that the mean height is 68 inches against analternative that it is taller. Remove the values of 99 from the data, as these indicatemissing data.8.13 A consumer-reports group is testing whether a gasoline additive changes a car’sgas mileage. A test of seven cars finds an average improvement of 0.5 miles per gallonwith a standard deviation of 3.77. Is this difference significantly greater than a? Assumethe values are normally distributed.8.14 The data set OBP (<strong>Using</strong>R) contains on-base percentages <strong>for</strong> the 2002 majorleague baseball season. Do a significance test to see whether the mean onbase percentageis 0.330 against a two-sided alternative.8.15 The data set normtemp (<strong>Using</strong>R) contains measurements of 130 healthy,randomly selected individuals. The variable temperature contains normal bodytemperature. Does the data appear to come from a normal distribution? If so, per<strong>for</strong>m a /-test to see if the commonly assumed value of 98.6 °F is correct. (A recent study suggeststhat 98.2 degrees is actually correct.)

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

Saved successfully!

Ooh no, something went wrong!