A bin and balls problem

841 Views Asked by At

Throw 7 balls into 7 bins. Given there are exactly 2 empty boxes, find the probability that 1 bin contains 3 balls, and thus the other 4 bins contain 1 ball each.

I know I could use a multinomial distribution to model this problem but I'm confused on how to set it up.

EDIT 2:

So we are trying to find Pr(2 bins empty & 4 bins have 1 ball each & 1 bin has 3 balls)/ Pr(2 bins are empty).

Pr(2 bins empty) = $7 \choose 2$ $(5/7)(4/7)(3/7)(2/7)(1/7)(5/7)^2$.

Pr(2 bins empty & 4 bins have 1 ball each & 1 bin has 3 balls) = $7 \choose 4$ $3 \choose 2$ $(4/7)(3/7)(2/7)(1/7)(1/7)^3$

Is this reasoning right?

2

There are 2 best solutions below

4
On

Hint: you can ignore the empty bins. How many ways are there to distribute the balls into $5$ bins? I find this one easier if we think the bins and balls are labeled-this is not specified. Then you choose which bin will get the three balls, which three go in that bin, and the arrangement of the other four. How many ways for each of those steps?

0
On

From the problem statement, one must treat the balls and bins as labelled (our configurations are maps from balls to bins).

The main difficulty in this problem is counting the number ways to get exactly two empty boxes. Since this is about probability, one can simplify by supposing the set of five non-empty bins fixed (the given probability will not depend on which set of five bins this is). So we are given that one of $5$ bins is assigned to each of the $7$ balls, in a surjective way (every bin is used at least once), and within this set we must count the fraction that uses one of the bins three times.

The $5!=120$ permutations of the bins applied to any assignment will always produce $120$ distinct surjective maps (since bins contain disjoint sets of balls, two of them could only contain the same set of balls in the initial assignment if the set were empty, but this does not occur). As this applies both to the set of all surjective maps and to the subset of interest, we may divide out these factors $120$ and consider the bins as unlabelled. Configurations are now determined by the partition of the set of balls into $5$ non-empty sets, and among those we want to count the ones of type $(3,1,1,1,1)$. For the latter there are $\tbinom73=35$ possibilities, determined by the part formed by the $3$ balls. The total number of partitions of our $7$ balls into $5$ non-empty sets is $\genfrac\{\}0{}75=140$, a Stirling number of the second kind. The probability becomes $140/35=1/4$. I think the simplification of the fraction is more or less an accident (although the common prime factor $7$ in numerator and denominator can be explained); the use of Stirling numbers seems unavoidable.

I have avoided computing the number of maps that leave exactly two bins empty. However it can be easily deduced from the above that this number is $\binom75\genfrac\{\}0{}755!$, and the fraction among all maps is $$ \frac{\binom75\genfrac\{\}0{}755!}{7^7}=\frac{35\times140\times120}{7^7} =\frac{5\times20\times120}{7^5}=\frac{12000}{16807}\approx0.7139882. $$