What is the probability of obtaining a sum of 20 when rolling four six-sided dice?

Instruction: Assume four fair, independent six-sided dice. Enumerate the unordered patterns summing to 20, count their ordered permutations, and give the exact and decimal probability.

Context: This question tests the candidate's ability to analyze complex outcomes in a multi-dice rolling scenario and calculate the corresponding probability.

Updated

Worked answer

With four fair, independent dice, there are 6⁴ = 1,296 equally likely ordered outcomes. The unordered patterns summing to 20 are:

PatternPermutations
(2, 6, 6, 6)4
(3, 5, 6, 6)12
(4, 4, 6, 6)6
(4, 5, 5, 6)12
(5, 5, 5, 5)1

Thus there are 4 + 12 + 6 + 12 + 1 = 35 successful outcomes and the probability is 35/1296 ≈ 0.0270062, or 2.70062%.

An independent counting argument sets each die's deficit from 6 to yi = 6 − xi. The sum must be 4. The number of nonnegative solutions to y1 + y2 + y3 + y4 = 4 is C(7, 3) = 35. The upper bound yi ≤ 5 is automatically satisfied because their total is only 4.

from fractions import Fraction
from itertools import product
successes = sum(sum(roll) == 20 for roll in product(range(1, 7), repeat=4))
probability = Fraction(successes, 6**4)
assert probability == Fraction(35, 1296)
print(probability, float(probability))

Related Questions