Die Rolling Madness

If I roll a 6 sided die 4 times, what are the odds that the sum of all my rolls will be exactly 23?

83.33% 16.67% 0.31% 0.08%

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

Gamal Sultan
Feb 10, 2015

The possible numbers for the sum to be 23 are 5,6,6,6

and this arrangement can be occur by 4 methods

(5,6,6,6), (6,5,6,6),(6,6,5,6),(6,6,6,5),

The all possible arrangements = 6^4 = 1296

The probability = 4/1296

The final answer = (4/1296)(100) = 0.30864 = 0.31%

I got this wrong the first time around because I calculated for 6 rolls (whoops), but here are two Python methods for finding the answer.

First, Monte Carlo for approximating:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from random import randint
def roll_23():
    total = 0
    for roll in xrange(4):
        total += randint(1,6)
    return total == 23
yes = 0
trials = 1000000
for trial in xrange(trials):
    if roll_23():
        yes += 1.0
print yes/trials

Secondly, for an exact answer, Cartesian product:

1
2
3
4
5
6
7
8
9
from itertools import product
yes = 0
trials = 0
sides = xrange(1, 7)
for rolls in product(sides,repeat=4):
    trials += 1
    if sum(rolls) == 23:
        yes += 1.0
print yes/trials

Brock Brown - 6 years, 3 months ago

I did't see we have the same solution.

Roman Frago - 6 years, 3 months ago
Roman Frago
Mar 12, 2015

4 6 4 = 0.30864 \frac {4}{6^4}=0.30864

Ruslan Abdulgani
Feb 8, 2015

The only possible arrangement for the sum of 23 are 6,6,6, 5. So there are (4!/3!) (1/6)4 100% = 0.31% chances.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...