# Normal Equations

• Dec 5th 2012, 12:29 PM
joatmon
Normal Equations
Show that the best least squares fit to a set of measurements $\displaystyle y_1,...y_m$ by a horizontal line y = $\displaystyle \lambda$ (where $\displaystyle \lambda$ is a constant) is their average:

$\displaystyle \lambda = \frac{y_1 + ... + y_m}{m}$

Other than that I need to use normal equations and that this is a problem concerning orthogonality, I am completely stuck and have no idea how to proceed. Can anyone help? Thanks.

. That's pretty straight forward if you use the definition isn't it? You want to find the value $\displaystyle \lambda$ such that $\displaystyle \sqrt{\sum_{i=1}^m (y_i- \lambda)^2}$ is a minimum. And because the square root function is is increasing that's the same as finding $\displaystyle \lambda$ such that $\displaystyle \sum_{i=1}^m (y_i- \lambda)^2$ is a minimum.
So take the derivative with respect to $\displaystyle \lambda$ and set it equal to 0: $\displaystyle 2\sum_{i=1}^m \lambda- y_i= 0$. That's the same as $\displaystyle \sum_{i=1}^m \lambda- \sum_{i= 1}^m y_i= m\lambda- \sum_{i=1}^m y_i= 0$. Solve that for $\displaystyle \lambda$.