# Probability with n dice

I'm studying probability and am currently stuck on this question:

Let's say we have n distinct dice, each of which is fair and 6-sided. If all of these dice are rolled, what is the probability that there is at least one pair that sums up to 7?

I interpreted the above as being equivalent to the following:

1 - (Probability that there is no pair that sums up to 7)

So if I were to consider just one pair of dice, then the probability that the pair adds up to 7 is 1/6, I think?

So Pr(one pair doesn't add up to 7) = 5/6.

But then I'm stuck on how to proceed. Because there are lots of possible pairs amongst the n die, and some of these pairs overlap...for example, (die1, die2) is a pair, (die1, die3) is a pair, and so on. So I don't know how to account for these overlaps.

$$===============================================$$ EDIT: As per John's response below, here is my attempt:

Case 1:

Probability(all n die show a single number) = $1*(\frac{1}{6})^{n-1}$? Is this right? My thinking is that the first die can show any number (probability = 1), then the second thru last die must show the same number (probability = 1/6)

Case 2:

Probability(all n die show exactly two numbers that don't add up to 7) = $1*(\frac{4}{6})*(\frac{2}{6})^{n-2}$? My thinking here is that the first die can show any number, the second die must show any of the 4 other numbers such that the first two die won't add up to 7, and then all other die must show either the first or the second die's number.

Case 3:

Probability(all n die show exactly three numbers that don't add up to 7) = $1 * \frac{4}{6} * \frac{1}{6} * (\frac{3}{6})^{n-3}$?

And then do we just add all of the 3 cases together, then subtract from 1? I might be way off here...

• This looks reasonable to me.
– John
Apr 26, 2016 at 17:33

You're on the right track. I'll suggest a way forward.

In order to have a pair that adds to $7$, you need:

• at least one $1$ and one $6$, or
• at least one $2$ and one $5$, or
• at least one $3$ and one $4$.

This means that the dice can have at most three different numbers showing. If there are four, you must have a pair (pigeonhole principle).

So, break down the cases:

• One number showing (all $5$'s, for example)
• Two numbers showing (all $1$'s and $2$'s don't have any pairs, but all $3$'s and $4$'s obviously do)
• Three numbers showing (all $1$'s, $2$'s, and $3$'s don't have any pairs, but all $1$'s, $2$'s, and $6$'s do).

Can you take it from here?

• Thanks for the response. I edited my original question above taking your advice into account, but have a feeling that I'm off base somewhere. I'd appreciate any additional help. Apr 26, 2016 at 17:10

Each die has three axes labeled ${1}$, $2$, $3$. After throwing the $n$ dice there are $n$ vertical axes which can be encoded in a word $w$ of length $n$ over the alphabet $\{1,2,3\}$. Hereby all $3^n$ such words $w$ are equiprobable. You don't have a pair summing to seven iff the $m_1\geq0$ appearing ones in $w$ amount to an $1$ on all of them, or to a $6$ on all of them, and similarly for the twos and the threes in $w$. The probability $p_1$ that all $m_1$ ones in $w$ are oriented alike is given by $$p_1=\cases{1&(m_1=0)\cr 2/2^{m_1}&(m_1\geq1)\cr}\quad = 2^{-m_1}\cdot 2^{{\bf 1}[m_1\ne0]}\ .$$ Since $m_1+m_2+m_3=n$ it follows that the probability $p|w$ of not seeing a pair summing to seven, given $w$, computes to $$p|w=p_1\cdot p_2\cdot p_3=2^{-n}\cdot2^{\#\{i|m_i\ne0\}}\ .$$ Since we have to sum these $p|w$ over all possible words $w$ we now have to compute the number of words $w$ using exactly $1$, exactly $2$, or all three characters.

There are $3$ words using exactly $1$ character, then $3\cdot(2^n-2)$ words using exactly $2$ characters, and the remaining $3^n-3\cdot 2^n+3$ words use all three characters. Altogether the probability $q$ that no pair sums up to seven comes to $$q={1\over 3^n\cdot 2^n}\bigl(3\cdot 2^1+(3\cdot 2^n-6)\>2^2+(3^n-3\cdot 2^n+3)\>2^3\bigr)\ ,$$ and recollecting terms we obtain $$q={8\over 2^n}-{12\over 3^n}+{6\over 6^n}\ .$$

• +1, but I think there is a typo. The factor "30" should be "6".
– user940
Apr 27, 2016 at 13:48
• @ByronSchmuland: Thank you for spotting the slip. Apr 27, 2016 at 14:01

The piece that you're missing now is inclusion-exclusion.

Consider the set of dice rolls where only values in 1, 2, 3 came up. It is easy to calculate the number of ways of being in that set - it is just $3^n$. How many such sets are there?

Now if we naively add together the sizes of all of those sets, we're going to have some double counting. For example the set of dice rolls where just 1, 2 came up got counted with 1, 2, 3 and also with 1, 2, 4. So subtract off the number of ways of being in those various 2 dice possibilities.

But now what about the case where all of the dice came up 1? How many times have those cases been counted? What do you have to do to correct that?

When you have your formula, you should double check your work by verifying that if $n = 1$ you should get 6 possibilities. If $n = 2$ you should get 30 possibilities. And for $n = 3$ you should get 126.

Now divide by $6^n$ to go from possibilities to probabilities.