0

Assume that there are balls and urns. Each ball is thrown randomly into urns. What is the probability that there are not more than urns with at least one ball in it ($p(x≤r)$)? In other words, what is the probability that there are more than − empty urns?

There is a related question: $m$ balls into $n$ urns, which asks how to calculate the probability of having exactly urns with at least one ball in it ($p(x=r)$). I know we can calculate $p(x≤r)$ by simply adding up all the probabilities for 0 ... . But it will be too computational expensive if , , are large. Is there a more efficient way to calculate this. An approximation calculation would also be great ($n$ is usually >1000).

Danny
  • 3
  • It seems like this is an inclusion-exclusion sort of problem, but if you can't find a closed formula for $\sum_{i\leq r} P(X=I),$ it's not clear inclusion-exclusion is going to give you anything easier. – Thomas Andrews Nov 18 '22 at 13:30
  • The number of terms in your sum really only depends on $r,$ not $n.$ Specifically, there will be $O(r^2)$ terms. – Thomas Andrews Nov 18 '22 at 13:40
  • With a little manipulation, I get: $$\sum_{j=0}^r\binom nj\left(\frac jn\right)^m\sum_{k=0}^{r-j}(-1)^{k}\binom{n-j}{k}$$ But the inner sum is a problematic expression. – Thomas Andrews Nov 18 '22 at 13:55
  • You might be able to get an estimate, but I'd be surprised if there is a better closed formula. For $m$ much larger than $r,$ the estimate will be small - the probability for exactly $r$ will be close to the value for $\leq r$ when $m>2r$ or so. – Thomas Andrews Nov 18 '22 at 14:04
  • When $m>2r,$ $\binom nr\left(\frac rn\right)^m$ might even be a good estimate. – Thomas Andrews Nov 18 '22 at 14:10
  • 1
    @ThomasAndrews Inner sum is nice: $\sum_{k=0}^h (-1)^k\binom nk=(-1)^h\binom{n-1}h$. – Mike Earnest Nov 18 '22 at 15:58
  • @MikeEarnest Um, oops. Yep. – Thomas Andrews Nov 18 '22 at 20:48

1 Answers1

1

Using the generalised principle of inclusion exclusion, we can show that the answer is as follows: $$ \boxed{P(\text{at most $r$ urns are occupied})=\sum_{j=0}^r(-1)^{r-j}\binom{n}{j}\binom{n-j-1}{n-r-1}\left(\frac {j}n\right)^m} $$ In general, if you have $n$ events $E_1,\dots,E_n$, the probability that exactly $s$ of the events occurs is $$ P\left(\text{exactly $s$ events occur}\right)=\sum_{j=s}^n (-1)^{j-s}\binom{j}{s} \sum_{i_1<\dots<i_j}P(E_{i_1}\cap \dots \cap E_{i_j}) $$ If you take that equation and sum from $s=t$ to $n$, you get $$ P\left(\text{at least $t$ events occur}\right)=\sum_{j=t}^n(-1)^{j-t}\binom{j-1}{t-1} \sum_{i_1<\dots<i_j}P(E_{i_1}\cap \dots \cap E_{i_j}) $$ We apply this last formula in the case where $E_i$ is the event that the $i^\text{th}$ urn is empty, and where $t=n-r$. Note that $P(E_{i_1}\cap \dots \cap E_{i_j})= (\frac{n-j}n)^m$, because in order for $j$ particular urns to be empty, each ball must fall in one of the other $n-j$ urns. Therefore, all terms in the innermost sum are the same, so the innermost sum is $\binom{n}j(\frac{n-j}n)^m$. After making that replacement, and reversing the order of summation via $j\gets n-j$, we arrive at the answer promised at the top.

Mike Earnest
  • 84,902
  • Thank you so much for your answer. This calculation will be much easier and faster. – Danny Nov 19 '22 at 23:03
  • Happy to help! BTW, it is considered polite to mark an answer as accepted by clicking the green checkmark, if it indeed completely answers your question. – Mike Earnest Nov 30 '22 at 19:43