# Question 54f58

Nov 25, 2017

$y = 5.38 x + 51.82$

#### Explanation:

The formula for linear least-squares method is
$y - \overline{y} = {\sigma}_{x y} / \left({\sigma}_{x}^{2}\right) \left(x - \overline{x}\right)$, where

$\overline{x}$, $\overline{y}$: average of $x$ and $y$, respectively.
${\sigma}_{x}^{2}$: variance of $x$
${\sigma}_{x y}$: covarience of $x$ and $y$

First, calculate $\overline{x}$ and $\overline{y}$.
$\overline{x} = \frac{- 2 + 8 + 10 + 15}{4} = 7.75$
$\overline{y} = \frac{50 + 75 + 103 + 146}{4} = 93.5$

Then, calculate ${\sigma}_{x}^{2}$ and ${\sigma}_{x y}$.
${\sigma}_{x}^{2} = \frac{{\left(- 2 - 7.75\right)}^{2} + {\left(8 - 7.75\right)}^{2} + {\left(10 - 7.75\right)}^{2} + {\left(15 - 7.75\right)}^{2}}{4}$
$= 38.1875$

sigma_(xy)=((-2-7.75)・(50-93.5)+(8-7.75)・(75-93.5)+(10-7.75)・(103-93.5)+(15-7.75)・(146-93.5))/4#
$= 205.375$ (sorry for the ugly format!)

Therefore, the formula of the line is
$y - 93.5 = \frac{38.1875}{205.375} \left(x - 7.75\right)$
$y - 93.5 = 5.3781 \left(x - 7.75\right)$
$y - 93.5 = 5.3781 x - 41.680$
$y = 5.38 x + 51.82$

If you can use Microsoft Excel, you can calculate the average,variance and covariance with AVERAGE, VARP and COVAR function, respectively.