# Binomial distribution for dependent trials?

Imagine a bag has some balls, some blue some red. Lets say there are 50 balls. 5 are red and 45 are blue. I have 4 bins, and am going to randomly pick balls out of the bag and put them into the bins until i have filled each bin with 5 balls. I want to know the probability that exactly 3 out of the 4 bins have at least one red ball, and the other bin has all blue balls. How can I find this probability?

I thought about using a binomial distribution, where the probability of success is the probability of a bin having at least one red. However, this probability will not be constant over the different trials as there is no ball replacement. Once a ball is taken out of the bag to fill a bin, it is not put back.

• Are you interested in the example you state, or in a general formula? For the example I recommend you are drawing a decision tree. The first bin can have either 0, 1, 2, or 3 red ball. ... – Semoi May 2 '18 at 21:09
• I'm interested in a general formula where the number of balls in the bag could change, the number of red balls could change, the total number of bins could change (4), the number of bins with red balls could change (3), etc. What will stay constant is that im always interested in at least one red ball. It will never be at least 2 or at least 3 etc. – gonzaleznicolas May 2 '18 at 21:13
• Hypergeometric distribution is related, yet you seem to be asking about something tailor-made en.wikipedia.org/wiki/Hypergeometric_distribution – Tim May 3 '18 at 10:46
• Your process is not completely defined. When you have drawn a ball, how do you decide into which bin to put it? First 5 into bin 1, ... or some other way? – kjetil b halvorsen May 3 '18 at 12:46
• Yes. First 5 into bin 1, next 5 into bin 2, etc – gonzaleznicolas May 3 '18 at 15:23