# Probability of 20 dice being divisible by 6

1. Apr 3, 2012

### Gregg

1. The problem statement, all variables and given/known data

20 dice are rolled what's the probability that the sum will be divisible by 6?

2. Relevant equations

Law of total probability

3. The attempt at a solution

The possibilities are between 20x1 and 20x6:

24,30,36,42,48,54,60,66,72,78,84,90,96,102,108,114,120

In the beginning, trying to find out how many ways there are to get 24 from 20 dice makes me feel as though I can't possibly be expected to do it for all 17 totals. I have no idea how to do this

2. Apr 3, 2012

### tiny-tim

Hi Gregg!

Well, they wouldn't ask a question as complicated as this if there wasn't a short-cut, would they?

Hint: try rolling 19 dice first … then what?

3. Apr 3, 2012

### RoshanBBQ

Let us create a Markov chain {X_n : X in N}. The Markov chain will stand for the sum of n dice modulo 6. X_0 = 0. The Markov chain then has the following transition probability matrix:

$$\begin{bmatrix} \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6}\\ \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6}\\ \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6}\\ \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6}\\ \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6}\\ \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6} \end{bmatrix}$$

Hence, we have a doubly stochastic matrix whose transition probability is already the invariant probability measure. The probability must be 1/6 then.

If you have not studied Markov chains, then I recommend you ask yourself: "What is the probability of rolling a number divisible by 6 with 1 die." Then, bump it up to summing 2 dice. You should, by then, see the logic behind the probability always being 1/6 no matter how many dice you roll.

Last edited: Apr 3, 2012
4. Apr 3, 2012

### Gregg

I can't see that! if the first 19 are divisible by 6 we require a 6 for the 20th. That's all I seem to be able to deduce - going further I bump into complications. Like considering 19 sixes, 19 fives, 19 twos etc.

5. Apr 3, 2012

### tiny-tim

and suppose the first 19 have remainder 1 on division by 6 ?

6. Apr 3, 2012

### Gregg

Ah... I could say that it is the same as the probability of getting divisible by 1,2,3,4 or 5, and further that the union of these is the sample space.

$$\text{P}(\Omega) = \sum_{k=1} ^{6} \text{ P(divisible by k)} = 6 \text{ P(divisible by 6)} = 1$$

7. Apr 3, 2012

### Gregg

OK so the first 19 have remainder 1 on division by 6. Then we require 5, remainder 2, then we require 4, remainder 3, we require 3, remainder 4, we require 2, remainder 5, we require 1?

8. Apr 3, 2012

### rktpro

You rock buddy! I too have the same evil smile sitting in an examination hall and wondering about the short-cuts

9. Apr 3, 2012

### tiny-tim

you mean that all remainders are equally likely? true, but how do you prove that?

what is P(divisible by 6 | remainder of first 19 is 1) ?​

10. Apr 3, 2012

### Gregg

So

P(divisible by 6 | remainder of first 19 is i) = 1/6

i=1,2,3,4,5,6 ?

11. Apr 3, 2012

### Gregg

$$\text{P( div. by 6)} = \sum_{k=1}^{6} \text{P(rem. of 1st 19 is k) P(div. by 6 |rem. of 1st 19 is k)}$$

$$\text{P(rem. of 1st 19 is k)} = 1/6$$
$$\text{P(div. by 6 |rem. of 1st 19 is k)}$$

Which gives 1/6. If I could show that the $$\text{P(rem. of 1st 19 is k)} = 1/6$$

12. Apr 3, 2012

### tiny-tim

You don't need to!

Write out the whole P(A) = ∑ P(A|B)P(B) formula …

what do you notice?

13. Apr 3, 2012

### Gregg

P(A|Bk) is constant = 1/6

Bkis a partition of the sample space so the sum adds to unity

P(A) = ∑P(A|Bk) P(Bk)

P(A) =P(A|Bk) ∑P(Bk)

P(A) = 1/6

14. Apr 3, 2012

### tiny-tim

That's right!

(But clearer would be

P(A) = ∑P(A|Bk) P(Bk)

= ∑ (1/6) P(Bk)

= 1/6 )

15. Apr 3, 2012

### Gregg

Thanks. very helpful - with stuff like this I never ever manage to catch the easy way of doing it