• January 12th 2010, 04:59 PM
gmatt
Its a well known fact that

Var(X) = E(X^2) - (E(X))^2

but then can you conclude:

Var(X) = E(X^2) - (E(X))^2 = E(X^2) - E( E(X) X ) (because E(X) is a scalar)
= E[X^2 - E(X) X ] = E[ X ( X - E(X) ) ]

by linearity of expectation.

but also Var(X) = E[ (X- E(X))^2 ]

Clearly I must be doing something wrong?
• January 12th 2010, 05:51 PM
matheagle
It is true that $E[ X ( X - \mu) ]=E(X^2-X\mu)=E(X^2)-\mu^2=V(X)$

It's just like $\sum_{i=1}^n(x_i-\bar x)(y_i-\bar y) =\sum_{i=1}^nx_i(y_i-\bar y)=\sum_{i=1}^n(x_i-\bar x)y_i$