 • entries
34
90
• views
8089

# Statistical Analysis of Dice Rolls in Gaming

probability.pdf

The attached pdf is the same as the post below, but with the histogram pictures.

I like to do mathematical models and analyses of gaming, and I was thinking of this one lately.

Dungeons and Dragons Next has what they call an “advantage” and “disadvantage” system. For an advantage, the player rolls 2d20 and keeps the favorable roll. For a disadvantage, the player rolls 2d20 and keeps the unfavorable roll.

If the player needs the number n to succeed, then he must roll at least one n on the roll of 2d20. The cumulative probability function is

P(n) = (-n2 + 2n + 399)/400

If the player needs the number n to succeed, then he must roll n or better on each of the 2d20. The cumulative probability function is

P(n) = (n2 – 42n + 441)/400

Single Die Rolls Versus Multiple Dice Rolls

The probability distribution function for a single die is a constant. For a die with N sides, the probability of rolling any number is 1/N. Over many die rolls, the average number rolled will be (N+1)/2. For example, the average of d12 is 6.5

Rolling 2 dice produces a bell shaped probability distribution function. The probability of rolling a particular number depends on what dice are being rolled.

Let us compare a 1d12 to a 2d6. The average damage done per roll, averaged over many rolls, for a 1d12 is 6.5. The average damage done by 2d6 is 7. The range of damage for the 1d12 is 1 to 12. The range for the 2d6 is 2 to 12. By this comparison, the 2d6 looks slightly better because you are guaranteed to do at least 2 damage. But the maximum damage you can expect is 12 from both situations. The average of 7 from the 2d6 is slightly better. Overall, the 2d6 so far appears to be better, but only slightly. However, considering the range and average is not enough to give a complete picture of how to compare these rolls.

Consider the situation where the character is doing many hits on one creature that has many hit points. In this case, the damage done is approximately the average times the number of hits (assumed to be large). In this situation, an average damage of 6.5 from a 1d12 is close to the 7 done by 2d6. If the character does 100 hits, then the expectation value for 1d12 is 65, while that for the 2d6 is 70. These two values are not very different. So by this metric, the two dice rolls also seem to be close, with the 2d6 being slightly better.

Now consider a situation where the character is attacking many small creatures, each of which has only 4 hit points. Let's say there are 100 such creatures. This means the character can kill a creature in 1 hit if he rolls a 4 or better. It would be nice if the character could plow through the creatures, killing a lot of them in 1 hit. Which roll, 1d12 or 2d6, would be better?

First consider the 1d12. The probability of rolling 4 or better is 9/12 = 0.75. So the character can expect to kill 75% of the creatures with one hit.

For the 2d6, the probability of rolling 4 or better is 33/36 = 0.9167. So the character can expect to kill 92% of the creatures with one hit.

What about a 2d6-1? The average is 6, which is slightly worse than the 1d12. The range is 1 to 11, again worse than the 1d12. But the probability of rolling a 4 or better on 2d6-1 is 30/36 = 0.8333 or 83%. This is still better than the 1d12 in the situation where the character is up against 100 creatures, each with 4 hit points.

Looking at the distribution curves explains the behavior. The multi dice rolls, 2d6 or 2d6-1, are bell shaped distributions. The bulk of the probability is centered around the average, which means you are more likely to roll the average than other numbers.

If a weapon does 1d12 damage, it is just as likely to roll a 12 as it is to roll a 1. With bell shaped distributions, you get one result more often than others. A 2d6 will most likely give a 7 than anything else. On rare occasions you will get a 12 or a 1.

Generally speaking, adding more dice will increase the probability that you will roll the average. Rolling 100d6 has a high probability that you will get the average of 35 = 3.5 * 100. More dice narrows the bell curve.

I think the best way to design weapons is it use all different combinations of dice. Some weapons might do 1d4, 1d6, 1d8, 1d10, 1d12, 2d4, 2d4+1, etc. Maybe you want a weapon to do a 1d12, because you have a higher chance of getting a 12 than you would from a 2d6. But the drawback is that you are likely to roll a 1. The point is, you can design many different distribution functions by having various combinations of dice.

• 1
• 1

I really enjoyed reading this. It's cool to think that when I attack in a game that uses that kind of mechanic (like KoTOR) my computer/xbox runs through these algorithms.

I am talking about dice in table top games. I don't know exactly how computer games get their results. But I guess a random number generator with adding or subtracting modifiers. You have some choices: Have the computer do the statistical calculation from an equation, or pick a random result from a table.

I don't know a lot about computers, but I think picking a value from a table is faster than doing a calculation. Or they use a weighted random number generator.

I have another analysis I will post soon. It uses linear algebra, so that should be fun.

## Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible. 