For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

12obin
Posts: 91
Joined: Tue Mar 26, 2013 1:15 am UTC

I'm preparing to DM my first Dungeons & Dragons game.
In fifth edition, there is something called advantage and disadvantage, which allows me to make a player roll twice and use the higher or lower roll according to the circumstances.
I want to understand when to use dis/advantage, as compared to more standard buffs and debuffs where they roll once and I just add or subtract a fixed number to/from the roll.

So my question is, what is the average difference between results a player should get when she rolls a twenty-sided die twice? My intuition says 10, but I don't know how to work it out.
Robin, she.

z4lis
Posts: 767
Joined: Mon Mar 03, 2008 10:59 pm UTC

Rolling 2 20-sided dice gives 20*20 = 400 possibilities. If you made a big 20x20 chart of what you'd get when you take the larger of the 2 dice, it'd look like this:

1 2 3 4
2 2 3 4
3 3 3 4
4 4 4 4

So we see
1 1's
3 2's
5 3's
7 4's
...
39 20's

So the probability of getting n when I have the advantage is 2n-1/400. To get the expected value, we need to figure out

SUM(n * (2n-1/400))
= 1/400 * SUM(2n^2 - n)
= 1/400 * (2SUM(n^2) - SUM(n))

And some cool people figured out formulas for adding up the first n numbers and the squares of the first n numbers:

1 + 2 + 3 + ... + n = n(n+1)/2
1 + 2^2 + 3^2 + ... + n^2 = n(n+1)(2n+1)/6

When I use 20, I get 210 for the first 20 numbers and 2870 for the first 20 squares. So my final answer for the expected value of an advantage roll is 13.825

By symmetry, I'd argue that the expected value for a disadvantage roll is 7.175.

Since the usual average roll on a 20-sided die is 10.5, it seems to amount to a +/- 3 buff.

HOWEVER! Let me point that when DMing games, you also need to think carefully about the distributions of rolls rather than just the average values, since rare events are really important for your characters. For instance, if one of your characters has an AC of 20 and minion takes a swing at him with advantage but no other attack bonuses, then the minion has a 39/400 = 9.75% chance of landing a hit by rolling a 20. On the other hand, if you decide to just give a flat +3 instead, the minion has a 20% chance of landing a hit. The AC 20 character has a much better chance of surviving a lot of hits in the roll-2-dice-advantage game than one taking a lot of hits in the flat-bonus-advantage game, which would come in handy if your party's heavily armored warrior drinks too much and starts punching people in a tavern.

I learned this little fact when I was convinced to run a game with instant death rolls for getting a 20 on the crit roll. It wasn't pretty.
What they (mathematicians) define as interesting depends on their particular field of study; mathematical anaylsts find pain and extreme confusion interesting, whereas geometers are interested in beauty.

12obin
Posts: 91
Joined: Tue Mar 26, 2013 1:15 am UTC

(To people who post after this, too! I'm not going to post separate thanks posts every time anyone is helpful because that would be silly.)
Last edited by 12obin on Thu Feb 26, 2015 1:50 am UTC, edited 1 time in total.
Robin, she.

phlip
Restorer of Worlds
Posts: 7573
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

Yeah, the distribution is very relevant because most of the rolls in a D&D game (at least, most of the ones that you'd be applying advantage/disadvantage to) are simple checks - either you hit a certain value or you don't. So EV isn't as applicable there. If you start applying the advantage system to things like damage rolls, then the EV comes into play there, and as z4lis's calcs show, it's a difference of about 3 points... but for your classic "roll at least a 12" situation, it's more complicated:
How likely a "roll at least n on a d20" check is to succeed - advantage/disadvantage compared to a simple plus/minus effect

By absolute differences, the largest swing is in the middle, for things that would, unmodified, be about 50/50... but by ratio the largest swings are at the "nail in the coffin" extremes - if something is very unlikely, then taking disadvantage will make it almost impossible (though advantage won't help much), while if something is very likely then taking advantage will make it almost certain (though disadvantage won't hurt much). Which is what you'd expect, if you think about it.

Note that this chart is for the target number they need to roll, after taking into account bonuses and whatnot (so, like, if they have to roll a 12 or better, and they have a bonus from stats of +3, then you'd look at the values for 9 on that graph to see what the effects of advantage/disadvantage would be).

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};
void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]

Qaanol
The Cheshirest Catamount
Posts: 3069
Joined: Sat May 09, 2009 11:55 pm UTC

It may also be worth mentioning that if you have the player roll 2 dice and simply average the result, you get something that makes easy rolls easier and hard rolls harder, while leaving moderate rolls alone. It looks quite similar to a cosine, starting out like the green curve at the top left of phlip’s graph and ending like the red curve at the bottom right, crossing diagonally in the middle.
Last edited by Qaanol on Thu Feb 26, 2015 4:50 am UTC, edited 1 time in total.
wee free kings

phlip
Restorer of Worlds
Posts: 7573
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

Or, to use mechanics you're already familiar with rather than the complicated math of "averaging", you can do roughly the same thing by replacing the d20 with 2d10 (or 3d6, for a stronger effect, though then you'll need to scale down your DCs slightly).

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};
void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]

