Randomly assigning balls to boxes

combinatoricsprobability

Suppose I have $n$ boxes, and $n^2$ balls, of which $b$ are colored blue. Each box has a capacity of holding $n$ balls. If I randomly assign balls to boxes until all the balls are placed, what is the probability that each box has at least one blue ball?

I've been working on this for small cases. Suppose $n = b = 3$. There should be ${9}\choose{3}$ ways to place the blue balls, and $3^3$ of these will result in one in each box, so the probability is $\frac{27}{84}$. If I add a fourth blue ball I see 6 places it could go, but if there are 2 blue balls in the same box, that would give me some overcounting, so I end up with $3^4$ ways to get at least one blue in each box. For 5 balls I brute-forced it, and ended up with $\frac{3^3\cdot 4}{{9}\choose{5}}$ for the probability. I haven't been able to come up with a good counting scheme to explain why this is true, and am unable to generalize.

Best Answer

Number the boxes and for $i=1,\dots, n$ let $E_i$ be the event that box $i$ does not contain a blue ball.

Then with inclusion/exclusion and symmetry we find: $$1-P\left(\bigcup_{i=1}^{n}E_{i}\right)=\sum_{k=0}^{n}\binom{n}{k}\left(-1\right)^{k}P\left(\bigcap_{i=1}^{k}E_{i}\right)=\binom{n^{2}}{b}^{-1}\sum_{k=0}^{n}\binom{n}{k}\left(-1\right)^{k}\binom{n\left(n-k\right)}{b}$$

This under the conventions that $\binom{r}{s}=0$ if $s\notin\{0,1,\dots,r\}$ and $\cap\varnothing=\Omega$ (so that $P(\cap\varnothing)=1$).

Related Question