1. Expected value

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.

2. $\displaystyle (X-a)^2=[(X-\mu)+(\mu-a)]^2=(X-\mu)^2+2(X-\mu)(\mu-a)+(\mu-a)^2$

NOW take expectations and observe that $\displaystyle (\mu-a)$ is a constant and that $\displaystyle E(X-\mu)=0$

SO $\displaystyle E(X-a)^2=V(X)+(\mu-a)^2\ge V(X)$

and equality occurs when a=MOO

3. Thanks

4. and there's no need for the rvs to be discrete at all here