Im a fresh statistics student and working on my first course of propability theory. So far everything has been great, but this particular assignment has given me some trouble:

Random variable X's expected value E(X) = 4 and var(X) = 6.

The question is, how do I find E((X-a) ^2)?

I think it has something to do with Y = ag(x) + bh(X) and it's expected value but I don't know how and especially why it is done.

Thank you in advance