MATH 385 Week 13 Worksheet
Please submit one Python file (worksheet13_solutions.ipynb)
by 11:59pm Pacific time on Friday, November 22, in Week 13 to
your Week 13 GitHub repository.
Throughout this worksheet, use the dataset carnivora, which you can read about here.
- Fit a linear regression model which predicts
np.log10(SW)
(body weight in kilograms) usingnp.log10(SB)
(brain weight in grams), with a unique intercept and unique slope bySuperFamily
.- Make a prediction for the body weight of an animal in the super family Feliformia who has a brain weight of 102 grams.
- Write a sentence interpreting your prediction above.
- Calculate the residual for your prediction above. Is your prediction above the observed value or below the observed value?
- Calculate mean squared error for this model.
- Fit a linear regression model which predicts
SW
(body weight in kilograms) usingSB
(brain weight in grams), with a unique intercept and unique slope bySuperFamily
.- Make a prediction for an animal in the super family Feliformia who has a brain weight of 102 grams.
- Write a sentence interpreting your prediction above.
- Calculate the residual for your prediction above. Is your prediction above the observed value or below the observed value?
- 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)?