What value of $\alpha$ makes $\sum_{i=0}^n (x_i-\alpha)^2$ minimal? I know that $\bar{x}$ makes absolute result of $\sum_{i=0}^n (x_i-\alpha)$ minimum. In fact it makes it zero. But how to find what value of $\alpha$ makes $\sum_{i=0}^n (x_i-\alpha)^2$ minimal? What is the best approach?
 A: Putting the first derivative (with respect to $\alpha$) equal to zero you find $2\sum_i (x_i -\alpha) (-1) = 0$ so $\sum_i x_i = n \alpha$ or $\alpha = \frac{1}{n} \sum_i x_i$
A: As I mentioned in comments, showing what minimizes $\sum (x_i-\alpha)^2$ can be done in several ways, such as by simple calculus, or by writing $\sum (x_i-\alpha)^2=\sum (x_i-\bar{x}+\bar{x}-\alpha)^2$. Let's look at the second one:
$\sum (x_i-\alpha)^2=\sum (x_i-\bar{x}+\bar{x}-\alpha)^2$
$\hspace{2.55cm}=\sum (x_i-\bar{x})^2+\sum(\bar{x}-\alpha)^2+2\sum(x_i-\bar{x})(\bar{x}-\alpha)$
$\hspace{2.55cm}=\sum (x_i-\bar{x})^2+\sum(\bar{x}-\alpha)^2+2(\bar{x}-\alpha)\sum(x_i-\bar{x})$
$\hspace{2.55cm}=\sum (x_i-\bar{x})^2+\sum(\bar{x}-\alpha)^2+2(\bar{x}-\alpha)\cdot 0$
$\hspace{2.55cm}=\sum (x_i-\bar{x})^2+\sum(\bar{x}-\alpha)^2$  
Now the first term is unaltered by the choice of $\alpha$ and the last term can be made zero by setting $\alpha=\bar{x}$; any other choice leads to a larger value of the second term. Hence that expression is minimized by setting $\alpha=\bar{x}$.
