How to distribute identical balls in different boxes?

244 Views Asked by At

600 identical balls must be randomly distributed into 6 numbered boxes. What is the probability of exactly 300 balls ending up in the first three boxes? Note that all balls must be distributed but boxes can be empty.

I think I have solved it but I don't know if it is right since the way I solved it looks wrong, but let me explain how I did it. So what we have here is combinations with repetitions, we have 600 to distribute in 6 different boxes and we can put as many balls as we want in Box 1 but the criteria we have is that exactly 300 should be in the first 3 boxes. Totally we have C(6+600-1,600-1). Step 2: How many ways can we divide 300 balls in the first 3 boxes, C(3+300-1, 300-1). In how many ways can we divide 300 balls in the last 3 boxes, C(3+300-1, 300-1). We use multiplication principle and then just divide favorable outcomes by the total number of outcomes ? Is it right?

1

There are 1 best solutions below

1
On

I agree with lulu, user2661923 and N.F.Taussig that you can treat the balls as numbered and use the binomial distribution. Thus, the answer is $\binom{600}{300}(\frac12)^{600} \approx 0.0325599$

A Monte Carlo simulation (see python 3 code below) gives: $0.03256$

import random, math
successes=0
numtries=100000
for tries in range(numtries):
    boxes=[0,0,0,0,0,0]
    for boll in range(600):
        boxes[random.randrange(6)]+=1
    if(boxes[0]+boxes[1]+boxes[2] == 300):
        successes+=1
print("Monte Carlo:", successes/numtries)
print("Exact:", math.comb(600,300)*0.5**600)