Qaanol
The Cheshirest Catamount
Posts: 3069
Joined: Sat May 09, 2009 11:55 pm UTC

phlip wrote:Or, to use mechanics you're already familiar with rather than the complicated math of "averaging"

But I can totally justify that averaging is a valid and well-defined operation consistent with the axioms of ZFC, using only a handful of graduate-level text references!
wee free kings

Yakk
Poster with most posts but no title.
Posts: 11129
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove

First, unlike a +2 or -4, it feels like something different. The player rolls two dice! Also unlike -2/+4 it actually requires less math -- adding 7 repeatedly to a value is easier than sometimes adding 3, 5, 7, 9 or 11. With advantage/disadvantage, the modifiers on rolls stay relatively constant.

Second, it doesn't stack. This means if you give it out "too easy" or "too hard" it matters less. In addition, once you have a source of advantage, there is little to no incentive to search for another source. With modifiers, +2 is good, +4 is better, +6 is even better, until auto-hit (and often mechanics are developed to burn auto-hit level of modifiers into effectiveness, like power attack). This cuts short "modifier bargaining" or "modifier optimization" for players, and for DMs also makes their problems easier: ok, they are in darkness, disadvantage. The DM can now stop thinking about if they are at a lower height or any other source of disadvantage and move on to another problem. (Sadly, cover and concealment break this rule)

There are also some nice things about how it isn't uniform with accuracy modifiers, the possibility to hook things onto doubles, and the ease of communication (advantage is easier to communicate than +2 or +3 or +4 -- a binary state, instead of a scalar). But those are less important.
One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision - BR

Last edited by JHVH on Fri Oct 23, 4004 BCE 6:17 pm, edited 6 times in total.

cphite
Posts: 1370
Joined: Wed Mar 30, 2011 5:27 pm UTC

12obin wrote:I'm preparing to DM my first Dungeons & Dragons game.
In fifth edition, there is something called advantage and disadvantage, which allows me to make a player roll twice and use the higher or lower roll according to the circumstances.
I want to understand when to use dis/advantage, as compared to more standard buffs and debuffs where they roll once and I just add or subtract a fixed number to/from the roll.

So my question is, what is the average difference between results a player should get when she rolls a twenty-sided die twice? My intuition says 10, but I don't know how to work it out.

The main thing to keep in mind is that for most rolls, the difference is fairly large.

For example, if the player needs an 11 to succeed - which is normally a 50% thing - the advantage gives him a 75% chance and the disadvantage makes it 25% - which is pretty much the same as a +5 (or -5) flat adjustment. Which is pretty big.

If the player needs a 15 to succeed - normally a 30% chance - the advantage rate is 51% and the disadvantage is 9% - again, this is fairly large.

For the highest rolls - say they need an 18 which is normally 15% - it swings from around 28% for advantage to just over 2% for disadvantage.

Now, don't get me wrong... this isn't necessarily a bad thing. It's actually more realistic in my opinion - easy stuff becomes much easier when you're at an advantage; and only slightly more difficult. The harder things get, the more being at a disadvantage hurts you, etc. Just be aware of how big the changes actually are before you think about adding this on top of any bonuses or penalties. For example, if you give your player a disadvantage AND a -4 penalty at something, it's roughly like giving him a -9 in the traditional sense.