NOW take expectations and observe that is a constant and that
SO
and equality occurs when a=MOO
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
with quality
The question also gives a hint that you can write
Once I expanded this im unsure what to do.