7.24

  1. Describe the relationship between number of calories and amount of carbohydrates (in grams)that Starbucks food menu items contain.

Strongly, positively linearly associated.

  1. In this scenario, what are the explanatory and response variables?
    Explanatory: Calories
    Response: Carbohydrates

  2. Why might we want to fit a regression line to these data?

We might be on a low carbohydrate diet, but just have access to calorie information, so want to predict the former from the latter.

  1. Do these data meet the conditions required for fitting a least squares line?
    Linearity and normality look to be met to me, but residuals do not look constant as calories increase.

7.26

  1. Write the equation of the regression line for predicting height.
# y = mx + b
# 
# b = R * (Sy/Sx)
.67 * (9.41/10.37)
## [1] 0.6079749
171.14 - 0.6079749*107.20
## [1] 105.9651

y = 0.6079749*x + 105.9651

  1. Interpret the slope and the intercept in this context.

For every 1 cm increase in shoulder girth, we predict a 0.6079749 increase in height. Since there is no shoulder girth of 0 cm, the intercept is just a theoretical prediction at this x value.

  1. Calculate R^2 of the regression line for predicting shoulder girth from height, and interpret it in the context of the application.
# R^2 = correlation^2
0.67^2
## [1] 0.4489

This is the amount of variability in height explained by shoulder girth.

  1. A randomly selected student from your class has a shoulder girth of 100 cm. Predict the height of this student using the model.
0.6079749*100 + 105.9651
## [1] 166.7626
  1. The student from part (d) is 160 cm tall. Calculate the residual, and explain what this residual means.
166.7626 - 160
## [1] 6.7626

Difference beteen the predicted and observed value.

  1. A one year old has a shoulder girth of 56 cm. Would it be appropriate to use this linear model to predict the height of this child?
0.6079749*56 + 105.9651
## [1] 140.0117

I’m not clear if this is outside of the range of the data used to create the model. If not, then reasonable to use. value above looks somewhat reasonable, but also likely that the linear relationship between shoulder girth and height breaks down for infants.

7.30

  1. Write out the linear model.

y = 4.034x - 0.357

  1. Interpret the intercept.

Given a theoretical body weight of 0, heart weight would be -0.357. No meaningful translation to real data of the intercept.

  1. Interpret the slope.

For every 1 kg increase in body weight, predict 4.034 g increase in heart weight.

  1. Interpret R ^2

64.41% of variability in heart weight explained by body weight.

  1. Calculate the correlation coefficient
sqrt(64.41)
## [1] 8.025584

7.40

  1. Given that the average standardized beauty score is -0.0883 and average teaching evaluation score is 3.9983, calculate the slope. Alternatively, the slope may be computed using just the information provided in the model summary table.

3.9983 = m*(-0.0883) - 4.010

(3.99 + 4.010)/-0.0883
## [1] -90.60023
  1. Do these data provide convincing evidence that the slope of the relationship between teaching evaluation and beauty is positive? Explain your reasoning.

Statistically significant evidence of weak negative association.

  1. List the conditions required for linear regression and check if each one is satisfied for this model based on the following diagnostic plots.

Linearity: slightly non-linear at extremes
Normality of residuals: yes
Constancy of variation: yes (slight fanning at smaller values of beauty)

Don’t understand 7.23d (non-linear?) and 7.40a (don’t we need correlation coefficient?)