Page 1 of 1

[Theoryhammer] Chances on dice rolls with multiple dice.

Posted: Thu Aug 30, 2012 1:50 pm
by Daeron
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.

Posted: Thu Aug 30, 2012 2:18 pm
by Calisson
Thanks for the effort.

I'd like to find a summary, cause I can't remind all these numbers...

Likely (90%): with 1d6, you get obviously 1; add 3 per d6.
Average: 3.5 per dice, we all know that.
Unlikely (10%): with 1d6, you get obviously 6; add 4 per d6.

How to use my summary?
1 die = 1 likely, 3.5 average, 6 unlikely.
2 dice = 4 likely, 7 average, 10 unlikely.
3 dice = 7 likely, 10.5 average, 14 unlikely.
4 dice = 10 likely, 14 average, 18 unlikely.
...

Posted: Thu Aug 30, 2012 2:26 pm
by Daeron
I was thinking to just make a pretty looking lookup table on a sheet of paper and have it with my reference sheets. I'm working on one, actually. I could post it when I'm done :)

What you consider "likely" is a subjective thing though. SOme people would prefer to aim for 90%, some 80%, some risk less. The tighter you make it, the more reliable your play becomes but the less freedom you'll have in your strategy.

Re: [Theoryhammer] Chances on dice rolls with multiple dice.

Posted: Thu Aug 30, 2012 3:00 pm
by Dyvim tvar
Note that this is not an accurate way to determine the chance to cast since a double 6 succeeds even if your total is less than the casting value of the spell. Of course, this only matters for spells with a high casting value and depending on the number of dice you roll. For example, if you have a spell and you need a 13 (taking caster level into account) and you are rolling 3 dice, Irresistible Force doesn't chance the probabilities since if you roll a double 6 your total will also be at least 13. But it generally does matter for higher-value spells where you can get a double 6 and still have a total less than the casting value. I did a calculation taking this into account a while back.

http://druchii.net/viewtopic.php?t=65664

Posted: Thu Aug 30, 2012 3:03 pm
by Red...
Thanks for the posting, looks very comprehensive.

A summary would definitely be helpful though - reading through all those figures would give me a headache!

Re: [Theoryhammer] Chances on dice rolls with multiple dice.

Posted: Thu Aug 30, 2012 5:07 pm
by Daeron


Ahh very nice. Actually, that was going to be my next step, but I had to relearn the rules to make sure I wasn't forgetting a thing. Did you describe the maths behind it somewhere?

Posted: Thu Aug 30, 2012 8:28 pm
by Dyvim tvar
Actually looking over my old table I realize I made a mistake in the calculation of the number of IFs where the casting value is not met. I'm going to try to find some time tonight to fix it.

Posted: Fri Aug 31, 2012 8:46 am
by Daeron
I'll try to race you to it, but I admit I'm a bit puzzled by the maths too. You see.. one has a fixed chance on casting IF on a fixed number of dice, but that chance is spread out over the results.
For example, you have the same shot on IF whether you try to roll 5+ on 3 dice, or 10+ on 3 dice. But... if you would augment that chance on a succesful cast by that the chance on IF, then you would have counted some successes as double.

However, including rules in your permutations might get a little more complicated. Ohh.. a challenge :D

Posted: Fri Aug 31, 2012 7:35 pm
by Daeron
Right. I got it. The easiest way I found to calculate it was to compute the number of ways to roll a score without rolling a single 6. That's easy, it's done the same way as rolling anything, with 1 calculation less (when you roll 6).
The intermediate step I needed was to calculate all rolls with at most 1 six: On n dice, I can:
- roll less than 6 on my n-th dice and then a matching score with at most 1 six on n-1
- roll a 6 on my n-th dice and then a matching score without 6 on n-1

You can see the calculations here:
https://docs.google.com/spreadsheet/ccc ... VlKb3FMNVE

The chance to score a given cast, taking into account irresistable force, is then the chance of rolling your score without irresistable force plus your chance to roll irresistable force.
This yields:

