[Math] Probability for twelve dice

diceprobability

In 'An Introduction to Probability Theory and Applications' by W. Feller I encountered this apparently innocuous problem.

A throw of twelve dice can result in
$6^{12}$ different outcomes, to all of
which we attribute equal
probabilities. The event that each
face appears twice can occur in as
many ways as twelve dice can be
arranged in six groups of two each.
Hence the probability of the event is
$\displaystyle \frac{12!}{2^{6}6^{12}}=0.003438$.

The reasoning is that by doing that you're grouping two 1's, two 2's, …, two 6's (each group using one partition in the multinomial) and the result is the number of different partitions that can be found with that particular characteristic. However, I had doubts about that answer. To understand better that problem, I did a simpler example with $4$ dice instead of $12$ (in this case, the event is the number of ways in which two faces appear twice).

Using the same result I get as the probability $\displaystyle \frac{4!}{2^{2}6^{4}}=$ 0.46 $0.0046$. Then, to see if that's true I ran a little simulation of this case in Mathematica:

dice = Table[Table[Random[Integer, {1, 6}], {i, 1, 4}], 
{j, 1, 1000000}]; i=0;
f[{a_, b_, c_, d_}] := Which[a === b && c === d && a != c, 
i++, a === c && b === d && a != b, 
i++, a === d && b === c && a != b, i++;];
Map[f, dice, {1}];

After $1000000$ steps I got $69687$ cases in which two faces appear twice. This is equivalent to a probability of $0.069687$. Far smaller than what I expected based on the calculation above.

Since this latter example is much more manageable than the one with twelve dice, I did the following

With four dice we have the following:

  1. Partition $r_{1}$ contains the first and second dice and partition $r_{2}$ contains the third and fourth dice.
  2. Partition $r_{1}$ contains the second and fourth dice and partition $r_{2}$ contains the first and fourth third.
  3. Partition $r_{1}$ contains the first and fourth dice and partition $r_{2}$ contains the second and third dice.
  4. Partition $r_{2}$ contains the first and second dice and partition $r_{1}$ contains the third and fourth dice.
  5. Partition $r_{2}$ contains the second and fourth dice and partition $r_{1}$ contains the first and fourth third.
  6. Partition $r_{2}$ contains the first and fourth dice and partition $r_{1}$ contains the second and third dice.

For each case, we can have $30$ outcomes in which two faces appear two times. For example, for the first case we have $1122, 1133, 1144, 1 155, 1166, 2211, 2233, 2244,2255, 2266,… 6611, 6622, 6633, 6644, 6655$. However, such outcomes are repeated twice (particularly, the outcomes of case 1 repeat the outcomes of case 4, etc). Therefore, the number of different outcomes which produce two faces appearing two times are $\frac{6}{2}6*5=90$. Since there are $6^{4}$ outcomes, we have a probability of $\frac{90}{6^{4}}=0.0694444$, which is the result that produces the simulation in Mathematica.

Is it wrong the first reasoning? If so, is there a general approach to use the multinomial coefficient to solve this kind of problems. For instance, it appears that this only happens for $r_{1}=r_{2}=r_{k}$. Otherwise, there are not repeated outcomes.

Best Answer

There are two things going on here. First, $\displaystyle \frac{4!}{2^{2}6^{4}}$ is about $0.0046$, not $0.46$.

Second, the problem described by Feller and your simplification to four dice are not the same problem. Feller's problem requires that each face appear twice. Your four-dice problem requires that $some$ two faces appear twice. There's only one way that Feller's event can be satisfied; namely, that each of 1, 2, 3, 4, 5, and 6 appear exactly twice. There are many more ways that some two faces could appear twice. For instance, you could have two 1's and two 2's, two 1's and two 3's, etc. In fact, there are $\binom{6}{2} = 15$ different ways to choose the two faces that will appear.

And that solves your problem. Taking the correct result from Feller, $\displaystyle \frac{4!}{2^{2}6^{4}} \approx 0.0046$, and multiplying it by the $15$ different ways to choose the faces gives $\displaystyle \frac{90}{6^4} \approx 0.0694444$.


With respect to your question about the multinomial coefficient, $\displaystyle \binom{n}{k_1, k_2, \ldots, k_m}$ calculates the number of ways to partition a set of $n$ items into $m$ groups with $k_1$ items in the first group, $k_2$ items in the second group, and so forth. So in Feller's problem $\displaystyle \binom{12}{2, 2, 2, 2, 2, 2}$ is calculating the number of ways to put two dice in the 1's group, two dice in the 2's group, and so forth.

In the four-dice problem you describe, you haven't specified a particular partition of dice into groups; there are several partitions that will satisfy "two faces appearing twice." So, in the four-dice problem, $\displaystyle \binom{4}{2, 2}$ counts the number of ways to put two dice in a 1's group and two dice in a 2's group. It also counts the number of ways to put two dice in a 1's group and two dice in a 3's group, and it counts the number of ways to put two dice in a 1's group and two dice in a 4's group, and so forth. So to calculate the total number of ways of obtaining "two faces appearing twice" you need to multiply $\displaystyle \binom{4}{2, 2}$ by the number of ways to pick two of the faces out of six possible faces, which is $\binom{6}{2}$. Then you mutiply by $\frac{1}{6^4}$ to get the probability you want.

If you want a general answer, the probability of throwing $n$ $d$-sided dice and having exactly $m$ faces appear $\frac{n}{m}$ times would be $$\binom{n}{m} \frac{n!}{((\frac{n}{m})!)^m d^n} .$$

Related Question