[Theoryhammer] Chances on dice rolls with multiple dice.
Posted: Thu Aug 30, 2012 1:50 pm
Greetings,
I'm slowly gaining my interest back in the game and my new 8th ed rulebook will soon be in my eager hands. Meanwhile, I try to retrace my latest steps in this game: theoryhammer. It's also a bit of a hobby of mine to approach some problems and challenges mathematically. Mathematical models can help us understand what some numbers mean, how they tend to work and to estimate our chances more accurately.
To get started, I'm brining a model on the good old feeling of rolling those dice in our hands.
Daeron
Cheat sheet
Without further ado, these are the tables with odds for rolling a score on dice.. from 1 dice to 6 dice.
The table "At least" shows you the odds of rolling at least a certain score on a number of dice.
Score . . 1d6 . . . . 2d6 . . . . 3d6 . . . . 4d6 . . . . 5d6 . . . . 6d6
02+ . . 83.3% . . 100.% . . 100.% . . 100.% . . 100.% . . 100.%
03+ . . 66.7% . . 97.2% . . 100.% . . 100.% . . 100.% . . 100.%
04+ . . 50.0% . . 91.7% . . 99.5% . . 100.% . . 100.% . . 100.%
05+ . . 33.3% . . 83.3% . . 98.1% . . 99.9% . . 100.% . . 100.%
06+ . . 16.7% . . 72.2% . . 95.4% . . 99.6% . . 100.% . . 100.%
07+ . . 00.0% . . 58.3% . . 90.7% . . 98.8% . . 99.9% . . 100.%
08+ . . 00.0% . . 41.7% . . 83.8% . . 97.3% . . 99.7% . . 100.%
09+ . . 00.0% . . 27.8% . . 74.1% . . 94.6% . . 99.3% . . 99.9%
10+ . . 00.0% . . 16.7% . . 62.5% . . 90.3% . . 98.4% . . 99.8%
11+ . . 00.0% . . 08.3% . . 50.0% . . 84.1% . . 96.8% . . 99.5%
12+ . . 00.0% . . 02.8% . . 37.5% . . 76.1% . . 94.1% . . 99.0%
13+ . . 00.0% . . 00.0% . . 25.9% . . 66.4% . . 90.2% . . 98.0%
14+ . . 00.0% . . 00.0% . . 16.2% . . 55.6% . . 84.8% . . 96.4%
15+ . . 00.0% . . 00.0% . . 09.3% . . 44.4% . . 77.9% . . 93.9%
16+ . . 00.0% . . 00.0% . . 04.6% . . 33.6% . . 69.5% . . 90.4%
17+ . . 00.0% . . 00.0% . . 01.9% . . 23.9% . . 60.0% . . 85.5%
18+ . . 00.0% . . 00.0% . . 00.5% . . 15.9% . . 50.0% . . 79.4%
19+ . . 00.0% . . 00.0% . . 00.0% . . 09.7% . . 40.0% . . 72.1%
20+ . . 00.0% . . 00.0% . . 00.0% . . 05.4% . . 30.5% . . 63.7%
21+ . . 00.0% . . 00.0% . . 00.0% . . 02.7% . . 22.1% . . 54.6%
22+ . . 00.0% . . 00.0% . . 00.0% . . 01.2% . . 15.2% . . 45.4%
23+ . . 00.0% . . 00.0% . . 00.0% . . 00.4% . . 09.8% . . 36.3%
24+ . . 00.0% . . 00.0% . . 00.0% . . 00.1% . . 05.9% . . 27.9%
25+ . . 00.0% . . 00.0% . . 00.0% . . 00.0% . . 03.2% . . 20.6%
The table "At most" shows you the odds of rolling at most a certain score on a number of dice.
Score . . 1d6 . . . . 2d6 . . . . 3d6 . . . . 4d6 . . . . 5d6 . . . . 6d6
02- . . 33,3% . . 02,8% . . 00,0% . . 00,0% . . 00,0% . . 00,0%
03- . . 50,0% . . 08,3% . . 00,5% . . 00,0% . . 00,0% . . 00,0%
04- . . 66,7% . . 16,7% . . 01,9% . . 00,1% . . 00,0% . . 00,0%
05- . . 83,3% . . 27,8% . . 04,6% . . 00,4% . . 00,0% . . 00,0%
06- . . 100.% . . 41,7% . . 09,3% . . 01,2% . . 00,1% . . 00,0%
07- . . 100.% . . 58,3% . . 16,2% . . 02,7% . . 00,3% . . 00,0%
08- . . 100.% . . 72,2% . . 25,9% . . 05,4% . . 00,7% . . 00,1%
09- . . 100.% . . 83,3% . . 37,5% . . 09,7% . . 01,6% . . 00,2%
10- . . 100.% . . 91,7% . . 50,0% . . 15,9% . . 03,2% . . 00,5%
11- . . 100.% . . 97,2% . . 62,5% . . 23,9% . . 05,9% . . 01,0%
12- . . 100.% . . 100.% . . 74,1% . . 33,6% . . 09,8% . . 02,0%
13- . . 100.% . . 100.% . . 83,8% . . 44,4% . . 15,2% . . 03,6%
14- . . 100.% . . 100.% . . 90,7% . . 55,6% . . 22,1% . . 06,1%
15- . . 100.% . . 100.% . . 95,4% . . 66,4% . . 30,5% . . 09,6%
16- . . 100.% . . 100.% . . 98,1% . . 76,1% . . 40,0% . . 14,5%
17- . . 100.% . . 100.% . . 99,5% . . 84,1% . . 50,0% . . 20,6%
18- . . 100.% . . 100.% . . 100.% . . 90,3% . . 60,0% . . 27,9%
19- . . 100.% . . 100.% . . 100.% . . 94,6% . . 69,5% . . 36,3%
20- . . 100.% . . 100.% . . 100.% . . 97,3% . . 77,9% . . 45,4%
21- . . 100.% . . 100.% . . 100.% . . 98,8% . . 84,8% . . 54,6%
22- . . 100.% . . 100.% . . 100.% . . 99,6% . . 90,2% . . 63,7%
23- . . 100.% . . 100.% . . 100.% . . 99,9% . . 94,1% . . 72,1%
24- . . 100.% . . 100.% . . 100.% . . 100.% . . 96,8% . . 79,4%
25- . . 100.% . . 100.% . . 100.% . . 100.% . . 98,4% . . 85,5%
This is interesting to answer questions such as:
- What's the chance to succeed in casting this spell, or dispelling a castvalue, with a given number of dice?
- How much does adding another power or dispel dice increase my odds on success?
- How likely is a unit to succeed or fail a leadership test?
Why is this useful?
Now we calculated the odds to score a given outcome on a number of dice (from 1 to 6 dice).
One can wonder.. why?
The very simple explanation is "to accelerate learning". If one were to play countless battles and have an excess of experience with rolling dice... then modeling odds with dice isn't going to teach one anything new. One acquires all the experience in hand and brain to judge what are good chances and what not.
However, for players like me who've been out of it for some time, or who do not have the luxury of playing several games a day to learn, a mathematical model can help "see" the odds in a more obvious manner.
Calculating these numbers
The rest of this post is mostly directed at fellow math-heads (matheadons?)... or people who are interested in developing their own calculator or spreadsheet for this. I doubt most players will wish, or need to dig this deep in the maths behind it, but I felt it would be a waste not to include my findings in this post.
The simplest method to calculate these odds is to calculate all possible permutations. In how many ways can you roll a "six" on two dice?
You could roll "1 and 5", "2 and 4", "3 and 3", "4 and 2", "5 and 1". Five ways. Two dice, with each 6 sides means there's 6*6 = 36 possible outcomes. 5 ways to roll a six out of 36 possible outcomes, means you have a 5/36 = 13.89% chance of rolling a six.
But this calculation becomes more tedious if you want to work this out for every outcome, with more than two dice.
I managed to make up two manners to calculate these odds. One is using permutations. The other using binomial functions (which does the same thing). The former is simpler, easer to understand but the latter is more efficient if you're trying to implement it.
Method 1: Combination a.k.a. easy to make in Excel
Explanation
The simplest way to calculate this "logically" is through an intuitive recursion.
What are the odds of rolling six on two dice? Let's go over the permutations in a different manner:
Well.. on my second dice, I can roll 1,2,3,4,5 or 6.
- If I roll 1, then I need to score 5 on my first dice. I can do that in 1 way.
- If I roll 2, then I need to score 4 on my first dice. I can do that in 1 way.
and so on. For every outcome I can have on my latest dice, I count the number of ways I can score a matching value on my previous dice.
What are the odds of rolling seven on three dice?
- If I roll 1 on my third dice, I need to roll 6 on my previous two dice. This can be done in 5 ways.
- If I roll 2 on my third dice, I need to roll 5 on my previous two dice. This can be done in 4 ways.
- If I roll 3 on my third dice, I need to roll 4 on my previous two dice. This can be done in 3 ways.
- If I roll 4 on my third dice, I need to roll 3 on my previous two dice. This can be done in 2 ways.
- If I roll 5 on my third dice, I need to roll 2 on my previous two dice. This can be done in 1 ways.
- If I roll 6 on my third dice, I can't roll 1 on my other two dice.
In total I have: 5+4+3+2+1 = 15 ways of rolling 7 on 3 dice. 3 dice offer 6*6*6= 216 possible outcomes, which gives me 6.94% chance of rolling exactly 7.
Doing this in Excel
Row 1 will represent the number of dice used.
Put 0 in Cell B1. Write "=B1+1" in Cell C1, and copy this for any number of cells to the right, in the first row.
Leave rows 2 to 7 open. These have to remain empty.
Column A will represent the score you're trying to obtain.
Put 0 in Cell A8. Write "=A8+1" in Cell A9 and copy this formula for any number of cells below, in the first column.
In cell B8, write 1. This is our starting value, showing you can only score 0 on 0 dice.
In cell C9, write the formula "=SUM(B3:B8 )" and copy this formula to any number of cells in the spreadsheet, right or below C9. This is our formula that counts the number of ways you can score 1 to 6 less on one dice less.
And you're done!
You can use this Google spreadsheet to check your result.
https://docs.google.com/spreadsheet/ccc ... 0VoZVVvMXc
Calculating chance
To calculate the chance instead of the number of permutations, simply replace our formula in Cell C9 with "=SUM(B3:B8 ) / 6". This will divide our permutations by all possible outcomes, yielding our percentages.
You can use this Google spreadsheet to check your result.
https://docs.google.com/spreadsheet/ccc ... kNZM1I0U0E
Method 2: Binomial function, aka more efficient calculation
Calculating the odds of dice begins with a pattern very similar to the triangle of Pascal. It's binomial function, but where binomial functions increase only as you go deeper, your odds go down.
If we denote R(s,n) as the number of ways to roll score "s" on "n" dice, then
R(s,n) = R(s-1,n-1) + R(s-1, n) - R(s-7, n-1).
The first part is the triangle of Pascal. The minus helps to reduce your permutations to the right number. This can be computed efficiently since you bring it down to a computation of 3 numbers, instead of 6 from the previous method.
You can check this spreadsheet to see it in action:
https://docs.google.com/spreadsheet/ccc ... 0lqTTRpdnc
Though current spreadsheet calculators might make easy work of both methods, it could be noted its notably more efficient when computed for large numbers.
I'm slowly gaining my interest back in the game and my new 8th ed rulebook will soon be in my eager hands. Meanwhile, I try to retrace my latest steps in this game: theoryhammer. It's also a bit of a hobby of mine to approach some problems and challenges mathematically. Mathematical models can help us understand what some numbers mean, how they tend to work and to estimate our chances more accurately.
To get started, I'm brining a model on the good old feeling of rolling those dice in our hands.
Daeron
Cheat sheet
Without further ado, these are the tables with odds for rolling a score on dice.. from 1 dice to 6 dice.
The table "At least" shows you the odds of rolling at least a certain score on a number of dice.
Score . . 1d6 . . . . 2d6 . . . . 3d6 . . . . 4d6 . . . . 5d6 . . . . 6d6
02+ . . 83.3% . . 100.% . . 100.% . . 100.% . . 100.% . . 100.%
03+ . . 66.7% . . 97.2% . . 100.% . . 100.% . . 100.% . . 100.%
04+ . . 50.0% . . 91.7% . . 99.5% . . 100.% . . 100.% . . 100.%
05+ . . 33.3% . . 83.3% . . 98.1% . . 99.9% . . 100.% . . 100.%
06+ . . 16.7% . . 72.2% . . 95.4% . . 99.6% . . 100.% . . 100.%
07+ . . 00.0% . . 58.3% . . 90.7% . . 98.8% . . 99.9% . . 100.%
08+ . . 00.0% . . 41.7% . . 83.8% . . 97.3% . . 99.7% . . 100.%
09+ . . 00.0% . . 27.8% . . 74.1% . . 94.6% . . 99.3% . . 99.9%
10+ . . 00.0% . . 16.7% . . 62.5% . . 90.3% . . 98.4% . . 99.8%
11+ . . 00.0% . . 08.3% . . 50.0% . . 84.1% . . 96.8% . . 99.5%
12+ . . 00.0% . . 02.8% . . 37.5% . . 76.1% . . 94.1% . . 99.0%
13+ . . 00.0% . . 00.0% . . 25.9% . . 66.4% . . 90.2% . . 98.0%
14+ . . 00.0% . . 00.0% . . 16.2% . . 55.6% . . 84.8% . . 96.4%
15+ . . 00.0% . . 00.0% . . 09.3% . . 44.4% . . 77.9% . . 93.9%
16+ . . 00.0% . . 00.0% . . 04.6% . . 33.6% . . 69.5% . . 90.4%
17+ . . 00.0% . . 00.0% . . 01.9% . . 23.9% . . 60.0% . . 85.5%
18+ . . 00.0% . . 00.0% . . 00.5% . . 15.9% . . 50.0% . . 79.4%
19+ . . 00.0% . . 00.0% . . 00.0% . . 09.7% . . 40.0% . . 72.1%
20+ . . 00.0% . . 00.0% . . 00.0% . . 05.4% . . 30.5% . . 63.7%
21+ . . 00.0% . . 00.0% . . 00.0% . . 02.7% . . 22.1% . . 54.6%
22+ . . 00.0% . . 00.0% . . 00.0% . . 01.2% . . 15.2% . . 45.4%
23+ . . 00.0% . . 00.0% . . 00.0% . . 00.4% . . 09.8% . . 36.3%
24+ . . 00.0% . . 00.0% . . 00.0% . . 00.1% . . 05.9% . . 27.9%
25+ . . 00.0% . . 00.0% . . 00.0% . . 00.0% . . 03.2% . . 20.6%
The table "At most" shows you the odds of rolling at most a certain score on a number of dice.
Score . . 1d6 . . . . 2d6 . . . . 3d6 . . . . 4d6 . . . . 5d6 . . . . 6d6
02- . . 33,3% . . 02,8% . . 00,0% . . 00,0% . . 00,0% . . 00,0%
03- . . 50,0% . . 08,3% . . 00,5% . . 00,0% . . 00,0% . . 00,0%
04- . . 66,7% . . 16,7% . . 01,9% . . 00,1% . . 00,0% . . 00,0%
05- . . 83,3% . . 27,8% . . 04,6% . . 00,4% . . 00,0% . . 00,0%
06- . . 100.% . . 41,7% . . 09,3% . . 01,2% . . 00,1% . . 00,0%
07- . . 100.% . . 58,3% . . 16,2% . . 02,7% . . 00,3% . . 00,0%
08- . . 100.% . . 72,2% . . 25,9% . . 05,4% . . 00,7% . . 00,1%
09- . . 100.% . . 83,3% . . 37,5% . . 09,7% . . 01,6% . . 00,2%
10- . . 100.% . . 91,7% . . 50,0% . . 15,9% . . 03,2% . . 00,5%
11- . . 100.% . . 97,2% . . 62,5% . . 23,9% . . 05,9% . . 01,0%
12- . . 100.% . . 100.% . . 74,1% . . 33,6% . . 09,8% . . 02,0%
13- . . 100.% . . 100.% . . 83,8% . . 44,4% . . 15,2% . . 03,6%
14- . . 100.% . . 100.% . . 90,7% . . 55,6% . . 22,1% . . 06,1%
15- . . 100.% . . 100.% . . 95,4% . . 66,4% . . 30,5% . . 09,6%
16- . . 100.% . . 100.% . . 98,1% . . 76,1% . . 40,0% . . 14,5%
17- . . 100.% . . 100.% . . 99,5% . . 84,1% . . 50,0% . . 20,6%
18- . . 100.% . . 100.% . . 100.% . . 90,3% . . 60,0% . . 27,9%
19- . . 100.% . . 100.% . . 100.% . . 94,6% . . 69,5% . . 36,3%
20- . . 100.% . . 100.% . . 100.% . . 97,3% . . 77,9% . . 45,4%
21- . . 100.% . . 100.% . . 100.% . . 98,8% . . 84,8% . . 54,6%
22- . . 100.% . . 100.% . . 100.% . . 99,6% . . 90,2% . . 63,7%
23- . . 100.% . . 100.% . . 100.% . . 99,9% . . 94,1% . . 72,1%
24- . . 100.% . . 100.% . . 100.% . . 100.% . . 96,8% . . 79,4%
25- . . 100.% . . 100.% . . 100.% . . 100.% . . 98,4% . . 85,5%
This is interesting to answer questions such as:
- What's the chance to succeed in casting this spell, or dispelling a castvalue, with a given number of dice?
- How much does adding another power or dispel dice increase my odds on success?
- How likely is a unit to succeed or fail a leadership test?
Why is this useful?
Now we calculated the odds to score a given outcome on a number of dice (from 1 to 6 dice).
One can wonder.. why?
The very simple explanation is "to accelerate learning". If one were to play countless battles and have an excess of experience with rolling dice... then modeling odds with dice isn't going to teach one anything new. One acquires all the experience in hand and brain to judge what are good chances and what not.
However, for players like me who've been out of it for some time, or who do not have the luxury of playing several games a day to learn, a mathematical model can help "see" the odds in a more obvious manner.
Calculating these numbers
The rest of this post is mostly directed at fellow math-heads (matheadons?)... or people who are interested in developing their own calculator or spreadsheet for this. I doubt most players will wish, or need to dig this deep in the maths behind it, but I felt it would be a waste not to include my findings in this post.
The simplest method to calculate these odds is to calculate all possible permutations. In how many ways can you roll a "six" on two dice?
You could roll "1 and 5", "2 and 4", "3 and 3", "4 and 2", "5 and 1". Five ways. Two dice, with each 6 sides means there's 6*6 = 36 possible outcomes. 5 ways to roll a six out of 36 possible outcomes, means you have a 5/36 = 13.89% chance of rolling a six.
But this calculation becomes more tedious if you want to work this out for every outcome, with more than two dice.
I managed to make up two manners to calculate these odds. One is using permutations. The other using binomial functions (which does the same thing). The former is simpler, easer to understand but the latter is more efficient if you're trying to implement it.
Method 1: Combination a.k.a. easy to make in Excel
Explanation
The simplest way to calculate this "logically" is through an intuitive recursion.
What are the odds of rolling six on two dice? Let's go over the permutations in a different manner:
Well.. on my second dice, I can roll 1,2,3,4,5 or 6.
- If I roll 1, then I need to score 5 on my first dice. I can do that in 1 way.
- If I roll 2, then I need to score 4 on my first dice. I can do that in 1 way.
and so on. For every outcome I can have on my latest dice, I count the number of ways I can score a matching value on my previous dice.
What are the odds of rolling seven on three dice?
- If I roll 1 on my third dice, I need to roll 6 on my previous two dice. This can be done in 5 ways.
- If I roll 2 on my third dice, I need to roll 5 on my previous two dice. This can be done in 4 ways.
- If I roll 3 on my third dice, I need to roll 4 on my previous two dice. This can be done in 3 ways.
- If I roll 4 on my third dice, I need to roll 3 on my previous two dice. This can be done in 2 ways.
- If I roll 5 on my third dice, I need to roll 2 on my previous two dice. This can be done in 1 ways.
- If I roll 6 on my third dice, I can't roll 1 on my other two dice.
In total I have: 5+4+3+2+1 = 15 ways of rolling 7 on 3 dice. 3 dice offer 6*6*6= 216 possible outcomes, which gives me 6.94% chance of rolling exactly 7.
Doing this in Excel
Row 1 will represent the number of dice used.
Put 0 in Cell B1. Write "=B1+1" in Cell C1, and copy this for any number of cells to the right, in the first row.
Leave rows 2 to 7 open. These have to remain empty.
Column A will represent the score you're trying to obtain.
Put 0 in Cell A8. Write "=A8+1" in Cell A9 and copy this formula for any number of cells below, in the first column.
In cell B8, write 1. This is our starting value, showing you can only score 0 on 0 dice.
In cell C9, write the formula "=SUM(B3:B8 )" and copy this formula to any number of cells in the spreadsheet, right or below C9. This is our formula that counts the number of ways you can score 1 to 6 less on one dice less.
And you're done!
You can use this Google spreadsheet to check your result.
https://docs.google.com/spreadsheet/ccc ... 0VoZVVvMXc
Calculating chance
To calculate the chance instead of the number of permutations, simply replace our formula in Cell C9 with "=SUM(B3:B8 ) / 6". This will divide our permutations by all possible outcomes, yielding our percentages.
You can use this Google spreadsheet to check your result.
https://docs.google.com/spreadsheet/ccc ... kNZM1I0U0E
Method 2: Binomial function, aka more efficient calculation
Calculating the odds of dice begins with a pattern very similar to the triangle of Pascal. It's binomial function, but where binomial functions increase only as you go deeper, your odds go down.
If we denote R(s,n) as the number of ways to roll score "s" on "n" dice, then
R(s,n) = R(s-1,n-1) + R(s-1, n) - R(s-7, n-1).
The first part is the triangle of Pascal. The minus helps to reduce your permutations to the right number. This can be computed efficiently since you bring it down to a computation of 3 numbers, instead of 6 from the previous method.
You can check this spreadsheet to see it in action:
https://docs.google.com/spreadsheet/ccc ... 0lqTTRpdnc
Though current spreadsheet calculators might make easy work of both methods, it could be noted its notably more efficient when computed for large numbers.