linearity of expectations and squared sums

499 Views Asked by At

can we apply linearity of expectations to $E[(X-Y)^2]$ if we do not know that X and Y are independent?

such that $E[(X-Y)^2]=(E[X]-E[Y]))^2$ ?

2

There are 2 best solutions below

0
On BEST ANSWER

No, we cannot apply the linearity of expectations because $f(x)=x^2$ is not a linear function. Squaring the difference and using the linearity of expectations leads to $$ \operatorname E[(X-Y)^2]=\operatorname E[(X^2-2XY+Y^2)]=\operatorname EX^2-2\operatorname E[XY]+\operatorname EY^2. $$ If $X$ and $Y$ are independent, then $\operatorname E[XY]=\operatorname EX\operatorname EY$ and hence $$ \operatorname E[(X-Y)^2]=\operatorname EX^2-2\operatorname EX\operatorname EY+\operatorname EY^2=(\operatorname EX-\operatorname EY)^2. $$ However, if $X$ and $Y$ are correlated, then $\operatorname E[XY]$ is not necessarily equal to $\operatorname EX\operatorname EY$.

0
On

Since $(X-Y)^2 = X^2 -2XY +Y^2$, we have that $$E[(X-Y)^2] = E[X^2] -2E[XY] +E[Y^2]$$ by linearity of expectation.

If $X$ and $Y$ are independent random variables, then $$E[(X-Y)^2] = E[X^2] -2E[X]E[Y] + E[Y^2].$$