Suppose x is a discrete random variable with values 2,3,1 and probabilities 0.2,0.3, and 0.4 respectively. NOw say we have the function y=x2+3 and we want to find the expected value of this equation. So, in my opinion, we first have to square all the values of x so they become 4,9 and 1 and then multiply them with their respective probabilities and then add them all up and in the end, just add 3 to the answer.
This works out to give the answer 6.9, but my teacher at the university solvedthis question another way. He said that since x2 is just x times x, the expected value of x squared should be the E(x) times E(x) so we can just multiply the value of x with its probability and then add em all up and then square the answer. This gives the answer 5.89. So which way is correct?
I'm pretty sure that the way I think it should be done is correct so if it is, then I'm gonna have to confront my teacher about this matter. And I just know that he'll state the rule that the expected value of the product of two or more random variables is equal to the product of their individual expected values. How do I explain to him why this rule doesn't apply here?
I think it is because of the rule applies to two different random variables, but here x is the same random variable.