5
$\begingroup$

For the below pdf, I've calculated variance by two methods and observe a large difference (2.1477 vs 2.9100). Wondering why is this difference right at the first decimal? Is it just loss of precision when we square a small difference in $E(X-E(X))^2$ compared to large squares in $EX^2$?

enter image description here

$$E(X)= 1\times 0.10 + 2\times 0.15 + .. = 3.3$$ $$Var(X)=E(X-E(X))^2 = (1-3.3)^2\times 0.10 + \\(2-3.3)^2\times 0.15 + .. = 2.1477$$

$$E(X^2)= 1^2\times 0.10 + 2^2\times 0.15 + .. = 13.8$$ $$Var(X)=E(X^2) - E(X)^2 = 13.8 - (3.3)^2 = 2.9100$$

$\endgroup$
16
$\begingroup$

Of course, they won't because the PDF/PMF example violates the basic principle: $$\sum_x P(X=x)=1$$ i.e. sum of all probabilities is not $1$. If, for example, you set $P(X=6)=0.17$, both variance calculations should match.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.