Expected Value of the Square of Two Random Variables

discrete mathematicsexpected valueprobabilityprobability distributions

If we let X be a random variable with expected value m and variance k, and let $X_1$ and $X_2$ be random variables that result from applying $X$ to two independent trials of this particular Bernoulli experiment, what is $E((X_1 − X_2)^2)$?

I learned linearity of expectation, but as far as I have gotten was $E((X_1)^2-2*X_1*X_2+(X_2)^2)$ after polynomial expansion.

I've no clue how to proceed from here.

Best Answer

Since $X_1$ and $X_2$ are independent, we have $$\mathbb E[X_1X_2] =\mathbb E[X_1]\mathbb E[X_2] = \mathbf m^2.$$ (As an exercise, you might want to prove from the definition of independence that it indeed implies the expectation of the product is the product of the expectations - assuming both random variables have finite second moment.) It follows then that \begin{align} \mathbb E[(X_1-X_2)^2] &= \mathbb E[X_1^2 -2X_1X_2 +X_2^2]\\ &= \mathbb E[X_1^2] - 2\mathbb E[X_1X_2] + \mathbb E[X_2^2]\\ &= 2(\mathbf m^2 +\mathbf k - \mathbf m^2)\\ &= 2\mathbf k. \end{align}