How do you find the slope of the regression line for the following set of data?

X values –3 0 3 5 3
Y values 7 4 –2 2 –3

1 Answer
Oct 5, 2017

The slope is #-97/98approx -0.989796#.

Explanation:

You can use the formula that the slope is #b_{1}=(SS_{xy})/(SS_{x x})#, where #SS_{x x}=sum_{i=1}^{n}(x_{i}-bar{x})^{2}=sum_{i=1}^{n}x_{i}^{2}-((sum_{i=1}^{n}x_{i})^{2})/n# and #SS_{x y}=sum_{i=1}^{n}(x_{i}-bar{x})*(y_{i}-\bar{y})#

#=sum_{i=1}^{n}x_{i}y_{i}-((sum_{i=1}^{n}x_{i})*(sum_{i=1}^{n}y_{i}))/n#

In the given situation #n=5# and we have

#sum_{i=1}^{n}x_{i}=-3+0+3+5+3=8#, #sum_{i=1}^{n}y_{i}=7+4-2+2-3=8#, #sum_{i=1}^{n}x_{i}^{2}=9+0+9+25+9=52#, #sum_{i=1}^{n}y_{i}^{2}=49+16+4+4+9=82#, and #sum_{i=1}^{n}x_{i}y_{i}=-21+0-6+10-9=-26#.

Therefore, #SS_{x x}=52-(8^2)/5=(260-64)/5=196/5=39.2# and #SS_{x y}=-26-(8*8)/5=(-130-64)/5=-194/5=-38.8#.

This leads to a slope of #b_{1}=(-38.8)/39.2=-97/98approx -0.989796#.