# Probability of rolling a sum of 20

1. Jun 19, 2008

### psilentist

1. The problem statement, all variables and given/known data
If you roll a fair die 5 times, what is the probability that the sum of the five rolls is 20?

2. Relevant equations

3. The attempt at a solution
I know the sample space is all possible permutations of 1 to 6 taken five at a time with repetition, which is 6^5 = 7776.

And I know this can be done with the principle of inclusion and exclusion.

The problem can be seen as distributing 20 identical objects into 5 labeled containers such that each has between 1 and 6 (inclusive) objects.

This reduces to distributing 15 objects such that each container has 0 to 5 (inclusive) objects.

So using PIE, the base set is all solutions to 15 objects into five labeled containers, C(15 + 5 - 1, 15), and the condition is that a container has 6 or more objects.

There are C(5, 1) = 5 ways the condition can be satisfied once, and in each case there are C(10 + 5 - 1, 10) solutions.

There are C(5, 2) = 10 ways the condition can be satisfied twice, and in each case there are C(5 + 5 - 1, 5) solutions.

So the answer should be [C(15 + 5 - 1, 15) - 5*C(10 + 5 - 1, 10) + 10*C(5 + 5 - 1, 5)]/7776 = 131/7776.

But the book says 651/7776.

Can anyone see a problem with what I'm doing?

2. Jun 19, 2008

### tiny-tim

Welcome to PF!

Hi psilentist ! Welcome to PF!
No … why do you think that?

Hint: 20 = 5 x 4.

So count the number of ways of making 20 with exactly five 4s,

plus the number of ways of making 20 with exactly three 4s,

plus the number of ways of making 20 with exactly two 4s,

plus the number of ways of making 20 with exactly one 4.

3. Jun 19, 2008

### psilentist

How many sums with exactly one 4?

I started working through the problem as you suggested, but it becomes pretty painful counting the possible combinations with exactly one 4.

Permutations of 1 3 6 6, 2 2 6 6, 5 3 2 6, etc... With that many, how can you be sure you're covering all of them? And what if the 5 dice actually had 25 sides?, and we were looking at the probability of them summing to 65? There has to be a better way - a formula.

And this is from the chapter on the Principle of Inclusion and Exclusion.

If a set (the solutions to the problem of x1 + x2 + x3 + x4 + x5 = 15) has size N, and conditions ci, i from 1 to 5 (xi >= 5), the number of elements of S that satisfy none of the conditions ci (0 <= xi <= 5) can be found from:

N - [N(c1) + N(c2) + N(c3) + ... + N(c5)] + [N(c1c2) + N(c1c3) + ... + N(c4c5)] - [N(c1c2c3) + ...

Do you still think I'm on the wrong track?

4. Jun 19, 2008

### psilentist

oops... ci is x >= 6

5. Jun 19, 2008

### Staff: Mentor

Tiny-time! You missed one possibility:

plus the number of ways of making 20 with exactly zero 4s.

6. Jun 19, 2008

### tiny-tim

Hi psilentist!
First … I've just noticed that I cut off the last line in my last post, which should be:
plus the number of ways of making 20 with no 4s.​

Sorry!
Well, apart from 3355, and all the permutations, that is all with exactly one 4.
25 sides … we'd probably need a computer!

Sorry, but there simply isn't a formula for everything.

There may be a PIE method, but I honestly can't see what it is.

EDIT: Thanks DH! … you just beat me to it!

erm … can you see a PIE method?

7. Jun 20, 2008

### psilentist

[solved]

Okay, I realized what I was doing wrong.

I had the right approach, but the condition we need to satisfy in order to use PIE is that each container contains GREATER THAN 6 objects, not greater than 5. That is, the die roll is greater than 6. (Then, by applying PIE, we find all solutions that do NOT satisfy the condition, i.e., the rolls are less than or equal to 6.)

So using PIE, the base set is all solutions to 15 objects into five labeled containers, C(15 + 5 - 1, 15), and the condition is that a container has 7 or more objects.

There are C(5, 1) = 5 ways the condition can be satisfied once, and in each case there are C(9 + 5 - 1, 9) solutions (take six objects from the 15, and place in one container).

There are C(5, 2) = 10 ways the condition can be satisfied twice, and in each case there are C(3 + 5 - 1, 3) solutions (subtract 6 again).

So the answer should be [C(15 + 5 - 1, 15) - 5*C(9 + 5 - 1, 9) + 10*C(3 + 5 - 1, 3)]/7776 = 651/7776, which agrees with my text book.