Average Difference between 2 Dice
Moderators: gmalivuk, Moderators General, Prelates

 Posts: 1026
 Joined: Fri Feb 07, 2014 3:15 pm UTC
Average Difference between 2 Dice
In the newest addition of D&D, if someone helps you do a task you get to roll the die twice and take the higher result. I did not like this for various reasons that do not really matter right now, so I decided to change it to a single roll that gets 5 added to it. After a while I started wondering if this was a fair change.
I tried thinking about how much higher a one roll should be than another, but could not really figure out a solution. Since it is the same die, each roll has the same average value and any number subtracted from itself is 0. That would mean that rolling twice does not give you any advantage, which is clearly wrong.
I tried thinking about how much higher a one roll should be than another, but could not really figure out a solution. Since it is the same die, each roll has the same average value and any number subtracted from itself is 0. That would mean that rolling twice does not give you any advantage, which is clearly wrong.
"You are not running off with CowSkull Man Dracula Skeletor!"
Socrates
Socrates
Re: Average Difference between 2 Dice
Assuming two sixsided dice, rolling two dice and taking the higher result has an average result of 4.47 (161/36) instead of 3.5 (21/6) for one die. So adding 5 to the result from rolling one die is definitly out of line. Adding 1 might be okay if you really want to only roll one die. But it is still different regarding the range of the results (27 instead of 16) and the distribution in that range.
Re: Average Difference between 2 Dice
Suppose we have two nsided dice, throw them both and take the highest of the two values.
Then there is only 1 way to score 1.
There are 3 ways to score 2 (1&2, 2&2, 2&1).
There are 5 ways to score 3 (1&3, 2&3, 3&3, 3&2, 3&1).
...
There are 2n1 ways to score n (n with first die showing n, n with second showing n, but minus one because the n&n must only be counted once).
So the probability of scoring a value of k is (2k1)/n^2.
The expectation is then:
E = SUM{k=1...n} ( k * (2k1)/n^2 )
After some simplification using the usual summation formulas you get:
E = (n+1)(4n1) / 6n
For a D20 this is 21*79/120 = 13.825
This is only 3.325 more than the average single roll of 10.5.
[Edited to fix a sign error, and the previously incorrect numbers resulting from that.]
Note also, that if you are using a D30, then the 5 point difference is about right.
Then there is only 1 way to score 1.
There are 3 ways to score 2 (1&2, 2&2, 2&1).
There are 5 ways to score 3 (1&3, 2&3, 3&3, 3&2, 3&1).
...
There are 2n1 ways to score n (n with first die showing n, n with second showing n, but minus one because the n&n must only be counted once).
So the probability of scoring a value of k is (2k1)/n^2.
The expectation is then:
E = SUM{k=1...n} ( k * (2k1)/n^2 )
After some simplification using the usual summation formulas you get:
E = (n+1)(4n1) / 6n
For a D20 this is 21*79/120 = 13.825
This is only 3.325 more than the average single roll of 10.5.
[Edited to fix a sign error, and the previously incorrect numbers resulting from that.]
Note also, that if you are using a D30, then the 5 point difference is about right.
Last edited by jaap on Mon Dec 17, 2018 7:25 pm UTC, edited 2 times in total.
Re: Average Difference between 2 Dice
jaap, you might want to check your work. A simple program like:
gives me 13.825.
And the average of the maximum of two d2s should be 1*0.25 + 2 * 0.75 = 1.75, while your formula gives (n1)(4n1)/6n = (1)(7)/12 = 0.583333..
Code: Select all
>> M=zeros(20);
>> for i=1:20
for j=1:20
M(i,j)=max(i,j);
end
end
>> sum(sum(M))/400
gives me 13.825.
And the average of the maximum of two d2s should be 1*0.25 + 2 * 0.75 = 1.75, while your formula gives (n1)(4n1)/6n = (1)(7)/12 = 0.583333..
Re: Average Difference between 2 Dice
DavidSh wrote:jaap, you might want to check your work.
Thanks. I had n1 instead of n+1 in my formula. Fixed it now.
 Xanthir
 My HERO!!!
 Posts: 5400
 Joined: Tue Feb 20, 2007 12:49 am UTC
 Location: The Googleplex
 Contact:
