A Gentle Introduction to Probability Using Dice

6 minute read

A Gentle Introduction to Probability Using Dice

Dice are the foundation of chance in the world of tabletop RPGs. Fans of tabletop RPGs are familiar with a variety of dice: four-, six-, eight-, ten-, twelve-, and twenty-sided. Each die is referred to with a “d” and the number of sides (d4, d6, d8, etc.). Rolling three twelve-sided dice would be denoted “3d12”. For our purposes, we will assume all dice are “fair”. That is, no die is weighted in a way that makes certain rolls more likely than others.

To begin our discussion of probability, consider a ten-sided die. Our d10 has faces
1, 2, 3, 4, 5, 6, 7, 8, 9, 0

Now consider the percentile dice – two d10s. If you want to roll at or below 70%, intuitively you have a 70% chance of doing so.

Note: A standard set of dice comes with two ten-sided dice: one with the numbers 0-9 and one with 00-90. Together, these make up percentile dice and are used to roll – you guessed it! – percentages. The 00-90 die makes up the tens digit, 0-9 the ones digit; a roll of 80 and 2 is 82. The one exception is a roll of 0 and 00, which yields 100. (If you roll only one d10, the 0 or 00 represents a roll of 10.)

Combinatorics

If I have 5 items, how many ways can I sort them into a line? Well, for the first position in line, there are 5 possibilities. For the second position, there are 4 possibilities remaining. For the third, 3 possibilities; the fourth, 2 possibilities; and for the final position, 1 possibility. This translates to \[5 \times 4 \times 3 \times 2 \times 1\] possible ways to sort these items into a line.

We have a handy mathematical notation for this: \(n!\) (read as “n-factorial”) \[n! = n \times (n-1) \times (n-2) \times \dots \times 3 \times 2\times 1\] That is, \[5! = 5 \times 4 \times 3 \times 2 \times 1\]

Now suppose you have 15 different d8s in a bag and you will select three of them. How many different ways can you select three dice in a row?

For the first die, there are 15 possibilities; then for the second die there are 14 remaining possibilities; and finally for the third there are 13 remaining: \[15\times 14 \times 13\] This is not a factorial, but it looks a bit similar… what if I multiplied it by \(\frac{12!}{12!}=1\)? \[15\times 14 \times 13 \times \left(\frac{12!}{12!}\right) = \frac{15\times 14 \times 13 \times (12!)}{12!} = \frac{15!}{12!}\]

It turns out this is a super useful rewrite! We had \(n=15\) total dice and wanted to think about how many possible permutations of \(k=3\) we could make. Notice that \[\frac{15!}{12!} = \frac{n!}{(n-k)!}\] Permutations: the number of ways to choose \(k\) items from \(n\) items (order matters) is denoted \(P^n_k\). \[P^n_k = \frac{n!}{(n-k)!}\] Notice that our definition of a permutation includes a note that order matters. This means that grabbing dice A, B, and C is not the same as grabbing {B, A, C} or {C, B, A}.

Generally, if you are thinking about grabbing three dice out of a bag, you are probably less interested in how many different ways you can select three in a row… and are instead interested in how many different combinations of three dice you can get. In this case, order will not matter. If the set of dice {A, B, C} is the same as {B, A, C} is the same as {C, B, A}, etc., we can infer right away that there should be fewer combinations than permutations. In fact, we divide the number of permutations by the possible number of ways to reorder each grouping. For three dice - A, B, C - there are \(3! = 3 \times 2 \times 1\) ways to arrange them. So there are \[\frac{\frac{15!}{12!}}{3!} = \frac{15!}{12! \: 3!}\] possible combinations of tree dice from the pool of 15.

This also relates directly to \(n=15\) total and drawing \(k=3\) dice: \[\frac{15!}{12!\: 3!} = \frac{n!}{k!(n-k)!}\] Combinations: the number of ways to select \(k\) items from \(n\) items (order does not matter) is denoted \(C^n_k\) or \(\binom{n}{k}\) (notice this is not a fraction - there is no horizontal bar between \(n\) and \(k\)). \[C^n_k = \frac{n!}{k!(n-k)!}\]

