Birthday problem with limited bucket size

birthdaycombinatoricsprobability

Let's say there are 1095 balls, 23 of them are black. Randomly assign each ball into 365 buckets, each has a maximum capacity of 3 balls. What is the probability of at least one bucket having at least 2 black balls?

Initially I thought the order does not matter, so we can imagine assigning the black balls to the buckets first. This will give probability of 0.5, just like the birthday problem.
Then I think this is incorrect, as the bucket size is limited, the order of assignment actually matters. We cannot assign black balls first and the other balls later.

Update:
Could the probability simply be:

Probability of at least one unlimited bucket with at least 2 black balls – probability of at least one unlimited bucket with at least 4 black balls?

(By unlimited bucket I mean bucket with no capacity limitations.)

Best Answer

Let $p(n,b)$ be the probability that with $3n$ balls of which $b$ are black and with $n$ buckets, you have no buckets with $2$ or $3$ black balls after putting $3$ balls in each bucket drawn at random without replacement from the $3n$:

Then you have $p(n,0)=p(n,1)=1$ and $p(n,b)=0$ when $b \gt n$. Otherwise I think you have $$p(n,b) = \frac{(3n-b)(3n-b-1)(3n-b-2) }{3n(3n-1)(3n-2)} p(n-1,b) +3 \frac{b(3n-b)(3n-b-1) }{3n(3n-1)(3n-2)} p(n-1,b-1)$$

so for example you get $p(2,2)=\frac35$ and $p(3,2)=\frac34$ and $p(3,3)=\frac{9}{28}$

I think you get $p(365,23) \approx 0.62176$ and so the probability you get at least one bucket with at least two black balls is about $0.37824$

Since it may be of interest, I also think $p(365,27) \approx 0.51549$ and $p(365,28) \approx 0.48943$

Related Question