xh <- 107.2
yh <- 171.14
sx <- 10.37
sy <- 9.41
r <- .67
# b1
b1 <- (sy/sx) * r
# b0
b0 <- yh - b1 * xh
Equation: y = 105.9650878 + 0.6079749 * x
* b.) Slope: represents the number of centimeters increase (0.6079749) in height for each increase in shoulder girth
Intercept: represents the height in centimeters at girth of 0cm (105.9650878)
* c.) The R2 is 0.4489 which means that 44.89% of the variation is accounted for
* d.)
height <- function(girth) b0 + b1 * girth
height(100)
## [1] 166.7626
yi <- 160
ei <- (yi - height(100)) %>%
print
## [1] -6.762581
Since the residual is negative, this means that the actual data point is below the result of the linear regression model and that the model is overstating the value * f.) It would not be appropriate. The original dataset had values within 85 and 135 cm. Extrapolation would be necessary here
b0 <- 4.010
x <- -.0883
y <- 3.9983
b1 <- ((y - b0)/x) %>%
print
## [1] 0.1325028