Combinations and permutations will save us a lot of time writing out every possible outcome, so we will use them a lot when thinking about the probability

Averages

The average (also called the mean) roll for any die is the average of the numbers on its faces. For a d4, the average is \[\frac{1+2+3+4}{4} = 2.5.\] There’s also a quicker way to calculate this in your head - for a die, the average roll will always be \[\frac{\text{number of sides}+1}{2}\] so the d4 has that average of \(5/2 = 2.5\) and the d20 has average roll \(21/2 = 10.5\).

When thinking about the average for multiple dice rolled at once, all you need to do is add the averages of all the individual dice! Rolling 4d4 has an average of \[4\times(\text{average d4 roll}) = 4(2.5) = 10\] and rolling 2d6 plus 1d8 has an average of \[2\left(\frac{6+1}{2}\right) + \frac{8+1}{2} = 11.5.\]

For any average with a modifier, such as 2d6+2, just add the modifier to the die average: \[2\times\left(\text{d6 average}\right) + (\text{modifier of 2}) = 2\left(\frac{6+1}{2}\right) + 2 = 9.\]

Variability

If you like to think about maximizing your chances of success, you want to consider both the average roll and the variability of the rolls. What does this mean?

Consider rolling 2d4 or rolling 1d8. Which would you prefer? Both options roll on a maximum of 8. However, the averages are \[\text{2d4:}\quad 2\left(\frac{4+1}{2}\right) = 5\] and \[\text{1d8:}\quad \left(\frac{8+1}{2}\right) = 4.5.\] One of the reasons these averages are different is because of how much the possible rolls vary. While both options have a maximum of 8, the minimum roll on 2d4 is 2 (both dice roll 1s) and the minimum on 1d8 is 1. Each of the outcomes 1 through 8 is equally likely on the d8, but each sum is not equally likely when rolling 2d4. The following table summarizes these outcomes (we imagine one die is red and one blue to help differentiate the two).

rolls Red d4 sums Red d4
1 2 3 4 1 2 3 4
Blue d4 1 1,1 1,2 1,3 1,4 Blue d4 1 2 3 4 5
2 2,1 2,2 2,3 2,4 2 3 4 5 6
3 3,1 3,2 3,3 3,4 2 4 5 6 7
4 4,1 4,2 4,3 4,4 3 5 6 7 8

Then we might want to summarize these probabilities alongside the probabilities for 1d8:

Outcome 1 2 3 4 5 6 7 8
Probability with 1d4 1/8 1/8 1/8 1/8 1/8 1/8 1/8 1/8
Probability with 2d4 0 1/16 2/16 3/16 4/16 3/16 2/16 1/16
Note that a probability of 0 means that outcome is impossible!

So which should you prefer? It depends on your priorities. You are twice as likely to roll the maximum (an 8) on 1d8 than on 2d4. On the other hand, you will never roll a 1 on 2d4 and your probability of rolling 1 or 2 on 2d4 is one-fourth what it is on 1d8. In short, 2d4 is a safer choice for falling somewhere around the average (and for avoiding a 1 or a 2), but 1d8 makes it more likely that you will roll the maximum. The more dice we add to the mix, the more extreme this relationship becomes. If I consider flipping 4 coins (the equivalent of “rolling” 4d2) where one side is 1 and the other 2, we end up with an average of \[4\left(\frac{2+1}{2}\right) = 6\] with probabilities found in the following table.

Outcome 1 2 3 4 5 6 7 8
Probability with 4 coins (4d2) 0 0 0 1/16 1/4 3/8 1/4 1/16

These are even more clustered around the (even higher) average than 2d4! (Once we dip into something like flipping a bunch of coins instead of rolling dice, things can get a little over-the-top.) It also runs into the same problem relative to 1d8 where you are less likely to roll the maximum.