. . . . . . . 1d6 . . . . 2d6 . . . . 3d6 . . . . 4d6 . . . . 5d6 . . . . 6d6 . . . . 7d6
01+ . . . . 100.% . . 100.% . . 100.% . . 100.% . . 100.% . . 100.% . . 100.%
02+ . . . . 83.3% . . 100.% . . 100.% . . 100.% . . 100.% . . 100.% . . 100.%
03+ . . . . 66.7% . . 97.2% . . 100.% . . 100.% . . 100.% . . 100.% . . 100.%
04+ . . . . 50.0% . . 91.7% . . 99.5% . . 100.% . . 100.% . . 100.% . . 100.%
05+ . . . . 33.3% . . 83.3% . . 98.1% . . 99.9% . . 100.% . . 100.% . . 100.%
06+ . . . . 16.7% . . 72.2% . . 95.4% . . 99.6% . . 100.% . . 100.% . . 100.%
07+ . . . . 00.0% . . 58.3% . . 90.7% . . 98.8% . . 99.9% . . 100.% . . 100.%
08+ . . . . 00.0% . . 41.7% . . 83.8% . . 97.3% . . 99.7% . . 100.% . . 100.%
09+ . . . . 00.0% . . 27.8% . . 74.1% . . 94.6% . . 99.3% . . 99.9% . . 100.%
10+ . . . . 00.0% . . 16.7% . . 62.5% . . 90.3% . . 98.4% . . 99.8% . . 100.%
11+ . . . . 00.0% . . 08.3% . . 50.0% . . 84.1% . . 96.8% . . 99.5% . . 100.%
12+ . . . . 00.0% . . 02.8% . . 37.5% . . 76.1% . . 94.1% . . 99.0% . . 99.9%
13+ . . . . 00.0% . . 02.8% . . 25.9% . . 66.4% . . 90.2% . . 98.0% . . 99.7%
14+ . . . . 00.0% . . 02.8% . . 17.6% . . 55.6% . . 84.8% . . 96.4% . . 99.4%
15+ . . . . 00.0% . . 02.8% . . 12.0% . . 44.8% . . 77.9% . . 93.9% . . 98.8%
16+ . . . . 00.0% . . 02.8% . . 08.8% . . 35.0% . . 69.6% . . 90.4% . . 97.8%
17+ . . . . 00.0% . . 02.8% . . 07.4% . . 26.7% . . 60.5% . . 85.6% . . 96.2%
18+ . . . . 00.0% . . 02.8% . . 07.4% . . 20.5% . . 51.3% . . 79.6% . . 93.9%
19+ . . . . 00.0% . . 02.8% . . 07.4% . . 16.7% . . 42.5% . . 72.5% . . 90.7%
20+ . . . . 00.0% . . 02.8% . . 07.4% . . 14.5% . . 35.0% . . 64.8% . . 86.4%
21+ . . . . 00.0% . . 02.8% . . 07.4% . . 13.5% . . 29.1% . . 56.9% . . 81.3%
22+ . . . . 00.0% . . 02.8% . . 07.4% . . 13.2% . . 24.8% . . 49.3% . . 75.2%
23+ . . . . 00.0% . . 02.8% . . 07.4% . . 13.2% . . 22.1% . . 42.6% . . 68.6%
24+ . . . . 00.0% . . 02.8% . . 07.4% . . 13.2% . . 20.7% . . 37.0% . . 61.9%
25+ . . . . 00.0% . . 02.8% . . 07.4% . . 13.2% . . 20.0% . . 32.9% . . 55.3%
26+ . . . . 00.0% . . 02.8% . . 07.4% . . 13.2% . . 19.7% . . 29.9% . . 49.4%
27+ . . . . 00.0% . . 02.8% . . 07.4% . . 13.2% . . 19.6% . . 28.1% . . 44.4%
28+ . . . . 00.0% . . 02.8% . . 07.4% . . 13.2% . . 19.6% . . 27.1% . . 40.4%
29+ . . . . 00.0% . . 02.8% . . 07.4% . . 13.2% . . 19.6% . . 26.6% . . 37.5%
30+ . . . . 00.0% . . 02.8% . . 07.4% . . 13.2% . . 19.6% . . 26.4% . . 35.5%

Posted: Fri Aug 31, 2012 7:44 pm
by Daeron
An easy rule of thumb is... You divide the cast value by 3. That's the number of dice that will give you about 72-77% chance on success. If you want 90% chance, add 1 more dice.
If dividing by 3 doesn't give a round number, round it up to have a good shot! Rounding down is taking risks.

Posted: Fri Aug 31, 2012 10:34 pm
by Dyvim tvar
I finished my recalculation a little while ago in Excel and it matches up with yours nearly identically. There is some very slight variation but I think it's due to rounding issues. I used a slightly different methodology:

1) For each target number, I calculated the number of outcomes for normal success (meeting the casting value) for up to 8 dice.

2) Calculated the number of outcomes less than the target number but with the occurrence of a double 6. This is only possible for sufficiently high target numbers (14+ on 3 dice, 15+ on 4 dice, etc.)

3) Added the 2 numbers above, and divided by total number of possible outcomes to get the percent chance of success

I only went up to 24 for a target number. Also went up to 8 dice, which I saw you did in your spreadsheet but not the table above.

Posted: Sat Sep 01, 2012 10:34 pm
by Lord tsunami
hmm... i thought i commented on this post earlier... weird...

anyway, i welcome a fellow math-hammerer back to the hobby :D

Posted: Tue Sep 18, 2012 12:37 am
by Lorddrittz
Very interesting Stats.

One thing of note is adding the Wizards Level in 8th Ed which further increases your chance of meeting the Spells casting value.

Posted: Tue Sep 18, 2012 2:33 am
by Dyvim tvar
Right -- and you take that into account by adjusting the target number. If you have a level 4 casting a spell with power level 9, look in the "5+" row of the table to get your percentages.

Posted: Sat Sep 22, 2012 12:55 am
by Lorddrittz
Thanks for that I am mathematically challenged :)