# Distribution of n balls into M boxes

Three balls are randomly placed in three empty boxes $\{B_1,B_2,B_3\}$. Let $N$ denote the total number boxes which are occupied and let $X_i$ denote the number of balls in the box $B_i$ where $i\in \{1,2,3\}$

Find the joint p.m.f. of $(N,X_1)$

Should the answer depend on whether the balls are alike or different ? What should be the answer. ?

• Doesn't matter if the balls are alike, you are only asked about their numbers. As to the problem, just go case by case. If, say, $N=3$, then what can you say about $X_1$? – lulu Mar 30 '16 at 13:29

In case of the more likely intended meaning, where each ball is equally likely to be placed in any given box, there are $3^3=27$ possible placements, and for each pair of $N$ and $X_1$ you can count how many of them yield those values to arrive at the following joint probability mass function (multiplied by $27$ to avoid fractions):
For example, for $N=2$ and $X_1=2$, there are $2$ choices for the box that contains the third ball and $3$ choices for which ball that is, for a total of $3\cdot2=6$ possibilities.
• @sniperykc: You tell me. As I said, the problem isn't well-defined because you didn't specify a distribution. Usually, though, one thinks of putting balls into boxes in a way such that each ball goes into each box with the same probability. In that case, the answer is no, the $10$ cases you're thinking of are not equiprobable. You can see this immediately from the fact that in this case there are $27$ equiprobable cases and $\frac1{10}$ isn't a multiple of $\frac1{27}$. – joriki Mar 31 '16 at 18:49