In: Statistics and Probability
Complete parts (a) through (h) for the data below.
x- 40, 50, 60, 70, 80
y-62, 58, 55, 47, 33
B) Find the equation of the line containing the points (50, 58) and (80, 33)
y=__x+(__)
D) By hand, determine the least-squares regression line
The equation of the least-squares regression line is given by
ModifyingAbove y with caret equals b 1 x plus b 0y=b1x+b0
where b1 equals r times StartFraction s Subscript y Over s Subscript x EndFractionb1=r•sysx
is the slope of the least-squares regression line and
b 0 equals y overbar minus b 1 x overbarb0=y−b1x
is the y-intercept of the least-squares regression line.
First find the correlation coefficient, r.
(f) Compute the sum of the squared residuals for the line found in part (b).
The residual is given by the formula below.
Residual=observed y−predicted y=y−y^
(g) Compute the sum of the squared residuals for the least-squares regression line found in part(d).
The residual is given by the formula below.
Residual=observed y−predicted y=y−ModifyingAbove y with caret
Solution:-)
A) The equation of line passes through two points, (50,58) and (80,33).
y=mx+b, slope is given by
Therefore, we have
The equation of the line will be ,
We have computed the following calculations in R code, where on R.H.S. is output and on L.H.S is R code .
D) The equation of the least-squares regression line is given by
E) The correlation coefficient, r = -0.9513848
(F) The sum of the squared residuals for the line is given by 63.12564
G) The residual is given by the formula below.
Residual=observed y−predicted
-2.8 ,0.1, 4.0, 2.9, -4.2
(g)The sum of the squared residuals for the line is given by 13481.1.