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 306The Kruskal-Wallis test returnsFigure 11.3 Boxplots comparinggrades <strong>for</strong> three separate exams> kruskal.test(values ~ ind, data=d)Kruskal-Wallis rank sum testdata: values by indKruskal-Wallis chi-squared=1.775, df=2, p-value0.4116This large p-value indicates no reason to doubt the null hypothesis of equally difficultexams.11.1.5 Problems11.1 The morley data set contains speed-of-light measurements by Michaelson andMorley. There were five experiments, each consisting of multiple runs. Per<strong>for</strong>m a onewayanalysis of variance to see if each of the five experiments has the same populationmean.11.2 For the data set Cars93 (MASS) per<strong>for</strong>m a one-way analysis of variance of MPG.highway <strong>for</strong> each level of DriveTrain. Does the data support the null hypothesis of equalpopulation means?11.3 The data set female. inc (<strong>Using</strong>R) contains income data <strong>for</strong> females age 15 orover in the United States <strong>for</strong> the year 2001, broken down by race. Per<strong>for</strong>m a one-wayanalysis of variance of income by race. Is there a difference in the mean amount earned?What is the p-value? What test did you use and why?11.4 The data set car safety (<strong>Using</strong>R) contains car-crash data. For several makes of carthe number of drivers killed per million is recorded in Drivers. deaths. The number ofdrivers of other cars killed in accidents with these cars, per million, is recorded in Other.deaths. The variable type is a factor indicating the type of car.Per<strong>for</strong>m a one-way analysis of variance of the model Drivers. deaths ~ type. Is there adifference in population means? Did you assume equal variances? Normally distributedpopulations?

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

Saved successfully!

Ooh no, something went wrong!