Regression Equation: Y = a + bx

A linear regression line has an equation of the form Y = a + bX, where X is the explanatory variable and Y is the dependent variable. The slope of the line is b, and a is the intercept (the value of y when x = 0)

Where,
$s_{xy}=\sum&space;xy-\frac{\sum&space;x\sum&space;y}{n{\color{Teal}&space;}}$

${\color{DarkGreen}&space;S{xx}=\sum&space;x^{2}-\frac{\sum&space;x^{2}}{n}}$,             ${\color{DarkBlue}&space;b=\frac{S{xy}}{S{xx}}}$

$\bar{X}=\frac{\sum&space;x}{n}$           and           $\bar{Y}=\frac{\sum&space;y}{n}$

${\color{Red}&space;a=\bar{Y}-b\bar{X}}$

Problem:

Find the Regression Equation and Line from the following data

 X 1 2 4 5 7 8 Y 1 3 3 5 3 5

Solutions:

$\sum&space;x=1+2+4+5+7+8=&space;27$

and ${\color{Red}&space;\sum&space;Y=&space;1+3+3+5+3+5=20}$

$\sum&space;XY&space;=&space;1+6+12+25+21+40=105$