library(DATA606)
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 is linear in that increased in calories has an effect of increased in carbs
Explanatory: Calories. Response: Carbs
One reason may be to predict/estimate/monitor carbs given calories
Partly. Based on residual plot and histogram, it nearly meets linearity and normality, and independent observation can be assumed. However, it seems to fail the constant variability condition
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.
R <- 0.67
ybar <- 171.14
xbar <- 107.20
sy <- 9.41
sx <- 10.37
slope <- R * sy / sx
b0 <- ybar - xbar*slope
height = 105.9650878 + 0.6079749 * shoulder girth
Each centimeter in shoulder girth predicts an additional 0.6079749 cm to the height
R2 is 0.4489, the proportion of the variability in height that is explained by the shoulder girth
Plugging the shoulder girth to the model, the estimate height is 166.7625805
Residual between actual and estimate is -6.7625805 cm, a negative residual. The model overestimates the height
No, it would be extrapolation
The following regression output is for predicting the heart weight (in g) of cats from their body weight (in kg). The coeffcients are estimated using a dataset of 144 domestic cats.
heart’s weigh = -0.357 + 4.034 * body weight
Expected heart’s weight with 0 body weight is -0.357 kg which does not make sense, but just serves to adjust the height of the regression line
For each increase in body’s weight in kg, we predict an increase of heart’s weight by 4.034 g
Body’s weight explains 64.66% of the variablility in heart’s weight
0.8041144
Many college courses conclude by giving students the opportunity to evaluate the course and the instructor anonymously. However, the use of these student evalu- ations 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.
ybar <- 3.9983
xbar <- -0.0883
b0 <- 4.010
slope <- (ybar - b0) / xbar; slope
## [1] 0.1325028
Yes the slope is positive, although this seems to be very weak relationship
Linearity there seems to be somewhat linear, but not strong relationship
Nearly normal residuals historgram seems nearly normal with negative skew
Constant variability residual plot seems variability is roughly constant
Independent observations could not be exactly determined, could be assumed