Expected number of boxes that have no balls

probability

Suppose $M$ balls are to be put in $N$ boxes where $M > N$, each ball being independently put in box $i$ with probability $p_i$ and $\sum_{i=1}^Np_i = 1$.

What is the expected number of boxes that have no balls? How about the one that have exactly $k$ balls where $0 < k \leq M$?

Try.

First, I say let $X$ be the number of boxes with no balls. We see that $X$ is a r.v that can take values ranging from $0$ up to $N-1$. So we want to find

$$ E(X) = \sum_{i=1}^{N-1} i P(X=i ) $$

We start with $P(X=0)$ which is the probability that all $M$ balls are put into the $N$ boxes. Well, this is done in ${M \choose N}$ ways. Similarly, $P(X=1) = {M \choose N-1} $ and in general $P(X=i) = {M \choose N-i } $. so,

$$ E(X) = \sum_{i=1}^{N-1} i {M \choose N-i} $$

But, I do not think there is a closed form solution for this. Now, is this correct?

For the case where we want exactly boxes with $k$ balls, we can now call new random variable $Y$ to be the number of boxes with exactly $k$ balls. In this case, $P(x=0) = {M \choose N-1}$ just as before, but $P(X=1)$ is the probability of 1 box with $k$ balls and $N-1$ boxes with $M-k$ balls and so $P(X=1) = {M – k \choose N-1} $ and so $P(X=i) = {M -k \choose n -k }$? Is this correct?

Best Answer

Your counting approach leads nowhere. First, your formulas for, say $P(X=1)$ give a number bigger than one (impossible). I guess you forgot to divide by the total configurations. But (second) even with that correction it would still be wrong, because the configurations a not equiprobable (you are forgetting that your are given arbitrary $p_i$). Third, even if the probabilities were equal, that's not the way, computing all the probabilities is too complicated.

Hint. Call $X_i$ the indicator variable of the event "the box $i$ is empty", note that $X = \sum X_i$ and take advantage of linearity of expectation.

Related Question