Let X be a discrete random variable. Show that the expected value E(X) minimises the expected sum of squared distances,

i.e. show that for all a € R

$\displaystyle E( (X-a)^2) >= Var(X) $

with quality $\displaystyle a = E(X) $

The question also gives a hint that you can write $\displaystyle (X-a)^2 as ( (X- \mu)+ (\mu-a))^2 $

Once I expanded this im unsure what to do.