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.

Bivariate data 99Figure 3.16 Temperature data withthree trend lines3.4.8 Problems3.23 Try to establish the relationship that twice around the thumb is once around thewrist. Measure some volunteers’ thumbs and wrists and fit a regression line. What shouldthe slope be? While you are at it, try to find relationships between the thumb and necksize, or thumb and waist. What do you think: Did Gulliver’s shirt fit well?3.24 The data set fat (<strong>Using</strong>R) contains ten body circumference measurements. Fit alinear model modeling the circumference of the abdomen by the circumference of thewrist. A 17-cm wrist size has what predicted abdomen size?3.25 The data set wtloss (MASS) contains measurements of a patient’s weight inkilograms during a weight-rehabilitation program. Make a scatterplot showing how thevariable Weight decays as a function of Days.1. What is the Pearson correlation coefficient of the two variables?2. Does the data appear appropriate <strong>for</strong> a linear model? (A linear model says that <strong>for</strong>two comparable time periods the same amount of weight is expected to be lost.)3. Fit a linear model. Store the results in res. Add the regression line to yourscatterplot. Does the regression line fit the data well?4. Make a plot of the residuals, residuals (res), against the Days variable. Comment onthe shape of the points.3.26 The data frame x77 contains data from each of the fifty United States. Firstcoerce the state. x77 variable into a data frame with> x77 = data.frame(state.x77)For each of the following models, make a scatterplot and add the regression line.

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

Saved successfully!

Ooh no, something went wrong!