How to prove the sum of deviations from the mean is minimum?

3.6k Views Asked by At

I am trying to prove that the sum of deviations from the mean is minimum. I saw this prove in a book

enter image description here

where $\bar{X}$ is the mean and $Y\neq \bar{X}$. What I am confused about is where does the zero in the last line come from?

1

There are 1 best solutions below

0
On BEST ANSWER

The middle line should in fact be

$\displaystyle \sum_{i=1}^n (X_i-Y)^2 = \sum_{i=1}^n (X_i-\overline{X})^2 + 2(\overline{X}-Y)\sum_{i=1}^n (X_i-\overline{X}) + \sum_{i=1}^n (\overline{X}-Y)^2$

and you then have $\displaystyle\sum_{i=1}^n (X_i-\overline{X})=\left(\sum_{i=1}^n X_i\right) - n \left(\frac1n\sum_{i=1}^n X_i\right)=0$