# How to solve using random variables

Eighteen balls are placed at random in seven boxes that are labeled $B_1 , . . . , B_7$ . Find the probability that boxes with labels $B_1 , B_2$ and $B_3$ all together contain six balls.

I solved the problem using generation functions.

A: no of cases 6 balls can be placed in 3 boxes.

coefficient of $x^6$ in $(1+x+x^2+\dots)(1+x+x^2+\dots)(1+x+x^2+\dots)$

coefficient of $x^6$ in $(1-x)^{-3}$ equals to $\binom{8}{6}$ = 28

B: no of cases 12 balls can be placed in 4 boxes.

same way we can get $N(B)=\binom{15}{3}=420$

C: no of cases 18 balls can be placed in 7 boxes.

we can get $\binom{24}{18}$

final answer of question will be$\frac{N(A)N(B)}{N(C)}$

I want do same problem using random variables but I am not getting how to solve using random variables.

-

We need to make a probability model of the situation. Assume that balls are placed one at a time, with all boxes equally likely, and that the placements are independent.

Call a placement of a particular ball a success if the ball ends up in $B_1$, $B_2$, or $B_3$. The probability of success is $\dfrac{3}{7}$.

We want the probability of exactly $6$ successes in $18$ trials. This is a straight binomial distribution problem. The required probability is $$\binom{18}{6}\left(\frac{3}{7}\right)^6 \left(\frac{4}{7}\right)^{12}.$$

Remark: We get a different answer if we assume instead that all $7$-tuples $(x_1,\dots,x_7)$ such that $x_1+\cdots+x_7=18$ are equally likely. But that assumption, unless explicitly specified in the problem, is not a reasonable one.

-
answers are different because you assumed balls to be same and I have assumed balls are different??? – TLE Mar 28 '13 at 16:40
The balls are different, each has an identity label. It makes no difference. The assumptions about how the balls are placed in the boxes are given at the beginning of the answer. If that is also the model you have in mind, then no answer numerically different from the binomial one is correct. – André Nicolas Mar 28 '13 at 17:07
I am confused What are the differences in answers ??(using generating function I have assumed that balls are Identical) – TLE Mar 28 '13 at 17:20
You have assumed that the $\binom{24}{18}$ ways of placing balls in boxes are equally likely. For the model I described, that is false. Everybody in Box 1 is much less likely than a more even distribution. – André Nicolas Mar 28 '13 at 17:24
In model I described, balls are Identical and boxes are different. In model you described, balls are different and boxes are also different.Is it correct ??? – TLE Mar 28 '13 at 17:36