The sum of squared deviations is minimized when the deviations are calculated about the sample mean. This result can be proven by using nothing more than high school algebra.
Begin with and rewrite it as .
Completing the square yields .
The first term is the sum of squared deviations about the sample mean.
The second term is zero:
The third term is positive unless .
Therefore, the expression is minimized when , that is, when deviations are
calculated about the sample mean!