PaC Exercise 3.5
Posted on February 20, 2021
Given any two random variables X and Y, by the linearity of expectations we have E[X − Y] = E[X] − E[Y]. Prove that, when X and Y are independent Var(X − Y) = Var(X) + Var(Y).
Solution:
$$
\begin{align*}
\mathrm{Var}(X-Y)
&= E[(X-Y)^2] - E[X-Y]^2\\
&= E[X^2 - 2XY + Y^2] - (E[X] - E[Y])^2\\
&= E[X^2] - 2 E[X]\cdot E[Y] - E[Y^2] - (E[X]^2 - 2 E[X]\cdot E[Y] + E[Y]^2)\\
&= E[X^2] - E[X]^2 + E[Y^2] - E[Y]^2\\
&= \mathrm{Var}(x) + \mathrm{Var}(Y)
\end{align*}
$$