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.

Significance tests 237group n sechinacea 200 5.3 2.5placebo 207 5.4 2.58.30 For the babies (<strong>Using</strong>R) data set, the variable age contains the mom’s age anddage contains the dad’s age <strong>for</strong> several babies. Do a significance test of the nullhypothesis of equal ages against a one-sided alternative that the dads are older.8.31 The data set normtemp (<strong>Using</strong>R) contains body measurements <strong>for</strong> 130 healthy,randomly selected individuals. The variable temperature contains normal bodytemperature data and the variable gender contains gender in<strong>for</strong>mation, with male codedas 1 and female as 2. First split the data by gender, and then per<strong>for</strong>m a two-sample test tosee whether the population means are equivalent. Is the difference statisticallysignificant?8.32 Students wishing to graduate must achieve a specific score on a standardized test.Those failing must take a course and then attempt the test again. Suppose 12 students areenrolled in the extra course and their two test scores are given in Table 8.9. Do a t-test tosee if there was any improvement in the students’ mean scores following the class. If youassume equal variances or a paired test, explain why.Table 8.9 Student scores on pre- and post-testStudentscoresPre-test 17 12 20 12 20 21 23 10 15 17 18 18Post-test 19 25 18 18 26 19 27 14 20 22 16 18The p-value indicates that the null hypothesis of “no improvement” is not consistent withthe data.8.33 Water-quality researchers wish to measure biomass/chlorophyll ratio <strong>for</strong>phytoplankton (in milligrams per liter of water). There are two possible tests, one lessexpensive than the other. To see whether the two tests give the same results, ten watersamples were taken and each was measured both ways, providing the data in Table 8.10.Do a t-test to see if there is a difference in the means of the measured amounts. If youassume equal variances or a paired test, explain why.8.34 The shoes data set in the MASS package contains a famous data set on shoewear. Ten boys wore two different shoes each, then measurements were taken on shoewear. The wear amounts are stored in variables A and B. First make a scatterplot of thedata, then compare the mean wear <strong>for</strong> the two types of shoes using the appropriate t-test.Table 8.10 Measurements ofbiomass/chlorophyll in mg/LMethodmeasurementmethod 1 45.9 57.6 54.9 38.7 35.7 39.2 45.9 43.2 45.4 54.8method 2 48.2 64.2 56.8 47.2 43.7 45.7 53.0 52.0 45.1 57.58.35 The galton on (<strong>Using</strong>R) data set contains data collected by Francis Gallon in 1885.Each data point contains a child’s height and an average of his or her parents’ heights. Do

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

Saved successfully!

Ooh no, something went wrong!