Re: Average Difference between 2 Dice
jewishscientist did not state in their OP that the dice in question are d20s, but you can assume that to be the case, as they're referring to the advantage mechanic from D&D.
As always with dice, it's easier to just throw some simulation at the problem than it is to figure out the exact answer. A million trials later, https://codepen.io/TabAtkins/pen/BvLNRY?editors=1010 shows that advantage grants roughly a +3.3 to the roll. (And disadvantage gives the same value as a penalty.) (As others have pointed out, the exact value is 3.325; a million trials gets you close to that, but you need to up the trials by another order of magnitude or two to reliably hit that.)
THAT ALL SAID, you shouldn't throw away advantage, it's an excellent mechanic. It boosts likelihood of success without actually changing the *range* of things people can succeed/fail at, which was an important consideration in the design of the game; it's much better to drop to a 1/400 chance of hitting a DC 20 than a 0% chance because your entire range slipped downwards. Most importantly tho, it's *fun*, much more fun than adding a flat bonus. Everyone likes throwing two dice, it feels good.
(Note that the designers treat advantage/disadvantage on passive scores, like Passive Perception, as a flat +5 or 5. This is because (a) 5 is a rounder number than 3, who cares, and (b) flat bonuses like this are fine for passives, because they don't take you outside the range of possible rolled values, as they start from an assumed roll of 10.)
As always with dice, it's easier to just throw some simulation at the problem than it is to figure out the exact answer. A million trials later, https://codepen.io/TabAtkins/pen/BvLNRY?editors=1010 shows that advantage grants roughly a +3.3 to the roll. (And disadvantage gives the same value as a penalty.) (As others have pointed out, the exact value is 3.325; a million trials gets you close to that, but you need to up the trials by another order of magnitude or two to reliably hit that.)
THAT ALL SAID, you shouldn't throw away advantage, it's an excellent mechanic. It boosts likelihood of success without actually changing the *range* of things people can succeed/fail at, which was an important consideration in the design of the game; it's much better to drop to a 1/400 chance of hitting a DC 20 than a 0% chance because your entire range slipped downwards. Most importantly tho, it's *fun*, much more fun than adding a flat bonus. Everyone likes throwing two dice, it feels good.
(Note that the designers treat advantage/disadvantage on passive scores, like Passive Perception, as a flat +5 or 5. This is because (a) 5 is a rounder number than 3, who cares, and (b) flat bonuses like this are fine for passives, because they don't take you outside the range of possible rolled values, as they start from an assumed roll of 10.)
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
 Soupspoon
 You have done something you shouldn't. Or are about to.
 Posts: 4060
 Joined: Thu Jan 28, 2016 7:00 pm UTC
 Location: 531
Re: Average Difference between 2 Dice
I always quite liked the old "Babylon 5 Dice" method. One red D6, one green (or other prearranged differentiation, at a push).
Roll them both, use the lowest one of the two as an offset to the success level. If it's red it makes the value negative, green makes it positive. Doubles are exactly on target, except for double 1 (critical failure) or double 6 (critical success).
The distributive set of rolls is thus, reordered:
{Fail! 5 4 4 3 3 3 2 2 2 2 1 1 1 1 1 0 0 0 0 +1 +1 +1 +1 +1 +2 +2 +2 +2 +3 +3 +3 +4 +4 +5 Succeed!}
In short, a nominally normal distribution, but with a depressed centre (boring result, anyway) with the export of a pair of results towards each of the longer tailings (excitement!).
Takes a bit to get used to¹, but it has a justification to it. Things like intrinsic advantage/disadvantage and other aptitude are applied before the roll, to find the medianpoint of accomplishment, the dice are there to smoosh that 'expected' result in interesting directions by unpredictable degrees.
I think. It's been a long time since I was in that setting/system.
And you could use D>6s (or unevenly spotted Dxs?) for variations on the pattern, I suppose. Just not in that game rules. Then there's adding further Ds for rebalancing or even a trifecta result (lowest D6 is yellow). Or what about if one of the three blues is the lowball, in a thrown mass, and equally so are two of the white ones!.
(Taking the highball(s) instead would bias heavily towards (noncritical) extremes. Shorn of parity, this is what the "best of two dice" of the OP does. But I don't disagree with the rest of the calculations, even if I was still thinking in terms of D6 results when I peeked at the thread, only to be shown how oldfashioned I am, polyhedrally.)
¹ You know those experiments where a chimp has to choose which of a pair of quantities represents the reward size the other chimp benefits from, but they compulsively select the larger of the two [i]because it's larger[/i? Even though they realise their error even as they indcate their decision? Well, you have to get over the hump of looking at the die with the most dots on its topside, in your first glance at the justsettled pair. Really twists your mind!
Roll them both, use the lowest one of the two as an offset to the success level. If it's red it makes the value negative, green makes it positive. Doubles are exactly on target, except for double 1 (critical failure) or double 6 (critical success).
The distributive set of rolls is thus, reordered:
{Fail! 5 4 4 3 3 3 2 2 2 2 1 1 1 1 1 0 0 0 0 +1 +1 +1 +1 +1 +2 +2 +2 +2 +3 +3 +3 +4 +4 +5 Succeed!}
In short, a nominally normal distribution, but with a depressed centre (boring result, anyway) with the export of a pair of results towards each of the longer tailings (excitement!).
Takes a bit to get used to¹, but it has a justification to it. Things like intrinsic advantage/disadvantage and other aptitude are applied before the roll, to find the medianpoint of accomplishment, the dice are there to smoosh that 'expected' result in interesting directions by unpredictable degrees.
I think. It's been a long time since I was in that setting/system.
And you could use D>6s (or unevenly spotted Dxs?) for variations on the pattern, I suppose. Just not in that game rules. Then there's adding further Ds for rebalancing or even a trifecta result (lowest D6 is yellow). Or what about if one of the three blues is the lowball, in a thrown mass, and equally so are two of the white ones!.
(Taking the highball(s) instead would bias heavily towards (noncritical) extremes. Shorn of parity, this is what the "best of two dice" of the OP does. But I don't disagree with the rest of the calculations, even if I was still thinking in terms of D6 results when I peeked at the thread, only to be shown how oldfashioned I am, polyhedrally.)
¹ You know those experiments where a chimp has to choose which of a pair of quantities represents the reward size the other chimp benefits from, but they compulsively select the larger of the two [i]because it's larger[/i? Even though they realise their error even as they indcate their decision? Well, you have to get over the hump of looking at the die with the most dots on its topside, in your first glance at the justsettled pair. Really twists your mind!
Last edited by Soupspoon on Mon Dec 17, 2018 11:31 pm UTC, edited 2 times in total.
 Xanthir
 My HERO!!!
 Posts: 5400
 Joined: Tue Feb 20, 2007 12:49 am UTC
 Location: The Googleplex
 Contact:
Re: Average Difference between 2 Dice
So rolling a green 5/red 6 gives a +5 result?
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
 Soupspoon
 You have done something you shouldn't. Or are about to.
 Posts: 4060
 Joined: Thu Jan 28, 2016 7:00 pm UTC
 Location: 531
Re: Average Difference between 2 Dice
Xanthir wrote:So rolling a green 5/red 6 gives a +5 result?
Yes.
(I may have now edited a little more into that post than you just read, BTW, as I thought of more to say. But you obviously get the idea.)
 Xanthir
 My HERO!!!
 Posts: 5400
 Joined: Tue Feb 20, 2007 12:49 am UTC
 Location: The Googleplex
 Contact:
Re: Average Difference between 2 Dice
Ah, indeed. Yes, D&D's advantage/disadvantage system *does* purposely skew heavier to the extremes, because that's the point  it's not used for average rolls (those are just a flat d20), but rather to represent situations where you are at a particular advantage or disadvantage, and thus are much more likely to succeed or fail.
(This is another reason why adv/dis is much better than a flat bonus  the changed *shape* of the distribution is significant for the rules that care about *particular die values*, rather than roll results. In particular, a critical hit, which happens on a roll of 20, goes from 5% to 9.75%, nearly a doubling, with advantage; it drops to .25% with disadvantage, making it both "almost impossible" and "extremely exciting when it still happens". A flat +5 or 5 just makes you 25% more or less likely to successfully hit; it doesn't change change your crit chance at all.)
(This is another reason why adv/dis is much better than a flat bonus  the changed *shape* of the distribution is significant for the rules that care about *particular die values*, rather than roll results. In particular, a critical hit, which happens on a roll of 20, goes from 5% to 9.75%, nearly a doubling, with advantage; it drops to .25% with disadvantage, making it both "almost impossible" and "extremely exciting when it still happens". A flat +5 or 5 just makes you 25% more or less likely to successfully hit; it doesn't change change your crit chance at all.)
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
 Soupspoon
 You have done something you shouldn't. Or are about to.
 Posts: 4060
 Joined: Thu Jan 28, 2016 7:00 pm UTC
 Location: 531
Re: Average Difference between 2 Dice
I last played (vanilla) ?A?D&D no later than... '91 or' 92, if I've not forgotten a later time. I couldn't even tell you for certain that there were no D20s involved, but I rather imagine I probably just threw a designated number of D6s according to various requests by the person running that game, worrying more about a good story than the mechanics/legitimacy of the rolls I was making.
You could probably work it out by checking the edition I might have been using (may have been not the latest source/systembooks), if you haven't got all that historic information imprinted in your head.
But D6 were still all the rage (c.f. the original West End Games version of the Star Wars RPG), so everyone seemed to have masses of cubic dice, and maybe a few other platonic/nonplatonic solids.
Sorry. Nostalgia ('…aint what it used to be'). But I already waited to chip in my one intended comment only when I thought there wasn't much more to say about OP's original point, exvept then I got carried away. Please rerail, though if necessary.
You could probably work it out by checking the edition I might have been using (may have been not the latest source/systembooks), if you haven't got all that historic information imprinted in your head.
But D6 were still all the rage (c.f. the original West End Games version of the Star Wars RPG), so everyone seemed to have masses of cubic dice, and maybe a few other platonic/nonplatonic solids.
Sorry. Nostalgia ('…aint what it used to be'). But I already waited to chip in my one intended comment only when I thought there wasn't much more to say about OP's original point, exvept then I got carried away. Please rerail, though if necessary.

 Posts: 1026
 Joined: Fri Feb 07, 2014 3:15 pm UTC
Re: Average Difference between 2 Dice
Xanthir wrote:jewishscientist did not state in their OP that the dice in question are d20s, but you can assume that to be the case, as they're referring to the advantage mechanic from D&D.
As always with dice, it's easier to just throw some simulation at the problem than it is to figure out the exact answer.
I wanted to generalize to dice of any size.
THAT ALL SAID, you shouldn't throw away advantage, it's an excellent mechanic. It boosts likelihood of success without actually changing the *range* of things people can succeed/fail at, which was an important consideration in the design of the game; it's much better to drop to a 1/400 chance of hitting a DC 20 than a 0% chance because your entire range slipped downwards.
Even if having a disadvantage makes it impossible for you to roll high enough to pass, you would still have a 5% chance of passing. You forgot that rolling a 20 always results in a success.
Anyway, my biggest problem with the vanilla system is that it does not stack. One enemy trying to break down a door vs one player trying to hold it up is equivalent to 2 enemies trying to break down a door vs >2 players trying to hold it up. I though about changing it so the extra rolls do stack, but I was worried that would get too unmanageable at higher amounts of advantage.
Xanthir wrote:A flat +5 or 5 just makes you 25% more or less likely to successfully hit; it doesn't change change your crit chance at all.
I actually see that as a pro, but I can understand how you may argue that it is a con.
"You are not running off with CowSkull Man Dracula Skeletor!"
Socrates
Socrates
 doogly
 Dr. The Juggernaut of Touching Himself
 Posts: 5526
 Joined: Mon Oct 23, 2006 2:31 am UTC
 Location: Lexington, MA
 Contact:
Re: Average Difference between 2 Dice
jewish_scientist wrote:Even if having a disadvantage makes it impossible for you to roll high enough to pass, you would still have a 5% chance of passing. You forgot that rolling a 20 always results in a success.
Only for hit attempts, not skill checks!
LE4dGOLEM: What's a Doug?
Noc: A larval Doogly. They grow the tail and stinger upon reaching adulthood.
Keep waggling your butt brows Brothers.
Or; Is that your eye butthairs?
Noc: A larval Doogly. They grow the tail and stinger upon reaching adulthood.
Keep waggling your butt brows Brothers.
Or; Is that your eye butthairs?
 gmalivuk
 GNU Terry Pratchett
 Posts: 26724
 Joined: Wed Feb 28, 2007 6:02 pm UTC
 Location: Here and There
 Contact:
Re: Average Difference between 2 Dice
Though I have played with DMs who modified that rule so there's always a chance for success (or failure) no matter how certain it should be on paper.
(He did it by just extending the 20 and 1 rules to all rolls, though I'd prefer to decrease both chances with a second roll so it works more like crits. For example, in standard rules the 40lb Halfling would have a 0% chance of knocking down this door, and making that a 5% chance is kind of silly, but making it a 1% chance or a 0.25% chance still keeps some of the potential for suspense without having ridiculous things happen every few rounds.)
In any case, if you just want to know the stats instead of knowing the general formulas for calculating them all, this site is pretty good.
For example, 2d20D1 is the standard advantage (take the highest of two rolls) and has an average of 13.82 (I guess it truncates rather than rounding), whereas adding "more advantage" could be 3d20D2, with an average of 15.49. You can mix and match options to find a rule that has the average (and distribution) you want.
(He did it by just extending the 20 and 1 rules to all rolls, though I'd prefer to decrease both chances with a second roll so it works more like crits. For example, in standard rules the 40lb Halfling would have a 0% chance of knocking down this door, and making that a 5% chance is kind of silly, but making it a 1% chance or a 0.25% chance still keeps some of the potential for suspense without having ridiculous things happen every few rounds.)
In any case, if you just want to know the stats instead of knowing the general formulas for calculating them all, this site is pretty good.
For example, 2d20D1 is the standard advantage (take the highest of two rolls) and has an average of 13.82 (I guess it truncates rather than rounding), whereas adding "more advantage" could be 3d20D2, with an average of 15.49. You can mix and match options to find a rule that has the average (and distribution) you want.
 Xanthir
 My HERO!!!
 Posts: 5400
 Joined: Tue Feb 20, 2007 12:49 am UTC
 Location: The Googleplex
 Contact:
Re: Average Difference between 2 Dice
Advantage not "stacking" is also *intentional*. Previous editions, 3e in particular, often got bogged down by players seeking to maximize their bonus by getting lots of small bonuses from multiple sources. It made it frustrating to try to give circumstance bonuses from combat positioning/etc, because it was too easy to extrapolate into massive combined bonuses.
The adv/dis system purposely throws that away and has a single level of bonus/penalty. No need to seek out crazy stacking situations, just find some reason to justify an advantage (or dis on an enemy) and you're good. Clean and simple.
If you disagree with that reasoning, okay fine, but don't just throw it away outright. It was done that way on purpose and for a good reason, so make sure your game actually needs the change before you start twerking it. Are your players actually complaining about not being able to stack advantages?
Same with the change in crit chance. Advantage ~doubling your crit chance was *intentional* and *desired* in the design of the system, as was disadvantage rendering crits nearly impossible. Are your players complaining that they crit too much with advantage, or crit too little with disadvantage? Is it causing a problem when you run your monsters?
Plus, dang, rolling two dice is just *more fun* than adding +5 to a roll.
The adv/dis system purposely throws that away and has a single level of bonus/penalty. No need to seek out crazy stacking situations, just find some reason to justify an advantage (or dis on an enemy) and you're good. Clean and simple.
If you disagree with that reasoning, okay fine, but don't just throw it away outright. It was done that way on purpose and for a good reason, so make sure your game actually needs the change before you start twerking it. Are your players actually complaining about not being able to stack advantages?
Same with the change in crit chance. Advantage ~doubling your crit chance was *intentional* and *desired* in the design of the system, as was disadvantage rendering crits nearly impossible. Are your players complaining that they crit too much with advantage, or crit too little with disadvantage? Is it causing a problem when you run your monsters?
Plus, dang, rolling two dice is just *more fun* than adding +5 to a roll.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
 Quizatzhaderac
 Posts: 1772
 Joined: Sun Oct 19, 2008 5:28 pm UTC
 Location: Space Florida
Re: Average Difference between 2 Dice
Is there a formal name for this concept? And/or a straightforward relationship to the standard deviation?
The thing about recursion problems is that they tend to contain other recursion problems.
Who is online
Users browsing this forum: No registered users and 11 guests