MATH 385 Week 13 Worksheet

Throughout this worksheet, use the dataset carnivora, which you can read about here.

  1. Fit a linear regression model which predicts np.log10(SW) (body weight in kilograms) using np.log10(SB) (brain weight in grams), with a unique intercept and unique slope by SuperFamily.
    1. Make a prediction for the body weight of an animal in the super family Feliformia who has a brain weight of 102 grams.
    2. Write a sentence interpreting your prediction above.
    3. Calculate the residual for your prediction above. Is your prediction above the observed value or below the observed value?
    4. Calculate mean squared error for this model.
  2. Fit a linear regression model which predicts SW (body weight in kilograms) using SB (brain weight in grams), with a unique intercept and unique slope by SuperFamily.
    1. Make a prediction for an animal in the super family Feliformia who has a brain weight of 102 grams.
    2. Write a sentence interpreting your prediction above.
    3. Calculate the residual for your prediction above. Is your prediction above the observed value or below the observed value?
    4. Calculate mean squared error for this model and compare it to the mean squared error from the previous model. Which model is a better predictor of SW (body weight in kilograms)?