Originally Posted by

**Ridley** Four balls are randomly, and independent from each other, placed in one out of N boxes (there may be more than one ball in a single box). The boxes are then searched in order from 1 to N. Let X be the number of boxes that have to be searched before all balls are found. Find the probability mass function for X.

If $\displaystyle X_i$ is the number of boxes that have to be searched to find one of the balls, then I figured that $\displaystyle X = max(X_1, X_2, X_3, X_4)$ is the number of boxes you need to search to find all of them. That gives us the following distribution for X: $\displaystyle F_X(x) = F_{X_1}(x) F_{X_2}(x) F_{X_3}(x) F_{X_4}(x)=F_{X_1}(x)^4$.

I thought that the PMF for one ball would be $\displaystyle Pr(X=k)=(1-p)^{k-1}p$, but this is not giving me the right result (using p = 1/N).

EDIT: The PMF for one ball is of course $\displaystyle p_X(k)=1/N$ for $\displaystyle k=1,2,...,N$ since all the boxes have the same probability of having the ball in them.

The PMF can then be found like this: $\displaystyle p_X(k)=F_X(k)-F_X(k-1)$ for $\displaystyle k=1,2,...,N$