Calories is explanatory and carbs is response.
Customers would like to kow how many Calories on average are coming from carbs.
No. The residuals are not constant as residuals increase as the calories increase.
avg_shoulder = 107.20
sd_shoulder = 10.37
avg_height = 171.14
sd_height = 9.41
cor = 0.67
b1 <- (sd_height/sd_shoulder) * cor
b0 <- avg_height - b1 * avg_shoulder
b1
## [1] 0.6079749
b0
## [1] 105.9651
Equation: y= 0.6079749X + 105.9650878
Slope = 0.6079749 means every 1 cm increase in should girth, the height increase by 0.6079749 cm on average
Intercept = 105.9650878 means if a person has 0 cm in shoulder girth, the person should be 105.9561 cm tall on average.
R2=0.4489. 44.89% of the variation is accounter for should girth.
pred = b1*100+b0
pred
## [1] 166.7626
residual = pred - 160
residual
## [1] 6.762581
Residual is 6.7625805. It means there is a 6.7625805 cm difference between the prediction and the actual observation.
b0 = -0.357
b1 = 4.034
y = 4.034X - 0.357
The intercept here means the off-set between the body mass and heart mass.
The slope means the heart weight increase 4.034 g over 1 kg increase in body weight.
64.66% of the heart weight variation is explained by the catโs body mass.
r2 = 0.6466
r = sqrt(r2)
r
## [1] 0.8041144
b0 <- 4.010
x <- -.0883
y <- 3.9983
b1 = (y-b0)/x
b1
## [1] 0.1325028
The p-value=0.0000 mean the model is statistically significant. The slope seems large enough