Dice product probability.

Let P(n, p) be the probability that the product of n dice is <= p. You want to find P(3, 30).

We can use the Bayes formula to break this out based on the result of the first roll.

P(3, 30) =
    P(3, 30|first roll = 1)P(first roll = 1) +
    P(3, 30|first roll = 2)P(first roll = 2) +
    P(3, 30|first roll = 3)P(first roll = 3) +
    P(3, 30|first roll = 4)P(first roll = 4) +
    P(3, 30|first roll = 5)P(first roll = 5) +
    P(3, 30|first roll = 6)P(first roll = 6)

P(first roll = 1) = P(first roll = 2) = ... = 1/6.

So we just need to figure out P(3, 30|first roll = 1), P(3, 30|first roll = 2), ... etc.

The key is to realize that if the first roll is (say) 4, then the product of all three dice is <= 30 if the product of the remaining two dice <= (30/4).

So P(3, 30|first roll = 4) = P(2, 7).

Reasoning similarly:

P(3, 30) =
    P(2, 30)/6 +
    P(2, 15)/6 +
    P(2, 10)/6 +
    P(2, 7)/6 +
    P(2, 6)/6 +
    P(2, 5)/6

We can calculate P(2, ...) by making a table of the 36 possibilities and simply counting... or we can apply Bayes again!

P(3, 30) =
    (P(1, 30)/6 + P(1, 15)/6 + P(1, 10)/6 + P(1, 7)/6 + P(1, 6)/6 + P(1, 5)/6)/6 +
    (P(1, 15)/6 + P(1, 7)/6 + P(1, 5)/6 + P(1, 4)/6 + P(1, 3)/6 + P(1, 2)/6)/6 +
    (P(1, 10)/6 + P(1, 5)/6 + P(1, 3)/6 + P(1, 2)/6 + P(1, 2)/6 + P(1, 1)/6)/6 +
    (P(1, 7)/6 + P(1, 3)/6 + P(1, 2)/6 + P(1, 1)/6 + P(1, 1)/6 + P(1, 1)/6)/6 +
    (P(1, 6)/6 + P(1, 3)/6 + P(1, 2)/6 + P(1, 1)/6 + P(1, 1)/6 + P(1, 1)/6)/6 +
    (P(1, 5)/6 + P(1, 2)/6 + P(1, 1)/6 + P(1, 1)/6 + P(1, 1)/6 + P(1, 0)/6)/6

Pulling out a common factor of 1/216, we get:

P(3, 30) = (1/216)(
    (6 + 6 + 6 + 6 + 6 + 5) +
    (6 + 6 + 5 + 4 + 3 + 2) +
    (6 + 5 + 3 + 2 + 2 + 1) +
    (6 + 3 + 2 + 1 + 1 + 1) +
    (6 + 3 + 2 + 1 + 1 + 1) +
    (5 + 2 + 1 + 1 + 1 + 0)
)

Or finally:

P(3, 30) = (1/216)(29 + 19 + 14 + 14 + 10) = 86/216 = 43/108 = about 39.8%
/r/cheatatmathhomework Thread