TITLE: If I put $M$ balls into $N$ boxes at random, what is the average number of balls in the boxes that are not empty?
QUESTION [6 upvotes]: I have a very brief question: if I put $M$ balls into $N$ boxes at random, what is the average number of balls in the boxes that are not empty?

REPLY [6 votes]: Let $A$ be the number of non-empty boxes. Then the average number of balls in each box=$\displaystyle{\frac{M}{A}}$. 
In random distribution, the value of $A$ may vary. 
Probability of $A$ boxes being selected= $\displaystyle{\frac{\binom{N}{A}}{\binom{N}{1}+\binom{N}{2}+\dots \binom{N}{M}}}$
Hence, expected value of average=$\displaystyle{\sum_{A=1}^{M} \frac{M}{A}.{\frac{\binom{N}{A}}{\binom{N}{1}+\binom{N}{2}+\dots \binom{N}{M}}}}$