They ask me to prove:
$\sum_{i=1}^{n}(x_i - \bar{x})^2$ = min$_{a\in \mathbb{R}} \sum_{i=1}^{n}(x_i - a)^2$ with $\bar{x}$ the mean.
Well my problem is that I start to prove it by different ways but I don't reach anything.
If someone can help me giving me a clue of how to start it will be brilliant.
Hint: $$ \frac{\mathrm{d}}{\mathrm{d}a}\sum_{k=1}^n(x_k-a)^2 =-2\sum_{k=1}^n(x_k-a) $$ When would this be $0$?