How to determine the expectation of the square of a binomial collection

345 Views Asked by At

I'm trying to find how to express the expectation of the square of a collection of binomial measurements. If we have a collection:

$$A = a_1 + a_2 + \cdots + a_n$$

The expectation of $A$ is the sum of the expectations of each term of $A$. However, for the square of $A$, I'm getting stuck on how $np +(n^2-n)p^2$ is derived. Without any background in number theory, I'm trying to find it as follows, assuming a set of three trials in $A$:

$$E(A^2) = E((a_1 + a_2 + a_3)(a_1 + a_2 + a_3))$$ $$E(A^2) = E(a_1a_1 + a_1a_2 + a_1a_3 + a_2a_1 + a_2a_2 + a_2a_3 + a_3a_1 + a_3a_2 + a_3a_3)$$ $$E(A^2) = E(a_1a_1 + a_2a_2 + a_3a_3)+ 2 E(a_1a_2 + a_1a_3 + a_2a_3))$$

...and from here it grinds to a halt. I am not sure how to evaluate these pairings, and what happens to the probabilities in each. For the final product, I get the idea that in squaring we have $n=3$ that are equal, and the remaining being the entire square of values minus these, which would be $n^2-n = 6$, but then how the probabilities are handled is not making sense. I'm not sure why the $n^2-n$ term has a squared probability when the first one has no square.

I'm hoping someone can explain this in basic terms.

1

There are 1 best solutions below

2
On BEST ANSWER

Your $a_i$ are Bernoulli random variables, $1$ with probability $p$ and $0$ with probability $1-p$. Let us work with your concrete $n=3$ example.

Note that if $i\ne j$, then by independence $E(a_ia_j)=E(a_i)E(a_j)=p^2$.

As to the $a_i^2$, note that $a_i^2=a_i$, so $E(a_i^2)=p$.

Thus in your example we get $$E(a_1+a_2+a_3)^2=3p +6p^2.$$ This is consistent with the formula $E((a_1+\cdots+a_n)^2)=np+(n^2-n)p^2$. The same argument will work in general.