7

so I'm trying to use the equation: $Var(X) = E[X^2] - (E[x])^2$, And for the $E[X^2]$ part, I'm trying to use the method of indicators... However, when I do that, I get the same value as with $E[X]$... Is it wrong to try to use the method of indicators for this case? Basically, I end up with $Var(X) = np(1-np)$, when it should be $Var(X) = np(1-p)$.

Amzoti
  • 56,093
Joy
  • 73

1 Answers1

16

The method of indicators works well here. Let $X_i=1$ if we have a success on the $i$-th trial, and $0$ otherwise.

Then $X=X_1+X_2+\cdots+X_n$. Expand $(X_1+X_2+\cdots+X_n)^2$. We find that $$X^2=\sum_1^n X_i^2+2\sum_{i\lt j}X_iX_j.$$

Calculate the expectation, using linearity. Each $X_i^2$ has expectation $p$, since $X_i^2=X_i$. Thus $E(\sum_1^n X_i^2)=np$.

By independence, if $i\ne j$, $E(X_i X_j)=E(X_i)E(X_j)=p^2$.

Now count. The number of pairs $(i,j)$ with $i\lt j$ is $\binom{n}{2}$. So we get $$E(X^2)=np +n(n-1)p^2.$$
But $(E(X))^2=n^2p^2$. Thus $E(X^2)-(E(X))^2=np-np^2$. This simplifies to $np(1-p)$.

André Nicolas
  • 507,029
  • You are welcome. The evaluation of $E(X_iX_j)$ comes up fairly often when we use the method of indicator functions. In this case, things were simple, because of independence. However, there are plenty of situations (a simple example is the hypergeometric) where independence fails, but $E(X_iX_j)$ is accessible. – André Nicolas Mar 06 '13 at 06:57