Why does variance come out to be negative in this case?

66 Views Asked by At

Suppose a coin turns out Heads with probability $0.52$ and Tails with probability $0.48$. If it turns out to be heads, the person gets $ \$ 0.011928$ and if it comes Tails, the person loses $ \$ 0.01005$. Calculate the variance of the amount received by him if the coin is tossed $1000$ times.


Define

$$X = X_1 + \cdots + X_{1000}$$

where each $X_i = 0.011928$ with probability $0.52$ and $-0.01005$ with probability $0.48$

$$ \mathbb E[X] = \sum_{i=1} ^{1000} \mathbb E[X_i] = 1000 \times ( 0.011928 \times 0.52 - 0.01005 \times 0.48 ) = 1.37856 $$

$$\mathbb E[X^2] = 1000 \times ( 0.011928^2 \times 0.52 + 0.01005^2 \times 0.48 ) = 0.122465$$

Now,

$$\mbox{Var}(X) = \mathbb E[X^2] - (\mathbb E[X])^2 < 0$$

What could be the error I am making?

1

There are 1 best solutions below

0
On BEST ANSWER

The square of a sum is not equal to a sum of squares. Therefore you cannot use linearity the way you attempted. $$\mathsf E((\sum_i X_i)^2)\neq \sum_i\mathsf E(X_i^2)$$

Rather use the bilinearity of covariance, and that the indicator variables are independent and identically distributed:$$\begin{align}\mathsf{Var}(\sum_{i} X_i) &=\mathsf{Cov}(\sum_{i} X_i, \sum_{j} X_j)\\&= \sum_{i,j~:~i=j}\mathsf{Cov}(X_i,X_j)+\sum_{i,j~:~i\neq j}\mathsf{Cov}(X_i,X_j)\\&~~\vdots\end{align}$$