# Three d20 betting game

You are sitting at table and there happen to be three, fair, twenty-sided dice. Your friend offers you a wager: She says she will roll two of the dice, and you can roll one. If your number lies

*between*her two numbers you win, if not, you lose. (In the event of a tie, you also lose). Should you take this bet? What are your chances of winning the game?*What is the probability that one dice rolls between two others?*

Answer and calculation below:

Advertisement:

## Answer

Your chances of winning the game are 57/200 or 28.5%

## Explanation

When I first heard this problem, I solved it a long way. I then thought about it, and realized there is a much more elegant, and simpler, way to solve it. I’m pleased I thought about the more elegant solution, but I wish I’d thought about it a little earlier! I’ll explain them both. First the long way.

## The Long Way

When your friend rolls the two twenty sided dice there are 400 possible ways the dice can land (20 × 20). We can represent these as a 2D matrix. In the interests of saving space, let’s pretend the dice are ten sided dice; we’ll end up generalizing later so don’t worry.

Below are the 100 possible ways the two ten sided dice can land. Let’s indentify all the combinations you can’t possibly win, and mark these with an ‘X’. There is no way you can win on the leading diagonal (if your friend rolls a pair,

*e.g.*4-4 there is no way for you to win). Also, we can ‘X’ out squares that are one digit away from the leading diagonal*e.g.*4-5 as there is no gap in-between for you to land in.Next we’ll start to fill in the remaining squares showing number of possible winning rolls you could make based on your partner’s dice rolls. For instance, if she rolls: 1,9 then there are seven possible winning rolls for you {2,3,4,5,6,7,8}. Here's the first row:

Filling in the top part of table we can see a pattern. Each row is a triangular number.

There's also the opposite triangle to fill in:

If we sum up all the possible winning states, and divide by the total number of all possible rolls, we’ll get the expected number of winning rolls.

A quick google search reveals the formula for summing up triangular numbers. The sum of the first

*n*triangular numbers is:For a die with ten sides,

*n*would be 8. For a dice with 20 sides,*n*would be 18. Let’s generalize, and call the number of sides of the dice to be*d*.There are two regions of these numbers (the upper triangular section, and the lower triangular section), so we need to double this triangular sum.

Then we need to divide this by the total number of rolls possible by your friend (d × d), and finally multiply by 1/d for your roll, and we get the result:

Plugging in d=20 gives the result:

This gives the result of 28.5%

## The Short Way

An easier way to think of this is that your friend wins if there is

*any*tie. If any of the dice match, it’s game over for you (if her dice match, you can’t slide in between, and if your die matches either of hers, it’s also a loss). All the dice need to be distinct. This is easy to calculate:(Whatever the roll of the first die, there are 19/20 possible free numbers for the second, and 18/20 free numbers for the third).

We can then see that, from symmetry, each of the dice has the same range, so we can simply sort them into numeric order. There are six, equally likely, possible permutations the dice can be arranged (with

**P**representing your die, and**1,2**representing you your opponent rolls):**P12, 1P2, 12P, P21, 2P1, 21P**. Your dice in in the middle for two of these, or 1/3 of the time. Thinking about it another way, there are just three positions, and your dice is in the middle one time in three. This means that one third of the time, when the rolls are distinct, you win!Confirming the answer above!