Variance Definition: question on expansion

36 Views Asked by At

Wiki defines variance as follows. I have a question on the expansion which I will point out.

$$ Var(X) = E[(X - E[X])^2] = E[X^2 - 2XE[X] + E[X]^2] $$

I'm assuming $E[X - Y] = E[X] - E[Y]$ applies next. Is this true? Also, does anyone know how $-2E[X]E[X]$ is derived in the next term?

$$ Var(X) = E[X^2] - 2E[X]E[X] + E[X]^2 = E[X^2] - E[X]^2 $$

2

There are 2 best solutions below

0
On BEST ANSWER

$\def\E{\operatorname{\mathsf E}}$When $c$ is a constant $\E(c X)=c\E(X)$. Well, $\E(X)$ is a constant so $\E\bigl(\E(X)X\bigr)=\E(X)\E\bigl(X\bigr)$.

Similarly $\E(\E(X)^2)=\E(X^2)$ because $\E(X^2)$ is a constant and of course when $c$ is a constant, then $\E(c)=c$.

$$\begin{align} \E\big((X-\E(X))^2\big) &= \E\bigl(X^2-2\E(X)X+\E(X)^2\bigr) \\ &=\E(X^2)-\E\bigl(2\E(X)X\bigr)+\E(\E(X)^2) \\ &=\E(X^2)-2\E(X)\E(X)+\E(X)^2 \\ &=\E(X^2)-2\E(X)^2+\E(X)^2 \\ &=\E(X^2)-\E(X)^2 \end{align}$$

1
On

Hint : with the equality you pointed out you can 'split' the expected value. For the derivation instead, remember that $E[X]$ is a number; what is then $E[2XE[X]]$?