# 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

Oct 5, 2017

The slope is $- \frac{97}{98} \approx - 0.989796$.

#### Explanation:

You can use the formula that the slope is ${b}_{1} = \frac{S {S}_{x y}}{S {S}_{x x}}$, where $S {S}_{x x} = {\sum}_{i = 1}^{n} {\left({x}_{i} - \overline{x}\right)}^{2} = {\sum}_{i = 1}^{n} {x}_{i}^{2} - \frac{{\left({\sum}_{i = 1}^{n} {x}_{i}\right)}^{2}}{n}$ and $S {S}_{x y} = {\sum}_{i = 1}^{n} \left({x}_{i} - \overline{x}\right) \cdot \left({y}_{i} - \setminus \overline{y}\right)$

$= {\sum}_{i = 1}^{n} {x}_{i} {y}_{i} - \frac{\left({\sum}_{i = 1}^{n} {x}_{i}\right) \cdot \left({\sum}_{i = 1}^{n} {y}_{i}\right)}{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, $S {S}_{x x} = 52 - \frac{{8}^{2}}{5} = \frac{260 - 64}{5} = \frac{196}{5} = 39.2$ and $S {S}_{x y} = - 26 - \frac{8 \cdot 8}{5} = \frac{- 130 - 64}{5} = - \frac{194}{5} = - 38.8$.

This leads to a slope of ${b}_{1} = \frac{- 38.8}{39.2} = - \frac{97}{98} \approx - 0.989796$.