I saw Brian Murphy talking about a dice game he and some of the other Dimension 20 crew play and I decided to do some math for fun to analyze the statistics. It's a simple game: roll a d4 (four-sided die), then a d6, d8, d10, d12, and d20. To win the game, you need to roll the highest number on each die, in sequential order; anything else, you go back to the d4 and start over.
(For the record, yes I'm aware I'm using "odds" in cases where I should be using "probability", but let's be real: no one cares and it doesn't matter. (I have just raised the odds of me being murdered by a statistics professor.) Also, when I say "average" here, I mean median. (Fight me. It matches human intuition for this problem far better than the mean.))
The odds of rolling the highest number on an n-sided die are 1 in n, and we need to do that for each die. What are the odds? Well, these are independent events that all must happen, so we can multiply their odds: 1/4 * 1/6 * 1/8 * 1/10 * 1/12 * 1/20 = 1/460,800
Murph said the highest the crew had gotten was the d12, which -- seeing those odds -- makes a lot of sense. How many times would you need to play the game before you see a win, on average?
For that, we can use this function, telling us the odds of winning given n times playing: P(n) = 1 - (1 - 1/460800)^n
If we plug in 1, we get the original odds: 1 in 460,800 or about 0.0002%. If we plug in 2, we get the odds for winning at least one game out of two at roughly 0.0004%. As we'd expect, the odds are roughly double. But the thing is, it doesn't increase linearly; if we play it 460,800 times, there's only a 63% chance of winning!
We have a formula that can tell us our odds given a number of trials, but we can solve for n instead, if we want to know how many games we need to play in order to hit a certain win rate.
To have a 10% chance of winning, you need to play 48,551 games. To hit 25%, you need to play 132,564 times. 50%? 319,402. And for 90%, you need to play a whopping 1.06 MILLION games!
We answered our original question: the average player will need to play 319,402 times to get a win. But now I need to know: how many dice do you have to roll to get to that point? Because for a win, you're rolling all 6 polyhedral dice, but a lot of those are going to die earlier in the run.
So, how many dice are you going to roll on an average run? We can figure this out by framing it as expected value. For that, we need to figure out the odds of reaching a given die and multiplying it by the number of dice required to get there, then summing those up.
We know we're always going to roll 1 die at least, and 3/4 of the time, that's all we roll; that gives us our first term: 1 * 3/4. If we pass the d4, there's a 5/6 chance we roll only 2 dice, but we need to have passed the d4 first; our second term is 2 * 1/4 * 5/6. We can carry on doing this for all the remaining terms: (1 * 3/4) + (2 * 1/4 * 5/6) + (3 * 1/4 * 1/6 * 7/8) + (4 * 1/4 * 1/6 * 1/8 * 9/10) + (5 * 1/4 * 1/6 * 1/8 * 1/10 * 11/12) + (6 * 1/4 * 1/6 * 1/8 * 1/10 * 1/12)
Throwing this into a calculator, we get: ~1.297 dice rolls per game. That makes intuitive sense -- most are going to fail at 1 die, a small number will fail after 2, etc.
Multiplying the number of expected dice rolls per game by the average games to win, we get that we need to roll a total of 414404 dice to scale that mountain.