The explanatory variable is the number calories and the response variable is the amount of carbohydrates.
We can predict the amount of carbohydrates in Starbucks food items based on the number of calories.
Yes, because the data fit linearity, nearly normal residual, constant variability and the observations are independent.
b1 <- (9.41 / 10.37) * 0.67
b0 <- (b1 * (0-107.2))+ 171.14
b1## [1] 0.6079749
b0## [1] 105.9651
\[\hat{y}= 105.9650878 + 0.6079749x\]
The intercept is the height in centimeters at girth of 0 cm.
The slope is the increase in number of centimeters in height for increase in shoulder girth.
r2 <- 0.67^2
r2## [1] 0.4489
\(R^2 =0.4489\).
45% of the variance of the height depends on the variance of the shoulder.
height_shoulder <- function(girth)
{
height <- b0 + b1 * girth
return(height)
}
predict <- height_shoulder(100)
predict## [1] 166.7626
height = 160
e <- height - 166.7626
e## [1] -6.7626
Residual is -6.7626.
No, it is not appropriate because it is almost 5 standard deviation below the mean of the shoulder girth.
\[\hat{y} = -0.357 + 4.034x\]
When the cat's height is 0, then the heart weight will be negative.
The slope is 4.034. when the cat's body weight increases by 1 gram, the heart weight will increase by 4.034 grams.
The R2 is 64.66%. 64.66% of the variation the heart weight depends on the variabtion of the cat's body.
R2 = 0.6466
r <- sqrt(0.6466)
r## [1] 0.8041144
b1 <- (3.9983 - 4.010)/-0.0883
b1## [1] 0.1325028
It provides convincing evidence between teaching evaluation and beauty is positive because the P-value is approximate to 0, we can reject the null hypothesis.
Linearity: The residual plot is scattered around 0 indicates a linear relationship.
Normal residual: In the QQ plot, they are approximately normal. They are nearly normal.
Constant Variability: The scatterplot of the residuals appears to have constant variability.
Independent Observations: The professors were selected at random, so they are independent.