# What is the probability of having a pair of doubles when throwing dice?

What is the probability of having a double (two dice will show the same number) when we throw 5 dice (all dice have 6 sides)?

My calculations are:

Combinations(5,2)*6 / 5^6


When I try to find the probability of having a pair of doubles (two dice will show the same number and another two dice will show the same number) when we throw 5 dice, my calculations are the following:

 Combinations(5,2)*6 / 5^6 * Combinations(3,2)*6 / 5^6


Is that approach correct or I should try something else?

You can find the chance of getting a pair of doubles using combinations. Here's one way.

First, recall that a "combination" of $$n$$ things taken $$k$$ at a time is just a $$k$$-element subset of those things. The number of distinct combinations is a binomial coefficient, written (and often computed) as

$$\binom{n}{k} = \frac{n!}{(n-k)!k!}.$$

The key to this approach is to create an economical notation to describe the events of interest. To this end, note that the outcomes of $$5$$ independent rolls of a six-sided die correspond to six-element vectors whose entries count the number of appearances of each side. Specifically, when side $$i$$ appears $$n_i$$ times among those five rolls, entry $$i$$ in the vector is $$n_i.$$ For instance, if two threes appear along with one each of 1, 4, and 5, the vector would be $$(1,0,2,1,1,0).$$

Let the "pattern" of a vector be the counts of its entries. The pattern of the preceding vector is two zeros, three ones, and a two. We can write this pattern as a sequence of the counts $$2, 3, 1, 0, 0, \ldots.$$ (It's unnecessary to write the terminal zeros.)

Solve the problem in these steps.

1. Identify all patterns with two doubles. This is straightforward: they would be $$0,1,2$$ and $$0,0,1,1.$$ (What characterizes them is that these are sequences of natural numbers $$k_0, k_1, k_2, \ldots$$ for which $$\sum_{i=0}^\infty i\,k_i = 5$$ and $$\sum_{i=2}^\infty k_i \ge 2.$$ The first sum counts the dice while the second counts the outcomes appearing two or more times.)

2. Identify the number of ways each pattern could appear in a six-vector.

• The pattern $$0,1,2$$ picks out two outcomes having doubles and, among the remaining $$6-2 = 4$$ outcomes, it picks out one more possibility. There are $$\binom{6}{2}=15$$ in the first case and $$\binom{6-2}{1}=4$$ in the other for a total of $$15\times 4 = 60$$ possibilities.

• The pattern $$0,0,1,1$$ picks out one outcome with a double and another with a triple. There are $$\binom{6}{1}=6$$ ways for the first to occur and then $$\binom{6-1}{1}=5$$ more ways for the other to occur, for a total of $$6\times 5 = 30$$ possibilities.

3. Compute the chances of all these possible six-vectors $$\mathbf n.$$ They are given by the multinomial coefficients $$\binom{5}{\mathbf n} = \frac{5!}{n_1!n_2!\cdots n_6!},$$ each multiplied by the chance of any individual outcome; namely, $$6^{-5}.$$ Since these multinomial coefficients don't change when the elements of $$\mathbb n$$ are reordered, they depend only on the patterns, so there are only two values to work out: $$\binom{5}{(2,2,1,0,0,0)} = \frac{5!}{2!2!1!} = 30$$ and $$\binom{5}{(3,2,0,0,0,0)} = \frac{5!}{3!2!}=10.$$ (For convenience we usually don't write the zeros in the multinomial notation.)

4. Add the chances. We obtain \eqalign{\left(\binom{5}{(2,2,1)} \binom{6}{2} \binom{6-2}{1} + \binom{5}{(3,2)} \binom{6}{1}\binom{6-1}{1} \right)6^{-5} &= \frac{30(15)(4) + 10(6)(5)}{6^5} \\&= \frac{2100}{7776}.}

I have written the formulas in a way that suggests how they generalize to different patterns for different numbers of rolls for arbitrary-sided dice. Step 1 is the hard part in general: the rest are just straightforward calculation. Solving step 1 amounts to finding partitions with certain properties. This is a rich combinatorial subject but its analysis requires more advanced mathematics.

• Concerning my other question at stats.stackexchange.com/questions/455889/… , step 1 seems near impossible. I found a Python script to simulate possible ways to do it, but my "die count" is very high,. 99 nine-sided dice, and I'm looking for every possible way to roll 2 or more of any number. Step 1 is pretty much impossible with these options. Mar 31, 2020 at 16:41
• @Sumner That's right--it's an indication you should be looking for asymptotic approximations rather than an exact answer. One issue is how accurate do you need such an approximation to be?
– whuber
Mar 31, 2020 at 17:55
• In my industry, we usually need accuracy to the 3rd decimal place. Sometimes the 4th Mar 31, 2020 at 20:11

I am not exactly sure about your approach, but here you have a simple one:

After 1 di is rolled, no repeats are possible. After 2 dice are rolled, there is a $$\frac{5}{6}$$ chance of both dice showing a different number After 3, there is a $$\frac{5}{6} \frac{4}{6}$$ (the $$\frac{5}{6}$$ we had before, times the chance ofthe third di being igual to either the first or the second (in case the other two are different)

It is not hard see that the general ansewr for $$k$$ dice rolled is $$\frac{6!}{(6-k)! \cdot6^k}$$ (if you don't see why, put a $$\frac{6}{6}$$ into everything we said before. This works for $$k \leq 6$$ as for higher values of $$k$$ the ansswer is obviously $$0$$ Note that for $$k=6$$, we get the answer $$\frac{6!}{6^k}$$, which is the number of ways to sort 6 different dice divided by the total number of 6-dice roll results.

NOTE: Unfortunatelly, I am not sure about how this way of reasoning can result in an easy formula for a two-pair, as there would be quite a few cases to consider

• The first question has been answered in many places elsewhere on this site: see stats.stackexchange.com/search?q=birthday+problem for some of them. Thus, the part that is on topic is the second question.
– whuber
May 28, 2019 at 17:04
• Thank you, @whuber for helping us get closer to the answer May 28, 2019 at 17:43