Explanatory would be our X axis, so calories. Response is Y axis, so carbs.
Mostly to confirm (a), easy to make predictions and see residuals with a regression line.
You could use a least squares line. Wouldn’t be too good though. Constant variability is an issue, and its kinda skewed to the left.
responseMean = 171.14
responseSD = 9.41
Rvar = .67
explanatoryMean= 107.2
explanatorySD= 10.37
slope = (responseSD/explanatorySD)*Rvar
intercept = responseMean - (slope)*explanatoryMean
regressionFunction = function(x,slope,intercept){
y =(x*slope)+ intercept
return(y)
}
tinyGraph = 1:150
tinyGraph = sapply(tinyGraph,regressionFunction,slope,intercept)
plot(tinyGraph, type = 'l',xlab = 'Shoulder girth',ylab='height')
predicted Y = 105.9650878 + 0.6079749 * explanatory variable
The intercept has a positive offset, slope is going up there at a .6 rate to shoulder girth.
0.4489…44.89% of the variability in the height is explained by the model
I’m just plugging 100 into my function (regressionFunction) I made for question (a)…166.7625805
Residual = observed - predicted, which for this case is -6.7625805 Meaning the actual height is that much less than the line predicted.
Original data only includes 80 to 140 shoulder girth which is a minus…Variability seems to be constant, correlation is strong and linear…While it would be innappropriate, I’d do it in absence of any other model.
-.357 + 4.034 * x
We can expect that a non-existant body weight to have a negative heart weight.
We can expect that for each additional Kg of body weight for a cat, their heart will be 4grams heavier.
64% of hte variability in heart weight of cats can be explained by their body weight
We take the square root of R2 which is 0.8041144
3.9983 = 4.010 + b1 * -.0883 >>>>> b1 = -0.1325028
Yes, you can eyeball this, or look at the P-Value. Not a chance it isn’t positive.
Linearity : Weak positive linear relationship eyeballed from scatterplot - Check
Constant Variability : Looking at residual scatterplot, check. A few outliers, nothing serious - Check
Nearly normal residuals : Histogram shows near normal distribution, left skewed - Check
Independent Observations * : Probably SRS compliant. - Check