In reality, I want to find the probability that at least one bucket is empty. But I'm not sure whether it is easier to calculate that or do 1 - P(every bucket has a ball in it).
Asked
Active
Viewed 244 times
0
-
Does this answer your question? https://math.stackexchange.com/questions/174674/if-n-balls-are-thrown-into-k-bins-what-is-the-probability-that-every-bin-gets-a?rq=1 – Andreas Lenz Oct 23 '21 at 21:10
2 Answers
0
This might work.
Each of N balls may be be placed into 1 of M buckets, that gives $M^N$ possibilities.
There are $\frac{(N-1)!}{(M-1)!(N-M)!}$ ways of adding up the contents of the M buckets, none of which are allowed to be empty.
So $P=1-\frac{(N-1)!}{(M-1)!(N-M)!M^N}$

TurlocTheRed
- 5,683
-
I believe you are mixing up the entities you are counting. For $M^N$ you are caring about which ball goes in which bin. For your second expression however you only care how many balls go in which bins. Also, your result seems to be wrong for, e.g., $M=N$ or $N = M+1$. – Andreas Lenz Oct 23 '21 at 21:17
0
I don't think this problem has an easy solution. Let $A$ be the event that there are no empty cells. Consider the following cases:
- N = M: There are $M^M$ total ways to distribute the balls to the cells. There are $M!$ ways to distribute the balls such that there are no empty cells. Thus,
$\quad \quad P(A) = \frac{M!}{M^M}$.
- N = M+1: There are $M^{M+1}$ total ways to distribute the balls to the cells. There are $\binom{M+1}{2}$ ways to pick the two balls that will occupy the same cell and $M!$ ways to rearrange a given arrangement with no empty cells. Thus,
$\quad \quad P(A) = \frac{\binom{M+1}{2} \; M!}{M^{M+1}}$.
- N = M+2: There are $M^{M+2}$ total ways to distribute the balls to the cells. Here, there are two ways to get no empty cells; a) one cell has 3 balls or b) two cells each have two balls. For a) There are $\binom{M+2}{3}$ ways to pick the three balls that will occupy the same cell and $M!$ ways to rearrange a given arrangement with no empty cells. For b) there are $\binom{M+2}{2} \; \binom{M}{2} \; \frac{1}{2}$ ways to choose the two balls for the two cells without order ($\frac{1}{2}$ takes care of order) and $M!$ ways to rearrange a given arrangement with no empty cells. Thus,
$\quad \quad P(A) = \frac{M! \; [ \binom{M+2}{3} + \binom{M+2}{2} \; \binom{M}{2} \; \frac{1}{2} ]}{M^{M+2}}$.
etc.
Maybe there's a general formula for any $N (> M)$ to calculate $P(A)$, but i don't know what it is.

DrBenway
- 161