Probability: Balls in baskets

1.5k Views Asked by At

I'm self learning and I stumbled upon the following exercise but I'm not sure if I solved it correct as I'm very new to this.

Problem: 7 balls fall independently into 7 baskets. Let $X_i$ = number of baskets containing $i$ balls. What is the distribution of $X_3$?

Solution:

$A$ = $\{$ Basket contains 3 balls $\}$

$B_j$ = $\{$ A ball falls into basket $j$ $\};j=1,2...7$

$P(B_j) = \frac17$

$P(A) = \binom73 P(B_j)^3P(\overline B_j)^4 = 35\cdot \frac17^3(1-\frac17)^4 = \frac{5\cdot 6^4}{7^6}$

Is this correct so far? I was wondering whether I should multiply the above by 7 since $j$ can be positioned in 7 different combinations but I concluded that since the event $B_j$ doesn't specify that there are other baskets (can be understood as if a ball either goes into basket $j$ or not at all) so I didn't do it. Is that correct?

Now the distribution:

$P(X_3 = 0) = \binom 70 P(A)^0P(\overline A)^7$

$P(X_3 = 1) = \binom 71 P(A)^1P(\overline A)^6$

$P(X_3 = 2) = \binom 72 P(A)^2P(\overline A)^5$

$P(X_3 = 3) = \binom 73 P(A)^3P(\overline A)^4 =N/A$ since $3\cdot 3 > 7$

$P(X_3 = 4) = \binom 74 P(A)^4P(\overline A)^3 =N/A$ since $4\cdot 3 > 7$

$P(X_3 = 5) = \binom 75 P(A)^5P(\overline A)^2 =N/A$ since $5\cdot 3 > 7$

$P(X_3 = 6) = \binom 76 P(A)^6P(\overline A)^1 =N/A$ since $6\cdot 3 > 7$

$P(X_3 = 7) = \binom 77 P(A)^7P(\overline A)^0 =N/A$ since $7\cdot 3 > 7$

Is this correct?

What is the expected way to prove that from $X_3$ to $X_7$ it's N/A if this was on an exam? Do I even have to write these cases into the table?

2

There are 2 best solutions below

9
On BEST ANSWER

For $P(X_3=2),\;$ for instance there is only one possible pattern,

and we can compute number of ways as [Choose baskets for placing] $\times\;$[Place balls in baskets]

$3-3-1-0-0-0-0:\;\left[\binom72\binom51 \right] \times \frac{7!}{3!3!}=14,700$

You can similarly find out for $X_3 = 0,\;$and $\;X_3=1.\; X_3>2$ will obviously have zero ways

Finally you can complete the probability distribution by dividing by $\;7^7\;$for each case


ADDED: Patterns for other cases

$X=0$: 7-0-0-0-0-0-0 | 6-1-0-0-0-0-0 | 5-2-0-0-0-0-0 | 5-1-1-0-0-0-0 | 4-2-1-0-0-0-0 | 4-1-1-1-0-0-0 | 2-2-2-1-0-0-0 | 2-2-1-1-1-0-0 | 2-1-1-1-1-1-0 | and 1-1-1-1-1-1-1

$X=1$: 3-2-2-0-0-0-0 | 3-2-1-1-0-0-0 | and 3-1-1-1-1-0-0

PS:

As pointed out by Graham Kemp, you needn't actually compute P(X=0), instead you can find it using the complement. But if you want to be sure that you haven't made any computational error, you will need to compute it and check that the probabilities add up to $1$.

0
On

As true blue anil stated, the counting method is to count ways to sort balls into a pattern times the permutations of that pattern.

I suggest using multinomial coefficients† to ensure your counting logic matches up.   For instance: the event $X_3=2$ can be satisfied by any pattern of 3 balls in each of two boxes and one ball in another.   First we count ways to assign balls to boxes in that pattern, then ways to arrange the boxes; all divided by $7^7$.

$$\begin{align}\mathsf P(X_3=2) =&~ 7^{-7}{\tbinom{7}{3,3,1\color{silver}{,0,0,0,0}}\tbinom{7}{2,1,4}} \\[1ex] =&~ 7^{-7}\tbinom{7}{3}\tbinom{4}{3}\tbinom{7}{2}\tbinom{5}{1} \\[1ex] =&~ \tfrac{6!^2}{7^5~3!^2~2!} \end{align}$$

Note: the additional zeroes are redundant, and included only to demonstrate that the pattern contains four empty boxes.

Similarly we build the probability for $X_3=1$:

$$\begin{align} \mathsf P(X_3=1) =&~ 7^{-7}\left(\tbinom{7}{3,1,1,1,1\color{silver}{,0,0}}\tbinom{7}{1,4,2}+\tbinom{7}{3,2,1,1\color{silver}{,0,0,0}}\tbinom{7}{1,1,2,3}+\tbinom{7}{3,2,2\color{silver}{,0,0,0,0}}\tbinom{7}{1,2,4}+\tbinom{7}{3,4\color{silver}{,0,0,0,0,0}}\tbinom{7}{1,1,5}\right) \\[1ex] =&~ \tfrac{6!^2}{3!~7^5}\left(\tfrac{1}{4!~2!}+\tfrac{1}{3!~2!^2}+\tfrac{1}{2!^3~4!}+\tfrac{1}{4!~5!}\right) \end{align}$$

We could do the same for $X_3=0$, however there are many more possible patterns and it is easier to just note that it is the complement of the union of the above two events.

$$\begin{align}\mathsf P(X_3 = 0) =&~ 1-\mathsf P(X_3=1)-\mathsf P(X_3=2) \end{align}$$


† The multinomial coefficient is: $\dbinom{x+y+z+\ldots}{x,y,z,\ldots} = \dfrac{(x+y+z+\ldots)!}{x!~y!~z!~\cdots} = \dbinom{x+y+z+\ldots}{x}\dbinom{y+z+\ldots}{y}\dbinom{z+\ldots}{z}\cdots$