CHAPTER 7 HOMEWORK - 7.24, 7.26, 7.30, 7.40
Nutrition at Starbucks, Part I. The scatterplot below shows the relationship between the number of calories and amount of carbohydrates (in grams) Starbucks food menu items contain. Since Starbucks only lists the number of calories on the display items, we are interested in predicting the amount of carbs a menu item has based on its calorie content.
The relationship between number of calories and amount of carbohydrates is positive; the higher the amount of calories, the higher the Carbs.
Explanatory variable -> number of calories Response variable -> amount of carbohydrates
we want to fit a regression line to this data in order to predict unknown carbohydrates based on known calories
Yes - There is contsant variability, linearity and nearly normal residuals
Body measurements, Part III. Exercise 7.15 introduces data on shoulder girth and height of a group of individuals. The mean shoulder girth is 107.20 cm with a standard deviation of 10.37 cm. The mean height is 171.14 cm with a standard deviation of 9.41 cm. The correlation between height and shoulder girth is 0.67.
(INTERCEPT + SLOPE) * SHOULDER GIRTH
(9.41/10.37)*0.67
## [1] 0.6079749
(Slope)For each additional cm of shoulder girth the model predicts an additional 0.608 cm of height
(Intercept)0 shoulder girth = 105.97 height
0.67^2 = 45% (45% of the variability in height is accounted for by shoulder girth)
0.4196*100+126.15
## [1] 168.11
For a shoulder girth of 100 cm, the model predicts a height of about 168 cm
The student from part (d) is 160 cm tall. Calculate the residual, and explain what this residual means. The residual is ???8cm. This negative residual means that the model overestimated the height.
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?
56cm is outside of the observed values in the model so NO this model is not appropriate
Cats, Part I. The following regression output is for predicting the heart weight (in g) of cats from their body weight (in kg). The coefficients are estimated using a dataset of 144 domestic cats.
heartwt = 4.034 * bodywt - 0.357
0 body weight (non-meaningful) = -0.357 weight weight(non-meaningful)
For each additional 1 kg in body weight, the model predicts roughly 4 g additional heart weight.
About 65% of the variability in heart weight is accounted for by body weight.
sqrt(0.6466)
## [1] 0.8041144
Rate my professor. Many college courses conclude by giving students the opportunity to evaluate the course and the instructor anonymously. However, the use of these student evaluations as an indicator of course quality and teaching effectiveness is often criticized because these measures may reflect the influence of non-teaching related characteristics, such as the physical appearance of the instructor. Researchers at University of Texas, Austin collected data on teaching evaluation score (higher score means better) and standardized beauty score (a score of 0 means average, negative score means below average, and a positive score means above average) for a sample of 463 professors.The scatterplot below shows the relationship between these variables, and also provided is a regression output for predicting teaching evaluation score from beauty score.
(3.9983-4.01)/-0.0883
## [1] 0.1325028
Yes - the slope of the relationship between teaching evaluation and beauty is positive since the t-value is large, and the p-value is near zero.
Linearity - Satisifed; slightly linear as seen from the scatterplot Nearly normal residuals - NOT Satisifed; (left skewed) Constant Variability - Satisfied;As the beauty score increases, the residual variability appears to decrease