How do I compare the result of “1d20+x, with advantage” to “1d20+y, without advantage”, assuming x < y?Ranged attacks from hiding with Advantage?How does replacing Advantage with a flat +2 affect Champion critical hit damage output?How else can I get Advantage on Death Saving Throws?How do these mass advantage/disadvantage rolls work out statistically?How to avoid the determinism of Passive PerceptionIf I have both advantage and disadvantage, and my target is Elusive, do I have disadvantage on the attack?Adding Precision Strike to an attack with advantageShould a character get advantage on a roll for attacking someone with a spell from behind?What's the benefit for Saving Throws of rerolling vs. advantage?What issues could arise with this Advantage/Disadvantage Variant?

Heat lost in ideal capacitor charging

Who knighted this Game of Thrones character?

What is the recommended procedure to land a taildragger in a crosswind?

One word for 'the thing that attracts me'?

Variable declaraton with extra in C

Testing using real data of the customer

Possibility of faking someone's public key

Using too much dialogue?

Dad jokes are fun

Which European Languages are not Indo-European?

Why did Jon Snow admit his fault in S08E06?

Can you still travel to America on the ESTA waiver program if you have been to Iran in transit?

Can we assume that a hash function with high collision resistance also means highly uniform distribution?

Why did other houses not demand this?

How to keep consistency across the application architecture as a team grows?

Why does the hash of infinity have the digits of π?

Where is Jon going?

3 prong range outlet

...And they were stumped for a long time

Is there any chance a man can get the death penalty for causing a miscarriage?

Do copyright notices need to be placed at the beginning of a file?

The Maltese Falcon

Is there an idiom that means that you are in a very strong negotiation position in a negotiation?

Is there a simple example that empirical evidence is misleading?



How do I compare the result of “1d20+x, with advantage” to “1d20+y, without advantage”, assuming x


Ranged attacks from hiding with Advantage?How does replacing Advantage with a flat +2 affect Champion critical hit damage output?How else can I get Advantage on Death Saving Throws?How do these mass advantage/disadvantage rolls work out statistically?How to avoid the determinism of Passive PerceptionIf I have both advantage and disadvantage, and my target is Elusive, do I have disadvantage on the attack?Adding Precision Strike to an attack with advantageShould a character get advantage on a roll for attacking someone with a spell from behind?What's the benefit for Saving Throws of rerolling vs. advantage?What issues could arise with this Advantage/Disadvantage Variant?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








25












$begingroup$


I roll a d20.



If I have a choice between d20+x with advantage, or d20+y without advantage, what choice do I make to maximise the result? What are the values of x and y where the choice changes (if it changes at all)?



Assume x < y.










share|improve this question











$endgroup$







  • 1




    $begingroup$
    You can simplify your question by doing y-x, and asking if Advantage is better than a bonus of +y-x to a straight roll, for a DC of DC - x. Then you can use the existing tables / math people have already done, like statmodeling.stat.columbia.edu/2014/07/12/… and How does rolling two dice and taking the higher affect the average outcome?. Of course, if there are special downsides to a natural 1 like your gun breaking, or upside to natural 20, Advantage is extra valuable.
    $endgroup$
    – Peter Cordes
    May 11 at 16:03


















25












$begingroup$


I roll a d20.



If I have a choice between d20+x with advantage, or d20+y without advantage, what choice do I make to maximise the result? What are the values of x and y where the choice changes (if it changes at all)?



Assume x < y.










share|improve this question











$endgroup$







  • 1




    $begingroup$
    You can simplify your question by doing y-x, and asking if Advantage is better than a bonus of +y-x to a straight roll, for a DC of DC - x. Then you can use the existing tables / math people have already done, like statmodeling.stat.columbia.edu/2014/07/12/… and How does rolling two dice and taking the higher affect the average outcome?. Of course, if there are special downsides to a natural 1 like your gun breaking, or upside to natural 20, Advantage is extra valuable.
    $endgroup$
    – Peter Cordes
    May 11 at 16:03














25












25








25


2



$begingroup$


I roll a d20.



If I have a choice between d20+x with advantage, or d20+y without advantage, what choice do I make to maximise the result? What are the values of x and y where the choice changes (if it changes at all)?



Assume x < y.










share|improve this question











$endgroup$




I roll a d20.



If I have a choice between d20+x with advantage, or d20+y without advantage, what choice do I make to maximise the result? What are the values of x and y where the choice changes (if it changes at all)?



Assume x < y.







dnd-5e statistics advantage-and-disadvantage






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 9 at 23:04









V2Blast

29.2k5105177




29.2k5105177










asked May 9 at 14:05









EradashEradash

447215




447215







  • 1




    $begingroup$
    You can simplify your question by doing y-x, and asking if Advantage is better than a bonus of +y-x to a straight roll, for a DC of DC - x. Then you can use the existing tables / math people have already done, like statmodeling.stat.columbia.edu/2014/07/12/… and How does rolling two dice and taking the higher affect the average outcome?. Of course, if there are special downsides to a natural 1 like your gun breaking, or upside to natural 20, Advantage is extra valuable.
    $endgroup$
    – Peter Cordes
    May 11 at 16:03













  • 1




    $begingroup$
    You can simplify your question by doing y-x, and asking if Advantage is better than a bonus of +y-x to a straight roll, for a DC of DC - x. Then you can use the existing tables / math people have already done, like statmodeling.stat.columbia.edu/2014/07/12/… and How does rolling two dice and taking the higher affect the average outcome?. Of course, if there are special downsides to a natural 1 like your gun breaking, or upside to natural 20, Advantage is extra valuable.
    $endgroup$
    – Peter Cordes
    May 11 at 16:03








1




1




$begingroup$
You can simplify your question by doing y-x, and asking if Advantage is better than a bonus of +y-x to a straight roll, for a DC of DC - x. Then you can use the existing tables / math people have already done, like statmodeling.stat.columbia.edu/2014/07/12/… and How does rolling two dice and taking the higher affect the average outcome?. Of course, if there are special downsides to a natural 1 like your gun breaking, or upside to natural 20, Advantage is extra valuable.
$endgroup$
– Peter Cordes
May 11 at 16:03





$begingroup$
You can simplify your question by doing y-x, and asking if Advantage is better than a bonus of +y-x to a straight roll, for a DC of DC - x. Then you can use the existing tables / math people have already done, like statmodeling.stat.columbia.edu/2014/07/12/… and How does rolling two dice and taking the higher affect the average outcome?. Of course, if there are special downsides to a natural 1 like your gun breaking, or upside to natural 20, Advantage is extra valuable.
$endgroup$
– Peter Cordes
May 11 at 16:03











5 Answers
5






active

oldest

votes


















33












$begingroup$

Theory



The first thing we'll look at is a table that represents the odds of rolling at least a given DC, given a d20 with or without advantage (no modifiers yet).



beginarrayr
textNatural DC & textAdvantage & textNo Advantage & textDifference & textEq. Flat Modifier \ hline
textDC 1- & text100.000% & text100.000% & text0.000% & 0 \
textDC 2 & text99.750% & text95.000% & text4.750% & 0.95 (1)\
textDC 3 & text99.000% & text90.000% & text9.000% & 1.8 (2) \
textDC 4 & text97.750% & text85.000% & text12.750% & 2.55 (3) \
textDC 5 & text96.000% & text80.000% & text16.000% & 3.2 (4) \
textDC 6 & text93.750% & text75.000% & text18.750% & 3.75 (4) \
textDC 7 & text91.000% & text70.000% & text21.000% & 4.2 (5) \
textDC 8 & text87.750% & text65.000% & text22.750% & 4.55 (5) \
textDC 9 & text84.000% & text60.000% & text24.000% & 4.8 (5) \
textDC 10 & text79.750% & text55.000% & text24.750% & 4.95 (5) \
textDC 11 & text75.000% & text50.000% & text25.000% & 5 \
textDC 12 & text69.750% & text45.000% & text24.750% & 4.95 (5) \
textDC 13 & text64.000% & text40.000% & text24.000% & 4.8 (5) \
textDC 14 & text57.750% & text35.000% & text22.750% & 4.55 (5) \
textDC 15 & text51.000% & text30.000% & text21.000% & 4.2 (5) \
textDC 16 & text43.750% & text25.000% & text18.750% & 3.75 (4) \
textDC 17 & text36.000% & text20.000% & text16.000% & 3.2 (4) \
textDC 18 & text27.750% & text15.000% & text12.750% & 2.55 (3) \
textDC 19 & text19.000% & text10.000% & text9.000% & 1.8 (2) \
textDC 20 & text9.750% & text5.000% & text4.750% & 0.95 (1) \
textDC 21+ & text0.000% & text0.000% & text0.000% & 0 \
endarray



A +1 to a non-advantage roll will always improve the odds of rolling a given number by exactly 5 percentage points. Conversely, a +1 to an Advantage roll will increase your odds by an amount equal to moving up one row on that table: a DC7 check made with +1 is equivalent to a DC6 check made with +0. A DC20 check made with advantage and a +1 modifier is equivalent to a DC19 check made with +0, which constitutes a 9.250 percentage point improvement.



There are a few casual observations we can make:



  • It's not possible to roll a natural d20 lower than a 1, so if the advantage check requires a natural 1, then there's no benefit to gaining any modifier (or advantage, for that matter): it's a check that is impossible to fail.

  • At DC 2, gaining advantage increases the odds of success by 4.750% (to 99.750%) but gaining a +1 modifier increases the odds of success by 5% (to 100%). So intuitively, If we're comparing 1d20+x/ADV vs 1d20+x+1/NoADV, and the natural number we need to hit is a 2 (for the advantage check), then the +1 modifier is better.

  • It's the same deal at DC20: Gaining Advantage will improve from 5% to 9.750%, but gaining +1 will improve from 5% to 10%. Again, the +1 modifier is better.

  • But the differences get more drastic as we move closer to the mean of the roll: At DC3, advantage improves the odds by 9% (90%→99%) but a +1 modifier only improves the odds by 5% (90%→95%), so here, Advantage is better than a +1 modifier; but it's NOT better than a +2 modifier (90%→100%).

  • In the table, I've added the "Eq. Flat Modifier" column: this describes, for each row, how much of a modifier you would need for the benefit from that modifier to be equivalent to the benefit provided by Advantage. Since 5e doesn't have "half" modifiers or fractional DCs, I've included the (rounded up) proper modifier in parenthesis next to it. In each row, if the modifier difference between the Advantage and Non-Advantage rolls is greater than that number, then the modifier is better; if it's not, then the Advantage roll is better.

Practice



So back to the original question: Given two rolls, 1d20+x/Adv, and 1d20+y/NoAdv, which is better? Well, as established, it depends on the DC of the check, but to get the results from this table:



  • Calculate the difference between y and x

  • Subtract x (the modifier for the Advantage roll) from the DC to get the "Natural DC"

  • Look at the Eq. Flat Modifier for that row in the table

  • If the difference between y and x is greater than that value, then you should prefer the 1d20+y/NoAdv roll. If not, then you should prefer the 1d20+x/Adv roll.

Examples



  • DC19, 1d20+5/Adv vs 1d20+7/NoAdv

    • Difference is 7 - 5 == 2

    • DC19 - 5 is DC14

    • DC14 has a Eq. Flat Modifier of 4.55

    • Therefore, the Advantage roll is better than the non-Advantage roll.


  • DC3, 1d20+1/Adv vs 1d20+2/NoAdv

    • Difference is 2 - 1 == 1

    • DC3 - 1 is DC2

    • DC2 has a Eq. Flat Modifier of 0.95

    • Therefore, the non-advantage roll is better than the Advantage roll


  • DC17, 1d20+9/Adv vs 1d20+14/NoAdv

    • We could skip the steps: none of the rows have a Eq. Flat Modifier greater than 5, meaning the +5 modifier will always be better than (or equivalent to) the Advantage improvement. Nonetheless...

    • Difference is 14 - 9 == 5

    • DC17 - 9 is DC8

    • DC8 has a Eq. Flat Modifier of 4.55

    • Therefore, the non-advantage roll is better than the Advantage roll


Attack Rolls



Attack Rolls are a little weird, because you no longer simply care about passing the check; you also care what the natural number was because of Critical Hits and Misses.



Most of the math still checks out: if all you care about is hitting/missing, then the table above can be used, since the scenarios where a Natural 2 hits and a Natural 19 misses are pretty rare in 5e. If, however, you instead care more about the Crits/Auto-Misses, then you should introduce a "subjectivity factor", which you can define however you like: is it important to you that you get a critical hit (or avoid a critical miss)? Then always go Advantage. If not, then use the table above. I generally stick to the table personally, but "clutch factor" is one of those hazy things that can't be objectively defined, so you'll need to make that call for yourself.






share|improve this answer











$endgroup$












  • $begingroup$
    If you provide a distribution of DCs you expect to meet plus a factor of "how much do I care if I pass" (basically a weight), you can work out how much advantage is "worth" in flat +X bonus. (With "bounded accuracy", +X is going to be linear)
    $endgroup$
    – Yakk
    May 9 at 17:35










  • $begingroup$
    Minor nitpick: the last bullet before "Practice" says "In each row, if the modifier difference between the Advantage and Non-Advantage rolls is greater than that number, then the modifier is better; if it's not, then the Advantage roll is better." I think that should be "at least" instead of "greater than".
    $endgroup$
    – EagleV_Attnam
    May 10 at 9:06










  • $begingroup$
    @EagleV_Attnam It's splitting hairs: in the scenario where the difference is exactly equal to the calculated value, neither roll is better (unless you explicitly prefer the Advantage Roll for context-specific reasons).
    $endgroup$
    – Xirema
    May 10 at 14:12










  • $begingroup$
    @Xirema That's true, I misread "that number" as referring to the adjusted (rounded up) value.
    $endgroup$
    – EagleV_Attnam
    May 10 at 14:19


















20












$begingroup$

It will depend on what you're trying to achieve. For example, if you need to reach DC 25, and $x = 4$ and $y = 5$, the advantage on the roll with $x$ doesn't matter; you'll never roll higher than 24. With the +5, you'll at least have a 5% chance.



Here (scroll down to "Advantage versus Simple Bonuses") is a table which shows which bonus (difference between x and y) corresponds to having advantage or not.



enter image description here



(source: Zero Hit Points)






share|improve this answer











$endgroup$












  • $begingroup$
    In 5e you don't need to "beat" a DC, you need to match it to overcome it. It would be clearer if your first sentence said "If the DC is 25, and x = 4 and y=5 then you will never pass the DC with x = 4, but you have a chance of passing the DC (5%) with y = 5".
    $endgroup$
    – illustro
    May 9 at 14:39











  • $begingroup$
    @illustro thanks, my experience is limited to 3(.5)E ...
    $endgroup$
    – Glorfindel
    May 9 at 14:42







  • 1




    $begingroup$
    (and even there you didn't need to beat a DC, but it's been a while ...)
    $endgroup$
    – Glorfindel
    May 9 at 14:50










  • $begingroup$
    I feel this analysis is improved by MORE ANYDICE. For example, with +2/+5 DC 10 advantage wins, 88% to 80%; but at +2/+5 DC 20, the normal roll is better, with odds of 30% vs. 28%. You can tinker with the variables in the script to investigate the results with different values!
    $endgroup$
    – Carcer
    May 9 at 15:41






  • 1




    $begingroup$
    @Carcer: Have some more AnyDice. :)
    $endgroup$
    – Ilmari Karonen
    May 9 at 17:23


















18












$begingroup$

If you only care about maximising the expected result, as opposed to your odds of hitting a specific target number (for instance, you might be making a contested roll against someone else, like in a grapple, or otherwise don't know the target number ahead of time) this is a pretty simple comparison. Having advantage on a d20 roll increases the expected result from an average of 10.5 to 13.82 (illustrated by this anydice program); that's a benefit of +3.32.



Therefore, in order for a roll without advantage to have a higher expected result than a roll with advantage, the modifier on the normal roll needs to be four or more points better than the modifier on the advantaged roll. +3 with advantage is worse than +7 normally, and so on.






share|improve this answer











$endgroup$








  • 1




    $begingroup$
    This answer is great! And shows me we didn't need actual numbers. +1
    $endgroup$
    – NautArch
    May 9 at 14:59










  • $begingroup$
    @NautArch It is the kind of question where additional context does inform how you should compare your options, but both approaches are useful in different circumstances.
    $endgroup$
    – Carcer
    May 9 at 15:03






  • 1




    $begingroup$
    The difference in expected value between your rolls does not determine your odds of beating someone else's roll. As an example, suppose I roll 0 25% of the time and 20 75% of the time. My expected value is 15. My enemy rolls 19 100% of the time. Their expected value is 19. I beat them 1/4 of the time. Another enemy rolls 2 100% of the time. I beat them 1/4 of the time as well. In one case, my "average" roll was -4 and in the other it was +13 compared to them.
    $endgroup$
    – Yakk
    May 9 at 16:12







  • 1




    $begingroup$
    @Yakk awkward terminology. It's a comparison of the expected outcomes of your own two different options, not directly against whatever your opposition is. (That said, the question is about 5e D&D, so the distributions you propose are not something you would see in practice.)
    $endgroup$
    – Carcer
    May 9 at 16:17











  • $begingroup$
    @Yakk rephrased to describe expected results rather than the more ambiguous "beat". Is that more palatable?
    $endgroup$
    – Carcer
    May 9 at 16:21


















8












$begingroup$

First, subtract $x$ both from $y$ and from the target number you're rolling against. Then look at this graph:



Screenshot



In the graph, find the position on the horizontal axis that matches the target number (minus $x$) that you're trying to meet or exceed, and the colored line that matches the extra bonus $y-x$ to the roll without advantage. If that colored line is higher that the curved black line at that position on the horizontal axis, you should choose the higher bonus over advantage.



(Specifically, the various lines in the graph show the probability of meeting or exceeding a given target number with various rolls: the black curved line is for d20 with advantage but no bonus, while the five different colored straight lines on top of it are for d20+1 to d20+5.)




Or, to summarize, you should choose a plain $+y$ bonus over advantage $+x$ when...




  • $y = x + 1$ and the target number is at most $x+2$ or at least $x+20$;


  • $y = x + 2$ and the target number is at most $x+3$ or at least $x+19$;


  • $y = x + 3$ and the target number is at most $x+4$ or at least $x+18$;


  • $y = x + 4$ and the target number is at most $x+6$ or at least $x+16$; or


  • $y ge x + 5$.

(As noted by Xirema, things can change a little if you're e.g. making an attack roll and care about crits. Rolling with advantage has a 9.75% chance of giving you a natural 20, and only a 0.25% chance of a natural 1, whereas with a normal d20 roll both 1s and 20s show up 5% of the time each. Whether those differences in crit odds are worth trading for a somewhat worse chance to hit depends both on the target DC and on how much you value crits.)






share|improve this answer









$endgroup$












  • $begingroup$
    Here is what I think to be a simpler graph OP can plug numbers into. Merely change X:1 to what X you want and the same for Y:2. E.g., you want 5 and 10, X:5 and Y:10.
    $endgroup$
    – Captain Man
    May 9 at 18:22


















1












$begingroup$

tl;dr- Assuming neither roll is a sure thing, then advantage has better odds if$$
frac
left(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2 < 20
tag1
,.$$
Here's an online C# script to play with this. Details at the bottom of this answer.




Example



  1. You have to beat a $textDC = 10 .$



  2. You have two options:



    • Roll normally with a bonus of $+5 .$


    • Roll with advantage and a bonus of $+1 .$



  3. Plug this into $operatornameEq.left(1right)$ to find:$$
    fracleft(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2
    ~=~
    fracleft(10 - 1 - 1right)^210 - 5 - 1
    ~=~
    frac8^24
    ~=~16
    ~<~ 20
    ,.$$


  4. Since $16 < 20 ,$ this inequality is $textttTRUE ,$ and therefore rolling with advantage is better.



  5. By contrast, if the $textDC$ were $17$ instead of $10 ,$ then the inequality would've reduced to$$
    fracleft(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2
    ~=~
    fracleft(17 - 1 - 1right)^217 - 5 - 1
    ~=~
    frac15^211
    ~=~ sim 20.45
    ~<~ 20
    ,,$$



    and since $sim 20.45 < 20$ is $textttFALSE ,$ this means that the odds aren't better when rolling with advantage. So, in this case, it'd seem better to roll normally with $+5$ rather than with $+1$ and advantage.




Explanation



First:



  1. If either option is a sure-thing, just do it.


  2. If neither option has a chance, nothing you can do anyway.


So this leaves only the case in which both options have some non-certain possibility.



Then, the odds of failing to beat a DC on a single roll are
$$
P_textroll
~=~ 5 , left(left[textDCright] - left[textbonusright] - 1right) , %
,,
$$
and the odds of failing to beat a DC with advantage are$$
P_beginarrayctextroll with \[-10px] textadvantageendarray
~=~ P_textroll^2
~=~ left(5 , left(left[textDCright] - left[textbonusright] - 1right) , %right)^2
~=~ 0.25 , left(left[textDCright] - left[textbonusright] - 1right)^2 , %
,.$$



So, your odds of failure with advantage are lower when
$$
0.25 , left(left[textDCright] - left[textbonusright]_textadvantage - 1right)^2 , %
~<~
5 , left(left[textDCright] - left[textbonusright]_textnormal - 1right) , %
,,$$

or
$$
frac
left(left[textDCright] - left[textbonusright]_textadvantage - 1right)^2

left[textDCright] - left[textbonusright]_textnormal - 1

~<~
20
,.
$$



To make that a little more intuitive, let's write it as
$$
frac
left(textDC - textadvantage bonus - 1right)^2

textDC - textnormal bonus - 1

~<~
20
,.
$$




Notes



  1. The tl;dr advice recommends against rolling with advantage when the odds are the same either way. I chose this convention since it's less work. But, if someone likes to roll, then they might instead roll with advantage if
    $$
    frac
    left(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2 le 20
    ,.$$


  2. The above logic assumes that the d20-die is fair. If it's not, then I'd guess that rolling without advantage is a bit better than it would normally be because an unfair die would seem to have less variability between rolls. Since most dice probably aren't perfectly fair, a hardcore optimizer might prefer to roll without advantage when$$
    frac
    left(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2 approx 20
    ,.$$


  3. The $`` 20 "$ in the inequality is no coincidence; it corresponds to the "20" in "d20". Likewise, the $`` 1 "$ corresponds to the minimum die value. So if another sort of die is used, this inequality can be generalized to$$
    frac
    left(textDC - textadvantage bonus - textmin die valueright)^2textDC - textnormal bonus - textmin die value phantom^2
    ~<~
    textmax die value - textmin die value + 1
    ,.$$


  4. The above derivation focused on the probability of failure, rather than the probability of success, because the math would've been a bit uglier for rolling with advantage if we focused on maximizing success (rather than minimizing error). However, if anyone does this same calculation for rolling with disadvantage, the math should be cleaner if you instead derive it by focusing on maximizing success. The reason for this is that advantage/disadvantage requires a second die roll only on failure/success of the first roll.



C# script to play with this



I was going to attach a JavaScript snippet here, but I guess that feature's not on this StackExchange. So, here's a C# script that can be run online.



Notes:




  1. To use it, call Report(dc, bonus_normal, bonus_advantage);, and it'll tell you which is better.




    • Currently, it's pre-loaded to call Report(10, 5, 1); and Report(17, 5, 1); to demonstrate the example given near the top of this answer. This should return:




      For DC = 10 Bonus (normal) = 5 Bonus (advantage) = 1:
      Your odds are better with the power of ADVANTAGE!

      For DC = 17 Bonus (normal) = 5 Bonus (advantage) = 1:
      Advantage is for losers; roll normally!




  2. By default, it uses a d20, with a minimum value of 1 and a maximum value of 20. Both of these values can be changed in the code.


  3. $operatornameEq.left(1right)$ (and its generalization, as used in this script) assume that, if the odds can't be improved by advantage, you prefer to roll normally (since it's less rolling).


  4. $operatornameEq.left(1right)$ assumes success and failure are both possible with both advantage and normal rolling. This script checks to ensure that that's true before using $operatornameEq.left(1right) .$


Source code (C#):



using System;

public class Program

// A typical d20 has a minimum value of 1 and a maximum of 20:
public const long MINIMUM_DIE_VALUE = 1;
public const long MAXIMUM_DIE_VALUE = 20;

public static void RunExample()

Report(
10
, 5
, 1
);

Report(
17
, 5
, 1
);


public static void Report(
long dc
, long bonus_normal
, long bonus_advantage
)

var stringMessage =
"FortDC = "
+ dc.ToString()
+ "tBonus (normal) = "
+ bonus_normal.ToString()
+ "tBonus (advantage) = "
+ bonus_advantage.ToString()
+ ":"
+ System.Environment.NewLine
;

if (ShouldRollWithAdvantage(
dc
, bonus_normal
, bonus_advantage
))

stringMessage += "Your odds are better with the power of ADVANTAGE!";
//Console.WriteLine("Your odds are better with the power of ADVANTAGE!");

else

stringMessage += "Advantage is for losers; roll normally!";
//Console.WriteLine("Advantage is for losers; roll normally!");


Console.WriteLine(stringMessage);
Console.WriteLine();


public static bool ShouldRollWithAdvantage(
long dc
, long bonus_normal
, long bonus_advantage
)

// Case 1:
// If rolling with advantage can't succeed, then just roll normally.
// Doesn't matter if rolling normally can't succeed, either, because if
// you're going to fail either way, may as well only roll once.
if (dc - bonus_advantage > MAXIMUM_DIE_VALUE)

return false;


// Case 2:
// If rolling without advantage can't succeed, then roll with advantage.
if (dc - bonus_normal > MAXIMUM_DIE_VALUE)

return true;


// Case 3:
// If rolling without advantage always succeeds, then roll without advantage.
if (dc - bonus_normal <= MINIMUM_DIE_VALUE)

return false;


// Case 4:
// If rolling with advntage always succeeds, then roll with advantage.
if (dc - bonus_advantage <= MINIMUM_DIE_VALUE)

return true;


// Case 5:
// Since rolling with advantage and rolling without advantage are both
// possible-but-not-guaranteed, we compare their odds of success.
//
// This method checks if
// (DC - bonus_advantage - 1)^2
// is less than
// 20 * (DC - bonus_normal - 1)
// instead of the fraction to avoid floating-point values.

var leftHandSide = (dc - bonus_advantage - MINIMUM_DIE_VALUE);
leftHandSide *= leftHandSide;

var rightHandSide = (MAXIMUM_DIE_VALUE - MINIMUM_DIE_VALUE + 1) * (dc - bonus_normal - MINIMUM_DIE_VALUE);

var shouldRollWithAdvantage = leftHandSide < rightHandSide;

return shouldRollWithAdvantage;



private static bool TryValidateProgramConstants(
out string errorMessage
)

if (!(MINIMUM_DIE_VALUE < MAXIMUM_DIE_VALUE))

errorMessage = "Maximum die value must be greater than minimum die value.";
return false;


if (MINIMUM_DIE_VALUE < -1000)

errorMessage = "Unreasonably low minimum die value.";
return false;


if (MAXIMUM_DIE_VALUE > 1000)

errorMessage = "Unreasonably high maximum die value.";
return false;


errorMessage = default(string);
return true;


public static void Main()

string errorMessage;
if (TryValidateProgramConstants(out errorMessage))

RunExample();

else

Console.WriteLine("Error in program validation; aborting run.");

if (!string.IsNullOrWhiteSpace(errorMessage))

Console.WriteLine(errorMessage);










share|improve this answer











$endgroup$












  • $begingroup$
    @NautArch I'd intended to explain it in the"Explanation" section. Is that what you mean, or is there something else?
    $endgroup$
    – Nat
    May 10 at 18:01










  • $begingroup$
    @NautArch Ah, gotcha. I can add a shorter version that's lighter on the math at the start.
    $endgroup$
    – Nat
    May 10 at 18:04










  • $begingroup$
    @NautArch I expanded the tl;dr. Does that look about right?
    $endgroup$
    – Nat
    May 10 at 18:28











  • $begingroup$
    Let us continue this discussion in chat.
    $endgroup$
    – NautArch
    May 10 at 18:29











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "122"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2frpg.stackexchange.com%2fquestions%2f147710%2fhow-do-i-compare-the-result-of-1d20x-with-advantage-to-1d20y-without-adva%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























5 Answers
5






active

oldest

votes








5 Answers
5






active

oldest

votes









active

oldest

votes






active

oldest

votes









33












$begingroup$

Theory



The first thing we'll look at is a table that represents the odds of rolling at least a given DC, given a d20 with or without advantage (no modifiers yet).



beginarrayr
textNatural DC & textAdvantage & textNo Advantage & textDifference & textEq. Flat Modifier \ hline
textDC 1- & text100.000% & text100.000% & text0.000% & 0 \
textDC 2 & text99.750% & text95.000% & text4.750% & 0.95 (1)\
textDC 3 & text99.000% & text90.000% & text9.000% & 1.8 (2) \
textDC 4 & text97.750% & text85.000% & text12.750% & 2.55 (3) \
textDC 5 & text96.000% & text80.000% & text16.000% & 3.2 (4) \
textDC 6 & text93.750% & text75.000% & text18.750% & 3.75 (4) \
textDC 7 & text91.000% & text70.000% & text21.000% & 4.2 (5) \
textDC 8 & text87.750% & text65.000% & text22.750% & 4.55 (5) \
textDC 9 & text84.000% & text60.000% & text24.000% & 4.8 (5) \
textDC 10 & text79.750% & text55.000% & text24.750% & 4.95 (5) \
textDC 11 & text75.000% & text50.000% & text25.000% & 5 \
textDC 12 & text69.750% & text45.000% & text24.750% & 4.95 (5) \
textDC 13 & text64.000% & text40.000% & text24.000% & 4.8 (5) \
textDC 14 & text57.750% & text35.000% & text22.750% & 4.55 (5) \
textDC 15 & text51.000% & text30.000% & text21.000% & 4.2 (5) \
textDC 16 & text43.750% & text25.000% & text18.750% & 3.75 (4) \
textDC 17 & text36.000% & text20.000% & text16.000% & 3.2 (4) \
textDC 18 & text27.750% & text15.000% & text12.750% & 2.55 (3) \
textDC 19 & text19.000% & text10.000% & text9.000% & 1.8 (2) \
textDC 20 & text9.750% & text5.000% & text4.750% & 0.95 (1) \
textDC 21+ & text0.000% & text0.000% & text0.000% & 0 \
endarray



A +1 to a non-advantage roll will always improve the odds of rolling a given number by exactly 5 percentage points. Conversely, a +1 to an Advantage roll will increase your odds by an amount equal to moving up one row on that table: a DC7 check made with +1 is equivalent to a DC6 check made with +0. A DC20 check made with advantage and a +1 modifier is equivalent to a DC19 check made with +0, which constitutes a 9.250 percentage point improvement.



There are a few casual observations we can make:



  • It's not possible to roll a natural d20 lower than a 1, so if the advantage check requires a natural 1, then there's no benefit to gaining any modifier (or advantage, for that matter): it's a check that is impossible to fail.

  • At DC 2, gaining advantage increases the odds of success by 4.750% (to 99.750%) but gaining a +1 modifier increases the odds of success by 5% (to 100%). So intuitively, If we're comparing 1d20+x/ADV vs 1d20+x+1/NoADV, and the natural number we need to hit is a 2 (for the advantage check), then the +1 modifier is better.

  • It's the same deal at DC20: Gaining Advantage will improve from 5% to 9.750%, but gaining +1 will improve from 5% to 10%. Again, the +1 modifier is better.

  • But the differences get more drastic as we move closer to the mean of the roll: At DC3, advantage improves the odds by 9% (90%→99%) but a +1 modifier only improves the odds by 5% (90%→95%), so here, Advantage is better than a +1 modifier; but it's NOT better than a +2 modifier (90%→100%).

  • In the table, I've added the "Eq. Flat Modifier" column: this describes, for each row, how much of a modifier you would need for the benefit from that modifier to be equivalent to the benefit provided by Advantage. Since 5e doesn't have "half" modifiers or fractional DCs, I've included the (rounded up) proper modifier in parenthesis next to it. In each row, if the modifier difference between the Advantage and Non-Advantage rolls is greater than that number, then the modifier is better; if it's not, then the Advantage roll is better.

Practice



So back to the original question: Given two rolls, 1d20+x/Adv, and 1d20+y/NoAdv, which is better? Well, as established, it depends on the DC of the check, but to get the results from this table:



  • Calculate the difference between y and x

  • Subtract x (the modifier for the Advantage roll) from the DC to get the "Natural DC"

  • Look at the Eq. Flat Modifier for that row in the table

  • If the difference between y and x is greater than that value, then you should prefer the 1d20+y/NoAdv roll. If not, then you should prefer the 1d20+x/Adv roll.

Examples



  • DC19, 1d20+5/Adv vs 1d20+7/NoAdv

    • Difference is 7 - 5 == 2

    • DC19 - 5 is DC14

    • DC14 has a Eq. Flat Modifier of 4.55

    • Therefore, the Advantage roll is better than the non-Advantage roll.


  • DC3, 1d20+1/Adv vs 1d20+2/NoAdv

    • Difference is 2 - 1 == 1

    • DC3 - 1 is DC2

    • DC2 has a Eq. Flat Modifier of 0.95

    • Therefore, the non-advantage roll is better than the Advantage roll


  • DC17, 1d20+9/Adv vs 1d20+14/NoAdv

    • We could skip the steps: none of the rows have a Eq. Flat Modifier greater than 5, meaning the +5 modifier will always be better than (or equivalent to) the Advantage improvement. Nonetheless...

    • Difference is 14 - 9 == 5

    • DC17 - 9 is DC8

    • DC8 has a Eq. Flat Modifier of 4.55

    • Therefore, the non-advantage roll is better than the Advantage roll


Attack Rolls



Attack Rolls are a little weird, because you no longer simply care about passing the check; you also care what the natural number was because of Critical Hits and Misses.



Most of the math still checks out: if all you care about is hitting/missing, then the table above can be used, since the scenarios where a Natural 2 hits and a Natural 19 misses are pretty rare in 5e. If, however, you instead care more about the Crits/Auto-Misses, then you should introduce a "subjectivity factor", which you can define however you like: is it important to you that you get a critical hit (or avoid a critical miss)? Then always go Advantage. If not, then use the table above. I generally stick to the table personally, but "clutch factor" is one of those hazy things that can't be objectively defined, so you'll need to make that call for yourself.






share|improve this answer











$endgroup$












  • $begingroup$
    If you provide a distribution of DCs you expect to meet plus a factor of "how much do I care if I pass" (basically a weight), you can work out how much advantage is "worth" in flat +X bonus. (With "bounded accuracy", +X is going to be linear)
    $endgroup$
    – Yakk
    May 9 at 17:35










  • $begingroup$
    Minor nitpick: the last bullet before "Practice" says "In each row, if the modifier difference between the Advantage and Non-Advantage rolls is greater than that number, then the modifier is better; if it's not, then the Advantage roll is better." I think that should be "at least" instead of "greater than".
    $endgroup$
    – EagleV_Attnam
    May 10 at 9:06










  • $begingroup$
    @EagleV_Attnam It's splitting hairs: in the scenario where the difference is exactly equal to the calculated value, neither roll is better (unless you explicitly prefer the Advantage Roll for context-specific reasons).
    $endgroup$
    – Xirema
    May 10 at 14:12










  • $begingroup$
    @Xirema That's true, I misread "that number" as referring to the adjusted (rounded up) value.
    $endgroup$
    – EagleV_Attnam
    May 10 at 14:19















33












$begingroup$

Theory



The first thing we'll look at is a table that represents the odds of rolling at least a given DC, given a d20 with or without advantage (no modifiers yet).



beginarrayr
textNatural DC & textAdvantage & textNo Advantage & textDifference & textEq. Flat Modifier \ hline
textDC 1- & text100.000% & text100.000% & text0.000% & 0 \
textDC 2 & text99.750% & text95.000% & text4.750% & 0.95 (1)\
textDC 3 & text99.000% & text90.000% & text9.000% & 1.8 (2) \
textDC 4 & text97.750% & text85.000% & text12.750% & 2.55 (3) \
textDC 5 & text96.000% & text80.000% & text16.000% & 3.2 (4) \
textDC 6 & text93.750% & text75.000% & text18.750% & 3.75 (4) \
textDC 7 & text91.000% & text70.000% & text21.000% & 4.2 (5) \
textDC 8 & text87.750% & text65.000% & text22.750% & 4.55 (5) \
textDC 9 & text84.000% & text60.000% & text24.000% & 4.8 (5) \
textDC 10 & text79.750% & text55.000% & text24.750% & 4.95 (5) \
textDC 11 & text75.000% & text50.000% & text25.000% & 5 \
textDC 12 & text69.750% & text45.000% & text24.750% & 4.95 (5) \
textDC 13 & text64.000% & text40.000% & text24.000% & 4.8 (5) \
textDC 14 & text57.750% & text35.000% & text22.750% & 4.55 (5) \
textDC 15 & text51.000% & text30.000% & text21.000% & 4.2 (5) \
textDC 16 & text43.750% & text25.000% & text18.750% & 3.75 (4) \
textDC 17 & text36.000% & text20.000% & text16.000% & 3.2 (4) \
textDC 18 & text27.750% & text15.000% & text12.750% & 2.55 (3) \
textDC 19 & text19.000% & text10.000% & text9.000% & 1.8 (2) \
textDC 20 & text9.750% & text5.000% & text4.750% & 0.95 (1) \
textDC 21+ & text0.000% & text0.000% & text0.000% & 0 \
endarray



A +1 to a non-advantage roll will always improve the odds of rolling a given number by exactly 5 percentage points. Conversely, a +1 to an Advantage roll will increase your odds by an amount equal to moving up one row on that table: a DC7 check made with +1 is equivalent to a DC6 check made with +0. A DC20 check made with advantage and a +1 modifier is equivalent to a DC19 check made with +0, which constitutes a 9.250 percentage point improvement.



There are a few casual observations we can make:



  • It's not possible to roll a natural d20 lower than a 1, so if the advantage check requires a natural 1, then there's no benefit to gaining any modifier (or advantage, for that matter): it's a check that is impossible to fail.

  • At DC 2, gaining advantage increases the odds of success by 4.750% (to 99.750%) but gaining a +1 modifier increases the odds of success by 5% (to 100%). So intuitively, If we're comparing 1d20+x/ADV vs 1d20+x+1/NoADV, and the natural number we need to hit is a 2 (for the advantage check), then the +1 modifier is better.

  • It's the same deal at DC20: Gaining Advantage will improve from 5% to 9.750%, but gaining +1 will improve from 5% to 10%. Again, the +1 modifier is better.

  • But the differences get more drastic as we move closer to the mean of the roll: At DC3, advantage improves the odds by 9% (90%→99%) but a +1 modifier only improves the odds by 5% (90%→95%), so here, Advantage is better than a +1 modifier; but it's NOT better than a +2 modifier (90%→100%).

  • In the table, I've added the "Eq. Flat Modifier" column: this describes, for each row, how much of a modifier you would need for the benefit from that modifier to be equivalent to the benefit provided by Advantage. Since 5e doesn't have "half" modifiers or fractional DCs, I've included the (rounded up) proper modifier in parenthesis next to it. In each row, if the modifier difference between the Advantage and Non-Advantage rolls is greater than that number, then the modifier is better; if it's not, then the Advantage roll is better.

Practice



So back to the original question: Given two rolls, 1d20+x/Adv, and 1d20+y/NoAdv, which is better? Well, as established, it depends on the DC of the check, but to get the results from this table:



  • Calculate the difference between y and x

  • Subtract x (the modifier for the Advantage roll) from the DC to get the "Natural DC"

  • Look at the Eq. Flat Modifier for that row in the table

  • If the difference between y and x is greater than that value, then you should prefer the 1d20+y/NoAdv roll. If not, then you should prefer the 1d20+x/Adv roll.

Examples



  • DC19, 1d20+5/Adv vs 1d20+7/NoAdv

    • Difference is 7 - 5 == 2

    • DC19 - 5 is DC14

    • DC14 has a Eq. Flat Modifier of 4.55

    • Therefore, the Advantage roll is better than the non-Advantage roll.


  • DC3, 1d20+1/Adv vs 1d20+2/NoAdv

    • Difference is 2 - 1 == 1

    • DC3 - 1 is DC2

    • DC2 has a Eq. Flat Modifier of 0.95

    • Therefore, the non-advantage roll is better than the Advantage roll


  • DC17, 1d20+9/Adv vs 1d20+14/NoAdv

    • We could skip the steps: none of the rows have a Eq. Flat Modifier greater than 5, meaning the +5 modifier will always be better than (or equivalent to) the Advantage improvement. Nonetheless...

    • Difference is 14 - 9 == 5

    • DC17 - 9 is DC8

    • DC8 has a Eq. Flat Modifier of 4.55

    • Therefore, the non-advantage roll is better than the Advantage roll


Attack Rolls



Attack Rolls are a little weird, because you no longer simply care about passing the check; you also care what the natural number was because of Critical Hits and Misses.



Most of the math still checks out: if all you care about is hitting/missing, then the table above can be used, since the scenarios where a Natural 2 hits and a Natural 19 misses are pretty rare in 5e. If, however, you instead care more about the Crits/Auto-Misses, then you should introduce a "subjectivity factor", which you can define however you like: is it important to you that you get a critical hit (or avoid a critical miss)? Then always go Advantage. If not, then use the table above. I generally stick to the table personally, but "clutch factor" is one of those hazy things that can't be objectively defined, so you'll need to make that call for yourself.






share|improve this answer











$endgroup$












  • $begingroup$
    If you provide a distribution of DCs you expect to meet plus a factor of "how much do I care if I pass" (basically a weight), you can work out how much advantage is "worth" in flat +X bonus. (With "bounded accuracy", +X is going to be linear)
    $endgroup$
    – Yakk
    May 9 at 17:35










  • $begingroup$
    Minor nitpick: the last bullet before "Practice" says "In each row, if the modifier difference between the Advantage and Non-Advantage rolls is greater than that number, then the modifier is better; if it's not, then the Advantage roll is better." I think that should be "at least" instead of "greater than".
    $endgroup$
    – EagleV_Attnam
    May 10 at 9:06










  • $begingroup$
    @EagleV_Attnam It's splitting hairs: in the scenario where the difference is exactly equal to the calculated value, neither roll is better (unless you explicitly prefer the Advantage Roll for context-specific reasons).
    $endgroup$
    – Xirema
    May 10 at 14:12










  • $begingroup$
    @Xirema That's true, I misread "that number" as referring to the adjusted (rounded up) value.
    $endgroup$
    – EagleV_Attnam
    May 10 at 14:19













33












33








33





$begingroup$

Theory



The first thing we'll look at is a table that represents the odds of rolling at least a given DC, given a d20 with or without advantage (no modifiers yet).



beginarrayr
textNatural DC & textAdvantage & textNo Advantage & textDifference & textEq. Flat Modifier \ hline
textDC 1- & text100.000% & text100.000% & text0.000% & 0 \
textDC 2 & text99.750% & text95.000% & text4.750% & 0.95 (1)\
textDC 3 & text99.000% & text90.000% & text9.000% & 1.8 (2) \
textDC 4 & text97.750% & text85.000% & text12.750% & 2.55 (3) \
textDC 5 & text96.000% & text80.000% & text16.000% & 3.2 (4) \
textDC 6 & text93.750% & text75.000% & text18.750% & 3.75 (4) \
textDC 7 & text91.000% & text70.000% & text21.000% & 4.2 (5) \
textDC 8 & text87.750% & text65.000% & text22.750% & 4.55 (5) \
textDC 9 & text84.000% & text60.000% & text24.000% & 4.8 (5) \
textDC 10 & text79.750% & text55.000% & text24.750% & 4.95 (5) \
textDC 11 & text75.000% & text50.000% & text25.000% & 5 \
textDC 12 & text69.750% & text45.000% & text24.750% & 4.95 (5) \
textDC 13 & text64.000% & text40.000% & text24.000% & 4.8 (5) \
textDC 14 & text57.750% & text35.000% & text22.750% & 4.55 (5) \
textDC 15 & text51.000% & text30.000% & text21.000% & 4.2 (5) \
textDC 16 & text43.750% & text25.000% & text18.750% & 3.75 (4) \
textDC 17 & text36.000% & text20.000% & text16.000% & 3.2 (4) \
textDC 18 & text27.750% & text15.000% & text12.750% & 2.55 (3) \
textDC 19 & text19.000% & text10.000% & text9.000% & 1.8 (2) \
textDC 20 & text9.750% & text5.000% & text4.750% & 0.95 (1) \
textDC 21+ & text0.000% & text0.000% & text0.000% & 0 \
endarray



A +1 to a non-advantage roll will always improve the odds of rolling a given number by exactly 5 percentage points. Conversely, a +1 to an Advantage roll will increase your odds by an amount equal to moving up one row on that table: a DC7 check made with +1 is equivalent to a DC6 check made with +0. A DC20 check made with advantage and a +1 modifier is equivalent to a DC19 check made with +0, which constitutes a 9.250 percentage point improvement.



There are a few casual observations we can make:



  • It's not possible to roll a natural d20 lower than a 1, so if the advantage check requires a natural 1, then there's no benefit to gaining any modifier (or advantage, for that matter): it's a check that is impossible to fail.

  • At DC 2, gaining advantage increases the odds of success by 4.750% (to 99.750%) but gaining a +1 modifier increases the odds of success by 5% (to 100%). So intuitively, If we're comparing 1d20+x/ADV vs 1d20+x+1/NoADV, and the natural number we need to hit is a 2 (for the advantage check), then the +1 modifier is better.

  • It's the same deal at DC20: Gaining Advantage will improve from 5% to 9.750%, but gaining +1 will improve from 5% to 10%. Again, the +1 modifier is better.

  • But the differences get more drastic as we move closer to the mean of the roll: At DC3, advantage improves the odds by 9% (90%→99%) but a +1 modifier only improves the odds by 5% (90%→95%), so here, Advantage is better than a +1 modifier; but it's NOT better than a +2 modifier (90%→100%).

  • In the table, I've added the "Eq. Flat Modifier" column: this describes, for each row, how much of a modifier you would need for the benefit from that modifier to be equivalent to the benefit provided by Advantage. Since 5e doesn't have "half" modifiers or fractional DCs, I've included the (rounded up) proper modifier in parenthesis next to it. In each row, if the modifier difference between the Advantage and Non-Advantage rolls is greater than that number, then the modifier is better; if it's not, then the Advantage roll is better.

Practice



So back to the original question: Given two rolls, 1d20+x/Adv, and 1d20+y/NoAdv, which is better? Well, as established, it depends on the DC of the check, but to get the results from this table:



  • Calculate the difference between y and x

  • Subtract x (the modifier for the Advantage roll) from the DC to get the "Natural DC"

  • Look at the Eq. Flat Modifier for that row in the table

  • If the difference between y and x is greater than that value, then you should prefer the 1d20+y/NoAdv roll. If not, then you should prefer the 1d20+x/Adv roll.

Examples



  • DC19, 1d20+5/Adv vs 1d20+7/NoAdv

    • Difference is 7 - 5 == 2

    • DC19 - 5 is DC14

    • DC14 has a Eq. Flat Modifier of 4.55

    • Therefore, the Advantage roll is better than the non-Advantage roll.


  • DC3, 1d20+1/Adv vs 1d20+2/NoAdv

    • Difference is 2 - 1 == 1

    • DC3 - 1 is DC2

    • DC2 has a Eq. Flat Modifier of 0.95

    • Therefore, the non-advantage roll is better than the Advantage roll


  • DC17, 1d20+9/Adv vs 1d20+14/NoAdv

    • We could skip the steps: none of the rows have a Eq. Flat Modifier greater than 5, meaning the +5 modifier will always be better than (or equivalent to) the Advantage improvement. Nonetheless...

    • Difference is 14 - 9 == 5

    • DC17 - 9 is DC8

    • DC8 has a Eq. Flat Modifier of 4.55

    • Therefore, the non-advantage roll is better than the Advantage roll


Attack Rolls



Attack Rolls are a little weird, because you no longer simply care about passing the check; you also care what the natural number was because of Critical Hits and Misses.



Most of the math still checks out: if all you care about is hitting/missing, then the table above can be used, since the scenarios where a Natural 2 hits and a Natural 19 misses are pretty rare in 5e. If, however, you instead care more about the Crits/Auto-Misses, then you should introduce a "subjectivity factor", which you can define however you like: is it important to you that you get a critical hit (or avoid a critical miss)? Then always go Advantage. If not, then use the table above. I generally stick to the table personally, but "clutch factor" is one of those hazy things that can't be objectively defined, so you'll need to make that call for yourself.






share|improve this answer











$endgroup$



Theory



The first thing we'll look at is a table that represents the odds of rolling at least a given DC, given a d20 with or without advantage (no modifiers yet).



beginarrayr
textNatural DC & textAdvantage & textNo Advantage & textDifference & textEq. Flat Modifier \ hline
textDC 1- & text100.000% & text100.000% & text0.000% & 0 \
textDC 2 & text99.750% & text95.000% & text4.750% & 0.95 (1)\
textDC 3 & text99.000% & text90.000% & text9.000% & 1.8 (2) \
textDC 4 & text97.750% & text85.000% & text12.750% & 2.55 (3) \
textDC 5 & text96.000% & text80.000% & text16.000% & 3.2 (4) \
textDC 6 & text93.750% & text75.000% & text18.750% & 3.75 (4) \
textDC 7 & text91.000% & text70.000% & text21.000% & 4.2 (5) \
textDC 8 & text87.750% & text65.000% & text22.750% & 4.55 (5) \
textDC 9 & text84.000% & text60.000% & text24.000% & 4.8 (5) \
textDC 10 & text79.750% & text55.000% & text24.750% & 4.95 (5) \
textDC 11 & text75.000% & text50.000% & text25.000% & 5 \
textDC 12 & text69.750% & text45.000% & text24.750% & 4.95 (5) \
textDC 13 & text64.000% & text40.000% & text24.000% & 4.8 (5) \
textDC 14 & text57.750% & text35.000% & text22.750% & 4.55 (5) \
textDC 15 & text51.000% & text30.000% & text21.000% & 4.2 (5) \
textDC 16 & text43.750% & text25.000% & text18.750% & 3.75 (4) \
textDC 17 & text36.000% & text20.000% & text16.000% & 3.2 (4) \
textDC 18 & text27.750% & text15.000% & text12.750% & 2.55 (3) \
textDC 19 & text19.000% & text10.000% & text9.000% & 1.8 (2) \
textDC 20 & text9.750% & text5.000% & text4.750% & 0.95 (1) \
textDC 21+ & text0.000% & text0.000% & text0.000% & 0 \
endarray



A +1 to a non-advantage roll will always improve the odds of rolling a given number by exactly 5 percentage points. Conversely, a +1 to an Advantage roll will increase your odds by an amount equal to moving up one row on that table: a DC7 check made with +1 is equivalent to a DC6 check made with +0. A DC20 check made with advantage and a +1 modifier is equivalent to a DC19 check made with +0, which constitutes a 9.250 percentage point improvement.



There are a few casual observations we can make:



  • It's not possible to roll a natural d20 lower than a 1, so if the advantage check requires a natural 1, then there's no benefit to gaining any modifier (or advantage, for that matter): it's a check that is impossible to fail.

  • At DC 2, gaining advantage increases the odds of success by 4.750% (to 99.750%) but gaining a +1 modifier increases the odds of success by 5% (to 100%). So intuitively, If we're comparing 1d20+x/ADV vs 1d20+x+1/NoADV, and the natural number we need to hit is a 2 (for the advantage check), then the +1 modifier is better.

  • It's the same deal at DC20: Gaining Advantage will improve from 5% to 9.750%, but gaining +1 will improve from 5% to 10%. Again, the +1 modifier is better.

  • But the differences get more drastic as we move closer to the mean of the roll: At DC3, advantage improves the odds by 9% (90%→99%) but a +1 modifier only improves the odds by 5% (90%→95%), so here, Advantage is better than a +1 modifier; but it's NOT better than a +2 modifier (90%→100%).

  • In the table, I've added the "Eq. Flat Modifier" column: this describes, for each row, how much of a modifier you would need for the benefit from that modifier to be equivalent to the benefit provided by Advantage. Since 5e doesn't have "half" modifiers or fractional DCs, I've included the (rounded up) proper modifier in parenthesis next to it. In each row, if the modifier difference between the Advantage and Non-Advantage rolls is greater than that number, then the modifier is better; if it's not, then the Advantage roll is better.

Practice



So back to the original question: Given two rolls, 1d20+x/Adv, and 1d20+y/NoAdv, which is better? Well, as established, it depends on the DC of the check, but to get the results from this table:



  • Calculate the difference between y and x

  • Subtract x (the modifier for the Advantage roll) from the DC to get the "Natural DC"

  • Look at the Eq. Flat Modifier for that row in the table

  • If the difference between y and x is greater than that value, then you should prefer the 1d20+y/NoAdv roll. If not, then you should prefer the 1d20+x/Adv roll.

Examples



  • DC19, 1d20+5/Adv vs 1d20+7/NoAdv

    • Difference is 7 - 5 == 2

    • DC19 - 5 is DC14

    • DC14 has a Eq. Flat Modifier of 4.55

    • Therefore, the Advantage roll is better than the non-Advantage roll.


  • DC3, 1d20+1/Adv vs 1d20+2/NoAdv

    • Difference is 2 - 1 == 1

    • DC3 - 1 is DC2

    • DC2 has a Eq. Flat Modifier of 0.95

    • Therefore, the non-advantage roll is better than the Advantage roll


  • DC17, 1d20+9/Adv vs 1d20+14/NoAdv

    • We could skip the steps: none of the rows have a Eq. Flat Modifier greater than 5, meaning the +5 modifier will always be better than (or equivalent to) the Advantage improvement. Nonetheless...

    • Difference is 14 - 9 == 5

    • DC17 - 9 is DC8

    • DC8 has a Eq. Flat Modifier of 4.55

    • Therefore, the non-advantage roll is better than the Advantage roll


Attack Rolls



Attack Rolls are a little weird, because you no longer simply care about passing the check; you also care what the natural number was because of Critical Hits and Misses.



Most of the math still checks out: if all you care about is hitting/missing, then the table above can be used, since the scenarios where a Natural 2 hits and a Natural 19 misses are pretty rare in 5e. If, however, you instead care more about the Crits/Auto-Misses, then you should introduce a "subjectivity factor", which you can define however you like: is it important to you that you get a critical hit (or avoid a critical miss)? Then always go Advantage. If not, then use the table above. I generally stick to the table personally, but "clutch factor" is one of those hazy things that can't be objectively defined, so you'll need to make that call for yourself.







share|improve this answer














share|improve this answer



share|improve this answer








edited May 10 at 4:11

























answered May 9 at 15:29









XiremaXirema

27k379156




27k379156











  • $begingroup$
    If you provide a distribution of DCs you expect to meet plus a factor of "how much do I care if I pass" (basically a weight), you can work out how much advantage is "worth" in flat +X bonus. (With "bounded accuracy", +X is going to be linear)
    $endgroup$
    – Yakk
    May 9 at 17:35










  • $begingroup$
    Minor nitpick: the last bullet before "Practice" says "In each row, if the modifier difference between the Advantage and Non-Advantage rolls is greater than that number, then the modifier is better; if it's not, then the Advantage roll is better." I think that should be "at least" instead of "greater than".
    $endgroup$
    – EagleV_Attnam
    May 10 at 9:06










  • $begingroup$
    @EagleV_Attnam It's splitting hairs: in the scenario where the difference is exactly equal to the calculated value, neither roll is better (unless you explicitly prefer the Advantage Roll for context-specific reasons).
    $endgroup$
    – Xirema
    May 10 at 14:12










  • $begingroup$
    @Xirema That's true, I misread "that number" as referring to the adjusted (rounded up) value.
    $endgroup$
    – EagleV_Attnam
    May 10 at 14:19
















  • $begingroup$
    If you provide a distribution of DCs you expect to meet plus a factor of "how much do I care if I pass" (basically a weight), you can work out how much advantage is "worth" in flat +X bonus. (With "bounded accuracy", +X is going to be linear)
    $endgroup$
    – Yakk
    May 9 at 17:35










  • $begingroup$
    Minor nitpick: the last bullet before "Practice" says "In each row, if the modifier difference between the Advantage and Non-Advantage rolls is greater than that number, then the modifier is better; if it's not, then the Advantage roll is better." I think that should be "at least" instead of "greater than".
    $endgroup$
    – EagleV_Attnam
    May 10 at 9:06










  • $begingroup$
    @EagleV_Attnam It's splitting hairs: in the scenario where the difference is exactly equal to the calculated value, neither roll is better (unless you explicitly prefer the Advantage Roll for context-specific reasons).
    $endgroup$
    – Xirema
    May 10 at 14:12










  • $begingroup$
    @Xirema That's true, I misread "that number" as referring to the adjusted (rounded up) value.
    $endgroup$
    – EagleV_Attnam
    May 10 at 14:19















$begingroup$
If you provide a distribution of DCs you expect to meet plus a factor of "how much do I care if I pass" (basically a weight), you can work out how much advantage is "worth" in flat +X bonus. (With "bounded accuracy", +X is going to be linear)
$endgroup$
– Yakk
May 9 at 17:35




$begingroup$
If you provide a distribution of DCs you expect to meet plus a factor of "how much do I care if I pass" (basically a weight), you can work out how much advantage is "worth" in flat +X bonus. (With "bounded accuracy", +X is going to be linear)
$endgroup$
– Yakk
May 9 at 17:35












$begingroup$
Minor nitpick: the last bullet before "Practice" says "In each row, if the modifier difference between the Advantage and Non-Advantage rolls is greater than that number, then the modifier is better; if it's not, then the Advantage roll is better." I think that should be "at least" instead of "greater than".
$endgroup$
– EagleV_Attnam
May 10 at 9:06




$begingroup$
Minor nitpick: the last bullet before "Practice" says "In each row, if the modifier difference between the Advantage and Non-Advantage rolls is greater than that number, then the modifier is better; if it's not, then the Advantage roll is better." I think that should be "at least" instead of "greater than".
$endgroup$
– EagleV_Attnam
May 10 at 9:06












$begingroup$
@EagleV_Attnam It's splitting hairs: in the scenario where the difference is exactly equal to the calculated value, neither roll is better (unless you explicitly prefer the Advantage Roll for context-specific reasons).
$endgroup$
– Xirema
May 10 at 14:12




$begingroup$
@EagleV_Attnam It's splitting hairs: in the scenario where the difference is exactly equal to the calculated value, neither roll is better (unless you explicitly prefer the Advantage Roll for context-specific reasons).
$endgroup$
– Xirema
May 10 at 14:12












$begingroup$
@Xirema That's true, I misread "that number" as referring to the adjusted (rounded up) value.
$endgroup$
– EagleV_Attnam
May 10 at 14:19




$begingroup$
@Xirema That's true, I misread "that number" as referring to the adjusted (rounded up) value.
$endgroup$
– EagleV_Attnam
May 10 at 14:19













20












$begingroup$

It will depend on what you're trying to achieve. For example, if you need to reach DC 25, and $x = 4$ and $y = 5$, the advantage on the roll with $x$ doesn't matter; you'll never roll higher than 24. With the +5, you'll at least have a 5% chance.



Here (scroll down to "Advantage versus Simple Bonuses") is a table which shows which bonus (difference between x and y) corresponds to having advantage or not.



enter image description here



(source: Zero Hit Points)






share|improve this answer











$endgroup$












  • $begingroup$
    In 5e you don't need to "beat" a DC, you need to match it to overcome it. It would be clearer if your first sentence said "If the DC is 25, and x = 4 and y=5 then you will never pass the DC with x = 4, but you have a chance of passing the DC (5%) with y = 5".
    $endgroup$
    – illustro
    May 9 at 14:39











  • $begingroup$
    @illustro thanks, my experience is limited to 3(.5)E ...
    $endgroup$
    – Glorfindel
    May 9 at 14:42







  • 1




    $begingroup$
    (and even there you didn't need to beat a DC, but it's been a while ...)
    $endgroup$
    – Glorfindel
    May 9 at 14:50










  • $begingroup$
    I feel this analysis is improved by MORE ANYDICE. For example, with +2/+5 DC 10 advantage wins, 88% to 80%; but at +2/+5 DC 20, the normal roll is better, with odds of 30% vs. 28%. You can tinker with the variables in the script to investigate the results with different values!
    $endgroup$
    – Carcer
    May 9 at 15:41






  • 1




    $begingroup$
    @Carcer: Have some more AnyDice. :)
    $endgroup$
    – Ilmari Karonen
    May 9 at 17:23















20












$begingroup$

It will depend on what you're trying to achieve. For example, if you need to reach DC 25, and $x = 4$ and $y = 5$, the advantage on the roll with $x$ doesn't matter; you'll never roll higher than 24. With the +5, you'll at least have a 5% chance.



Here (scroll down to "Advantage versus Simple Bonuses") is a table which shows which bonus (difference between x and y) corresponds to having advantage or not.



enter image description here



(source: Zero Hit Points)






share|improve this answer











$endgroup$












  • $begingroup$
    In 5e you don't need to "beat" a DC, you need to match it to overcome it. It would be clearer if your first sentence said "If the DC is 25, and x = 4 and y=5 then you will never pass the DC with x = 4, but you have a chance of passing the DC (5%) with y = 5".
    $endgroup$
    – illustro
    May 9 at 14:39











  • $begingroup$
    @illustro thanks, my experience is limited to 3(.5)E ...
    $endgroup$
    – Glorfindel
    May 9 at 14:42







  • 1




    $begingroup$
    (and even there you didn't need to beat a DC, but it's been a while ...)
    $endgroup$
    – Glorfindel
    May 9 at 14:50










  • $begingroup$
    I feel this analysis is improved by MORE ANYDICE. For example, with +2/+5 DC 10 advantage wins, 88% to 80%; but at +2/+5 DC 20, the normal roll is better, with odds of 30% vs. 28%. You can tinker with the variables in the script to investigate the results with different values!
    $endgroup$
    – Carcer
    May 9 at 15:41






  • 1




    $begingroup$
    @Carcer: Have some more AnyDice. :)
    $endgroup$
    – Ilmari Karonen
    May 9 at 17:23













20












20








20





$begingroup$

It will depend on what you're trying to achieve. For example, if you need to reach DC 25, and $x = 4$ and $y = 5$, the advantage on the roll with $x$ doesn't matter; you'll never roll higher than 24. With the +5, you'll at least have a 5% chance.



Here (scroll down to "Advantage versus Simple Bonuses") is a table which shows which bonus (difference between x and y) corresponds to having advantage or not.



enter image description here



(source: Zero Hit Points)






share|improve this answer











$endgroup$



It will depend on what you're trying to achieve. For example, if you need to reach DC 25, and $x = 4$ and $y = 5$, the advantage on the roll with $x$ doesn't matter; you'll never roll higher than 24. With the +5, you'll at least have a 5% chance.



Here (scroll down to "Advantage versus Simple Bonuses") is a table which shows which bonus (difference between x and y) corresponds to having advantage or not.



enter image description here



(source: Zero Hit Points)







share|improve this answer














share|improve this answer



share|improve this answer








edited May 9 at 14:41

























answered May 9 at 14:13









GlorfindelGlorfindel

7161616




7161616











  • $begingroup$
    In 5e you don't need to "beat" a DC, you need to match it to overcome it. It would be clearer if your first sentence said "If the DC is 25, and x = 4 and y=5 then you will never pass the DC with x = 4, but you have a chance of passing the DC (5%) with y = 5".
    $endgroup$
    – illustro
    May 9 at 14:39











  • $begingroup$
    @illustro thanks, my experience is limited to 3(.5)E ...
    $endgroup$
    – Glorfindel
    May 9 at 14:42







  • 1




    $begingroup$
    (and even there you didn't need to beat a DC, but it's been a while ...)
    $endgroup$
    – Glorfindel
    May 9 at 14:50










  • $begingroup$
    I feel this analysis is improved by MORE ANYDICE. For example, with +2/+5 DC 10 advantage wins, 88% to 80%; but at +2/+5 DC 20, the normal roll is better, with odds of 30% vs. 28%. You can tinker with the variables in the script to investigate the results with different values!
    $endgroup$
    – Carcer
    May 9 at 15:41






  • 1




    $begingroup$
    @Carcer: Have some more AnyDice. :)
    $endgroup$
    – Ilmari Karonen
    May 9 at 17:23
















  • $begingroup$
    In 5e you don't need to "beat" a DC, you need to match it to overcome it. It would be clearer if your first sentence said "If the DC is 25, and x = 4 and y=5 then you will never pass the DC with x = 4, but you have a chance of passing the DC (5%) with y = 5".
    $endgroup$
    – illustro
    May 9 at 14:39











  • $begingroup$
    @illustro thanks, my experience is limited to 3(.5)E ...
    $endgroup$
    – Glorfindel
    May 9 at 14:42







  • 1




    $begingroup$
    (and even there you didn't need to beat a DC, but it's been a while ...)
    $endgroup$
    – Glorfindel
    May 9 at 14:50










  • $begingroup$
    I feel this analysis is improved by MORE ANYDICE. For example, with +2/+5 DC 10 advantage wins, 88% to 80%; but at +2/+5 DC 20, the normal roll is better, with odds of 30% vs. 28%. You can tinker with the variables in the script to investigate the results with different values!
    $endgroup$
    – Carcer
    May 9 at 15:41






  • 1




    $begingroup$
    @Carcer: Have some more AnyDice. :)
    $endgroup$
    – Ilmari Karonen
    May 9 at 17:23















$begingroup$
In 5e you don't need to "beat" a DC, you need to match it to overcome it. It would be clearer if your first sentence said "If the DC is 25, and x = 4 and y=5 then you will never pass the DC with x = 4, but you have a chance of passing the DC (5%) with y = 5".
$endgroup$
– illustro
May 9 at 14:39





$begingroup$
In 5e you don't need to "beat" a DC, you need to match it to overcome it. It would be clearer if your first sentence said "If the DC is 25, and x = 4 and y=5 then you will never pass the DC with x = 4, but you have a chance of passing the DC (5%) with y = 5".
$endgroup$
– illustro
May 9 at 14:39













$begingroup$
@illustro thanks, my experience is limited to 3(.5)E ...
$endgroup$
– Glorfindel
May 9 at 14:42





$begingroup$
@illustro thanks, my experience is limited to 3(.5)E ...
$endgroup$
– Glorfindel
May 9 at 14:42





1




1




$begingroup$
(and even there you didn't need to beat a DC, but it's been a while ...)
$endgroup$
– Glorfindel
May 9 at 14:50




$begingroup$
(and even there you didn't need to beat a DC, but it's been a while ...)
$endgroup$
– Glorfindel
May 9 at 14:50












$begingroup$
I feel this analysis is improved by MORE ANYDICE. For example, with +2/+5 DC 10 advantage wins, 88% to 80%; but at +2/+5 DC 20, the normal roll is better, with odds of 30% vs. 28%. You can tinker with the variables in the script to investigate the results with different values!
$endgroup$
– Carcer
May 9 at 15:41




$begingroup$
I feel this analysis is improved by MORE ANYDICE. For example, with +2/+5 DC 10 advantage wins, 88% to 80%; but at +2/+5 DC 20, the normal roll is better, with odds of 30% vs. 28%. You can tinker with the variables in the script to investigate the results with different values!
$endgroup$
– Carcer
May 9 at 15:41




1




1




$begingroup$
@Carcer: Have some more AnyDice. :)
$endgroup$
– Ilmari Karonen
May 9 at 17:23




$begingroup$
@Carcer: Have some more AnyDice. :)
$endgroup$
– Ilmari Karonen
May 9 at 17:23











18












$begingroup$

If you only care about maximising the expected result, as opposed to your odds of hitting a specific target number (for instance, you might be making a contested roll against someone else, like in a grapple, or otherwise don't know the target number ahead of time) this is a pretty simple comparison. Having advantage on a d20 roll increases the expected result from an average of 10.5 to 13.82 (illustrated by this anydice program); that's a benefit of +3.32.



Therefore, in order for a roll without advantage to have a higher expected result than a roll with advantage, the modifier on the normal roll needs to be four or more points better than the modifier on the advantaged roll. +3 with advantage is worse than +7 normally, and so on.






share|improve this answer











$endgroup$








  • 1




    $begingroup$
    This answer is great! And shows me we didn't need actual numbers. +1
    $endgroup$
    – NautArch
    May 9 at 14:59










  • $begingroup$
    @NautArch It is the kind of question where additional context does inform how you should compare your options, but both approaches are useful in different circumstances.
    $endgroup$
    – Carcer
    May 9 at 15:03






  • 1




    $begingroup$
    The difference in expected value between your rolls does not determine your odds of beating someone else's roll. As an example, suppose I roll 0 25% of the time and 20 75% of the time. My expected value is 15. My enemy rolls 19 100% of the time. Their expected value is 19. I beat them 1/4 of the time. Another enemy rolls 2 100% of the time. I beat them 1/4 of the time as well. In one case, my "average" roll was -4 and in the other it was +13 compared to them.
    $endgroup$
    – Yakk
    May 9 at 16:12







  • 1




    $begingroup$
    @Yakk awkward terminology. It's a comparison of the expected outcomes of your own two different options, not directly against whatever your opposition is. (That said, the question is about 5e D&D, so the distributions you propose are not something you would see in practice.)
    $endgroup$
    – Carcer
    May 9 at 16:17











  • $begingroup$
    @Yakk rephrased to describe expected results rather than the more ambiguous "beat". Is that more palatable?
    $endgroup$
    – Carcer
    May 9 at 16:21















18












$begingroup$

If you only care about maximising the expected result, as opposed to your odds of hitting a specific target number (for instance, you might be making a contested roll against someone else, like in a grapple, or otherwise don't know the target number ahead of time) this is a pretty simple comparison. Having advantage on a d20 roll increases the expected result from an average of 10.5 to 13.82 (illustrated by this anydice program); that's a benefit of +3.32.



Therefore, in order for a roll without advantage to have a higher expected result than a roll with advantage, the modifier on the normal roll needs to be four or more points better than the modifier on the advantaged roll. +3 with advantage is worse than +7 normally, and so on.






share|improve this answer











$endgroup$








  • 1




    $begingroup$
    This answer is great! And shows me we didn't need actual numbers. +1
    $endgroup$
    – NautArch
    May 9 at 14:59










  • $begingroup$
    @NautArch It is the kind of question where additional context does inform how you should compare your options, but both approaches are useful in different circumstances.
    $endgroup$
    – Carcer
    May 9 at 15:03






  • 1




    $begingroup$
    The difference in expected value between your rolls does not determine your odds of beating someone else's roll. As an example, suppose I roll 0 25% of the time and 20 75% of the time. My expected value is 15. My enemy rolls 19 100% of the time. Their expected value is 19. I beat them 1/4 of the time. Another enemy rolls 2 100% of the time. I beat them 1/4 of the time as well. In one case, my "average" roll was -4 and in the other it was +13 compared to them.
    $endgroup$
    – Yakk
    May 9 at 16:12







  • 1




    $begingroup$
    @Yakk awkward terminology. It's a comparison of the expected outcomes of your own two different options, not directly against whatever your opposition is. (That said, the question is about 5e D&D, so the distributions you propose are not something you would see in practice.)
    $endgroup$
    – Carcer
    May 9 at 16:17











  • $begingroup$
    @Yakk rephrased to describe expected results rather than the more ambiguous "beat". Is that more palatable?
    $endgroup$
    – Carcer
    May 9 at 16:21













18












18








18





$begingroup$

If you only care about maximising the expected result, as opposed to your odds of hitting a specific target number (for instance, you might be making a contested roll against someone else, like in a grapple, or otherwise don't know the target number ahead of time) this is a pretty simple comparison. Having advantage on a d20 roll increases the expected result from an average of 10.5 to 13.82 (illustrated by this anydice program); that's a benefit of +3.32.



Therefore, in order for a roll without advantage to have a higher expected result than a roll with advantage, the modifier on the normal roll needs to be four or more points better than the modifier on the advantaged roll. +3 with advantage is worse than +7 normally, and so on.






share|improve this answer











$endgroup$



If you only care about maximising the expected result, as opposed to your odds of hitting a specific target number (for instance, you might be making a contested roll against someone else, like in a grapple, or otherwise don't know the target number ahead of time) this is a pretty simple comparison. Having advantage on a d20 roll increases the expected result from an average of 10.5 to 13.82 (illustrated by this anydice program); that's a benefit of +3.32.



Therefore, in order for a roll without advantage to have a higher expected result than a roll with advantage, the modifier on the normal roll needs to be four or more points better than the modifier on the advantaged roll. +3 with advantage is worse than +7 normally, and so on.







share|improve this answer














share|improve this answer



share|improve this answer








edited May 9 at 16:20

























answered May 9 at 14:58









CarcerCarcer

29.3k588153




29.3k588153







  • 1




    $begingroup$
    This answer is great! And shows me we didn't need actual numbers. +1
    $endgroup$
    – NautArch
    May 9 at 14:59










  • $begingroup$
    @NautArch It is the kind of question where additional context does inform how you should compare your options, but both approaches are useful in different circumstances.
    $endgroup$
    – Carcer
    May 9 at 15:03






  • 1




    $begingroup$
    The difference in expected value between your rolls does not determine your odds of beating someone else's roll. As an example, suppose I roll 0 25% of the time and 20 75% of the time. My expected value is 15. My enemy rolls 19 100% of the time. Their expected value is 19. I beat them 1/4 of the time. Another enemy rolls 2 100% of the time. I beat them 1/4 of the time as well. In one case, my "average" roll was -4 and in the other it was +13 compared to them.
    $endgroup$
    – Yakk
    May 9 at 16:12







  • 1




    $begingroup$
    @Yakk awkward terminology. It's a comparison of the expected outcomes of your own two different options, not directly against whatever your opposition is. (That said, the question is about 5e D&D, so the distributions you propose are not something you would see in practice.)
    $endgroup$
    – Carcer
    May 9 at 16:17











  • $begingroup$
    @Yakk rephrased to describe expected results rather than the more ambiguous "beat". Is that more palatable?
    $endgroup$
    – Carcer
    May 9 at 16:21












  • 1




    $begingroup$
    This answer is great! And shows me we didn't need actual numbers. +1
    $endgroup$
    – NautArch
    May 9 at 14:59










  • $begingroup$
    @NautArch It is the kind of question where additional context does inform how you should compare your options, but both approaches are useful in different circumstances.
    $endgroup$
    – Carcer
    May 9 at 15:03






  • 1




    $begingroup$
    The difference in expected value between your rolls does not determine your odds of beating someone else's roll. As an example, suppose I roll 0 25% of the time and 20 75% of the time. My expected value is 15. My enemy rolls 19 100% of the time. Their expected value is 19. I beat them 1/4 of the time. Another enemy rolls 2 100% of the time. I beat them 1/4 of the time as well. In one case, my "average" roll was -4 and in the other it was +13 compared to them.
    $endgroup$
    – Yakk
    May 9 at 16:12







  • 1




    $begingroup$
    @Yakk awkward terminology. It's a comparison of the expected outcomes of your own two different options, not directly against whatever your opposition is. (That said, the question is about 5e D&D, so the distributions you propose are not something you would see in practice.)
    $endgroup$
    – Carcer
    May 9 at 16:17











  • $begingroup$
    @Yakk rephrased to describe expected results rather than the more ambiguous "beat". Is that more palatable?
    $endgroup$
    – Carcer
    May 9 at 16:21







1




1




$begingroup$
This answer is great! And shows me we didn't need actual numbers. +1
$endgroup$
– NautArch
May 9 at 14:59




$begingroup$
This answer is great! And shows me we didn't need actual numbers. +1
$endgroup$
– NautArch
May 9 at 14:59












$begingroup$
@NautArch It is the kind of question where additional context does inform how you should compare your options, but both approaches are useful in different circumstances.
$endgroup$
– Carcer
May 9 at 15:03




$begingroup$
@NautArch It is the kind of question where additional context does inform how you should compare your options, but both approaches are useful in different circumstances.
$endgroup$
– Carcer
May 9 at 15:03




1




1




$begingroup$
The difference in expected value between your rolls does not determine your odds of beating someone else's roll. As an example, suppose I roll 0 25% of the time and 20 75% of the time. My expected value is 15. My enemy rolls 19 100% of the time. Their expected value is 19. I beat them 1/4 of the time. Another enemy rolls 2 100% of the time. I beat them 1/4 of the time as well. In one case, my "average" roll was -4 and in the other it was +13 compared to them.
$endgroup$
– Yakk
May 9 at 16:12





$begingroup$
The difference in expected value between your rolls does not determine your odds of beating someone else's roll. As an example, suppose I roll 0 25% of the time and 20 75% of the time. My expected value is 15. My enemy rolls 19 100% of the time. Their expected value is 19. I beat them 1/4 of the time. Another enemy rolls 2 100% of the time. I beat them 1/4 of the time as well. In one case, my "average" roll was -4 and in the other it was +13 compared to them.
$endgroup$
– Yakk
May 9 at 16:12





1




1




$begingroup$
@Yakk awkward terminology. It's a comparison of the expected outcomes of your own two different options, not directly against whatever your opposition is. (That said, the question is about 5e D&D, so the distributions you propose are not something you would see in practice.)
$endgroup$
– Carcer
May 9 at 16:17





$begingroup$
@Yakk awkward terminology. It's a comparison of the expected outcomes of your own two different options, not directly against whatever your opposition is. (That said, the question is about 5e D&D, so the distributions you propose are not something you would see in practice.)
$endgroup$
– Carcer
May 9 at 16:17













$begingroup$
@Yakk rephrased to describe expected results rather than the more ambiguous "beat". Is that more palatable?
$endgroup$
– Carcer
May 9 at 16:21




$begingroup$
@Yakk rephrased to describe expected results rather than the more ambiguous "beat". Is that more palatable?
$endgroup$
– Carcer
May 9 at 16:21











8












$begingroup$

First, subtract $x$ both from $y$ and from the target number you're rolling against. Then look at this graph:



Screenshot



In the graph, find the position on the horizontal axis that matches the target number (minus $x$) that you're trying to meet or exceed, and the colored line that matches the extra bonus $y-x$ to the roll without advantage. If that colored line is higher that the curved black line at that position on the horizontal axis, you should choose the higher bonus over advantage.



(Specifically, the various lines in the graph show the probability of meeting or exceeding a given target number with various rolls: the black curved line is for d20 with advantage but no bonus, while the five different colored straight lines on top of it are for d20+1 to d20+5.)




Or, to summarize, you should choose a plain $+y$ bonus over advantage $+x$ when...




  • $y = x + 1$ and the target number is at most $x+2$ or at least $x+20$;


  • $y = x + 2$ and the target number is at most $x+3$ or at least $x+19$;


  • $y = x + 3$ and the target number is at most $x+4$ or at least $x+18$;


  • $y = x + 4$ and the target number is at most $x+6$ or at least $x+16$; or


  • $y ge x + 5$.

(As noted by Xirema, things can change a little if you're e.g. making an attack roll and care about crits. Rolling with advantage has a 9.75% chance of giving you a natural 20, and only a 0.25% chance of a natural 1, whereas with a normal d20 roll both 1s and 20s show up 5% of the time each. Whether those differences in crit odds are worth trading for a somewhat worse chance to hit depends both on the target DC and on how much you value crits.)






share|improve this answer









$endgroup$












  • $begingroup$
    Here is what I think to be a simpler graph OP can plug numbers into. Merely change X:1 to what X you want and the same for Y:2. E.g., you want 5 and 10, X:5 and Y:10.
    $endgroup$
    – Captain Man
    May 9 at 18:22















8












$begingroup$

First, subtract $x$ both from $y$ and from the target number you're rolling against. Then look at this graph:



Screenshot



In the graph, find the position on the horizontal axis that matches the target number (minus $x$) that you're trying to meet or exceed, and the colored line that matches the extra bonus $y-x$ to the roll without advantage. If that colored line is higher that the curved black line at that position on the horizontal axis, you should choose the higher bonus over advantage.



(Specifically, the various lines in the graph show the probability of meeting or exceeding a given target number with various rolls: the black curved line is for d20 with advantage but no bonus, while the five different colored straight lines on top of it are for d20+1 to d20+5.)




Or, to summarize, you should choose a plain $+y$ bonus over advantage $+x$ when...




  • $y = x + 1$ and the target number is at most $x+2$ or at least $x+20$;


  • $y = x + 2$ and the target number is at most $x+3$ or at least $x+19$;


  • $y = x + 3$ and the target number is at most $x+4$ or at least $x+18$;


  • $y = x + 4$ and the target number is at most $x+6$ or at least $x+16$; or


  • $y ge x + 5$.

(As noted by Xirema, things can change a little if you're e.g. making an attack roll and care about crits. Rolling with advantage has a 9.75% chance of giving you a natural 20, and only a 0.25% chance of a natural 1, whereas with a normal d20 roll both 1s and 20s show up 5% of the time each. Whether those differences in crit odds are worth trading for a somewhat worse chance to hit depends both on the target DC and on how much you value crits.)






share|improve this answer









$endgroup$












  • $begingroup$
    Here is what I think to be a simpler graph OP can plug numbers into. Merely change X:1 to what X you want and the same for Y:2. E.g., you want 5 and 10, X:5 and Y:10.
    $endgroup$
    – Captain Man
    May 9 at 18:22













8












8








8





$begingroup$

First, subtract $x$ both from $y$ and from the target number you're rolling against. Then look at this graph:



Screenshot



In the graph, find the position on the horizontal axis that matches the target number (minus $x$) that you're trying to meet or exceed, and the colored line that matches the extra bonus $y-x$ to the roll without advantage. If that colored line is higher that the curved black line at that position on the horizontal axis, you should choose the higher bonus over advantage.



(Specifically, the various lines in the graph show the probability of meeting or exceeding a given target number with various rolls: the black curved line is for d20 with advantage but no bonus, while the five different colored straight lines on top of it are for d20+1 to d20+5.)




Or, to summarize, you should choose a plain $+y$ bonus over advantage $+x$ when...




  • $y = x + 1$ and the target number is at most $x+2$ or at least $x+20$;


  • $y = x + 2$ and the target number is at most $x+3$ or at least $x+19$;


  • $y = x + 3$ and the target number is at most $x+4$ or at least $x+18$;


  • $y = x + 4$ and the target number is at most $x+6$ or at least $x+16$; or


  • $y ge x + 5$.

(As noted by Xirema, things can change a little if you're e.g. making an attack roll and care about crits. Rolling with advantage has a 9.75% chance of giving you a natural 20, and only a 0.25% chance of a natural 1, whereas with a normal d20 roll both 1s and 20s show up 5% of the time each. Whether those differences in crit odds are worth trading for a somewhat worse chance to hit depends both on the target DC and on how much you value crits.)






share|improve this answer









$endgroup$



First, subtract $x$ both from $y$ and from the target number you're rolling against. Then look at this graph:



Screenshot



In the graph, find the position on the horizontal axis that matches the target number (minus $x$) that you're trying to meet or exceed, and the colored line that matches the extra bonus $y-x$ to the roll without advantage. If that colored line is higher that the curved black line at that position on the horizontal axis, you should choose the higher bonus over advantage.



(Specifically, the various lines in the graph show the probability of meeting or exceeding a given target number with various rolls: the black curved line is for d20 with advantage but no bonus, while the five different colored straight lines on top of it are for d20+1 to d20+5.)




Or, to summarize, you should choose a plain $+y$ bonus over advantage $+x$ when...




  • $y = x + 1$ and the target number is at most $x+2$ or at least $x+20$;


  • $y = x + 2$ and the target number is at most $x+3$ or at least $x+19$;


  • $y = x + 3$ and the target number is at most $x+4$ or at least $x+18$;


  • $y = x + 4$ and the target number is at most $x+6$ or at least $x+16$; or


  • $y ge x + 5$.

(As noted by Xirema, things can change a little if you're e.g. making an attack roll and care about crits. Rolling with advantage has a 9.75% chance of giving you a natural 20, and only a 0.25% chance of a natural 1, whereas with a normal d20 roll both 1s and 20s show up 5% of the time each. Whether those differences in crit odds are worth trading for a somewhat worse chance to hit depends both on the target DC and on how much you value crits.)







share|improve this answer












share|improve this answer



share|improve this answer










answered May 9 at 18:10









Ilmari KaronenIlmari Karonen

11.6k33448




11.6k33448











  • $begingroup$
    Here is what I think to be a simpler graph OP can plug numbers into. Merely change X:1 to what X you want and the same for Y:2. E.g., you want 5 and 10, X:5 and Y:10.
    $endgroup$
    – Captain Man
    May 9 at 18:22
















  • $begingroup$
    Here is what I think to be a simpler graph OP can plug numbers into. Merely change X:1 to what X you want and the same for Y:2. E.g., you want 5 and 10, X:5 and Y:10.
    $endgroup$
    – Captain Man
    May 9 at 18:22















$begingroup$
Here is what I think to be a simpler graph OP can plug numbers into. Merely change X:1 to what X you want and the same for Y:2. E.g., you want 5 and 10, X:5 and Y:10.
$endgroup$
– Captain Man
May 9 at 18:22




$begingroup$
Here is what I think to be a simpler graph OP can plug numbers into. Merely change X:1 to what X you want and the same for Y:2. E.g., you want 5 and 10, X:5 and Y:10.
$endgroup$
– Captain Man
May 9 at 18:22











1












$begingroup$

tl;dr- Assuming neither roll is a sure thing, then advantage has better odds if$$
frac
left(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2 < 20
tag1
,.$$
Here's an online C# script to play with this. Details at the bottom of this answer.




Example



  1. You have to beat a $textDC = 10 .$



  2. You have two options:



    • Roll normally with a bonus of $+5 .$


    • Roll with advantage and a bonus of $+1 .$



  3. Plug this into $operatornameEq.left(1right)$ to find:$$
    fracleft(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2
    ~=~
    fracleft(10 - 1 - 1right)^210 - 5 - 1
    ~=~
    frac8^24
    ~=~16
    ~<~ 20
    ,.$$


  4. Since $16 < 20 ,$ this inequality is $textttTRUE ,$ and therefore rolling with advantage is better.



  5. By contrast, if the $textDC$ were $17$ instead of $10 ,$ then the inequality would've reduced to$$
    fracleft(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2
    ~=~
    fracleft(17 - 1 - 1right)^217 - 5 - 1
    ~=~
    frac15^211
    ~=~ sim 20.45
    ~<~ 20
    ,,$$



    and since $sim 20.45 < 20$ is $textttFALSE ,$ this means that the odds aren't better when rolling with advantage. So, in this case, it'd seem better to roll normally with $+5$ rather than with $+1$ and advantage.




Explanation



First:



  1. If either option is a sure-thing, just do it.


  2. If neither option has a chance, nothing you can do anyway.


So this leaves only the case in which both options have some non-certain possibility.



Then, the odds of failing to beat a DC on a single roll are
$$
P_textroll
~=~ 5 , left(left[textDCright] - left[textbonusright] - 1right) , %
,,
$$
and the odds of failing to beat a DC with advantage are$$
P_beginarrayctextroll with \[-10px] textadvantageendarray
~=~ P_textroll^2
~=~ left(5 , left(left[textDCright] - left[textbonusright] - 1right) , %right)^2
~=~ 0.25 , left(left[textDCright] - left[textbonusright] - 1right)^2 , %
,.$$



So, your odds of failure with advantage are lower when
$$
0.25 , left(left[textDCright] - left[textbonusright]_textadvantage - 1right)^2 , %
~<~
5 , left(left[textDCright] - left[textbonusright]_textnormal - 1right) , %
,,$$

or
$$
frac
left(left[textDCright] - left[textbonusright]_textadvantage - 1right)^2

left[textDCright] - left[textbonusright]_textnormal - 1

~<~
20
,.
$$



To make that a little more intuitive, let's write it as
$$
frac
left(textDC - textadvantage bonus - 1right)^2

textDC - textnormal bonus - 1

~<~
20
,.
$$




Notes



  1. The tl;dr advice recommends against rolling with advantage when the odds are the same either way. I chose this convention since it's less work. But, if someone likes to roll, then they might instead roll with advantage if
    $$
    frac
    left(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2 le 20
    ,.$$


  2. The above logic assumes that the d20-die is fair. If it's not, then I'd guess that rolling without advantage is a bit better than it would normally be because an unfair die would seem to have less variability between rolls. Since most dice probably aren't perfectly fair, a hardcore optimizer might prefer to roll without advantage when$$
    frac
    left(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2 approx 20
    ,.$$


  3. The $`` 20 "$ in the inequality is no coincidence; it corresponds to the "20" in "d20". Likewise, the $`` 1 "$ corresponds to the minimum die value. So if another sort of die is used, this inequality can be generalized to$$
    frac
    left(textDC - textadvantage bonus - textmin die valueright)^2textDC - textnormal bonus - textmin die value phantom^2
    ~<~
    textmax die value - textmin die value + 1
    ,.$$


  4. The above derivation focused on the probability of failure, rather than the probability of success, because the math would've been a bit uglier for rolling with advantage if we focused on maximizing success (rather than minimizing error). However, if anyone does this same calculation for rolling with disadvantage, the math should be cleaner if you instead derive it by focusing on maximizing success. The reason for this is that advantage/disadvantage requires a second die roll only on failure/success of the first roll.



C# script to play with this



I was going to attach a JavaScript snippet here, but I guess that feature's not on this StackExchange. So, here's a C# script that can be run online.



Notes:




  1. To use it, call Report(dc, bonus_normal, bonus_advantage);, and it'll tell you which is better.




    • Currently, it's pre-loaded to call Report(10, 5, 1); and Report(17, 5, 1); to demonstrate the example given near the top of this answer. This should return:




      For DC = 10 Bonus (normal) = 5 Bonus (advantage) = 1:
      Your odds are better with the power of ADVANTAGE!

      For DC = 17 Bonus (normal) = 5 Bonus (advantage) = 1:
      Advantage is for losers; roll normally!




  2. By default, it uses a d20, with a minimum value of 1 and a maximum value of 20. Both of these values can be changed in the code.


  3. $operatornameEq.left(1right)$ (and its generalization, as used in this script) assume that, if the odds can't be improved by advantage, you prefer to roll normally (since it's less rolling).


  4. $operatornameEq.left(1right)$ assumes success and failure are both possible with both advantage and normal rolling. This script checks to ensure that that's true before using $operatornameEq.left(1right) .$


Source code (C#):



using System;

public class Program

// A typical d20 has a minimum value of 1 and a maximum of 20:
public const long MINIMUM_DIE_VALUE = 1;
public const long MAXIMUM_DIE_VALUE = 20;

public static void RunExample()

Report(
10
, 5
, 1
);

Report(
17
, 5
, 1
);


public static void Report(
long dc
, long bonus_normal
, long bonus_advantage
)

var stringMessage =
"FortDC = "
+ dc.ToString()
+ "tBonus (normal) = "
+ bonus_normal.ToString()
+ "tBonus (advantage) = "
+ bonus_advantage.ToString()
+ ":"
+ System.Environment.NewLine
;

if (ShouldRollWithAdvantage(
dc
, bonus_normal
, bonus_advantage
))

stringMessage += "Your odds are better with the power of ADVANTAGE!";
//Console.WriteLine("Your odds are better with the power of ADVANTAGE!");

else

stringMessage += "Advantage is for losers; roll normally!";
//Console.WriteLine("Advantage is for losers; roll normally!");


Console.WriteLine(stringMessage);
Console.WriteLine();


public static bool ShouldRollWithAdvantage(
long dc
, long bonus_normal
, long bonus_advantage
)

// Case 1:
// If rolling with advantage can't succeed, then just roll normally.
// Doesn't matter if rolling normally can't succeed, either, because if
// you're going to fail either way, may as well only roll once.
if (dc - bonus_advantage > MAXIMUM_DIE_VALUE)

return false;


// Case 2:
// If rolling without advantage can't succeed, then roll with advantage.
if (dc - bonus_normal > MAXIMUM_DIE_VALUE)

return true;


// Case 3:
// If rolling without advantage always succeeds, then roll without advantage.
if (dc - bonus_normal <= MINIMUM_DIE_VALUE)

return false;


// Case 4:
// If rolling with advntage always succeeds, then roll with advantage.
if (dc - bonus_advantage <= MINIMUM_DIE_VALUE)

return true;


// Case 5:
// Since rolling with advantage and rolling without advantage are both
// possible-but-not-guaranteed, we compare their odds of success.
//
// This method checks if
// (DC - bonus_advantage - 1)^2
// is less than
// 20 * (DC - bonus_normal - 1)
// instead of the fraction to avoid floating-point values.

var leftHandSide = (dc - bonus_advantage - MINIMUM_DIE_VALUE);
leftHandSide *= leftHandSide;

var rightHandSide = (MAXIMUM_DIE_VALUE - MINIMUM_DIE_VALUE + 1) * (dc - bonus_normal - MINIMUM_DIE_VALUE);

var shouldRollWithAdvantage = leftHandSide < rightHandSide;

return shouldRollWithAdvantage;



private static bool TryValidateProgramConstants(
out string errorMessage
)

if (!(MINIMUM_DIE_VALUE < MAXIMUM_DIE_VALUE))

errorMessage = "Maximum die value must be greater than minimum die value.";
return false;


if (MINIMUM_DIE_VALUE < -1000)

errorMessage = "Unreasonably low minimum die value.";
return false;


if (MAXIMUM_DIE_VALUE > 1000)

errorMessage = "Unreasonably high maximum die value.";
return false;


errorMessage = default(string);
return true;


public static void Main()

string errorMessage;
if (TryValidateProgramConstants(out errorMessage))

RunExample();

else

Console.WriteLine("Error in program validation; aborting run.");

if (!string.IsNullOrWhiteSpace(errorMessage))

Console.WriteLine(errorMessage);










share|improve this answer











$endgroup$












  • $begingroup$
    @NautArch I'd intended to explain it in the"Explanation" section. Is that what you mean, or is there something else?
    $endgroup$
    – Nat
    May 10 at 18:01










  • $begingroup$
    @NautArch Ah, gotcha. I can add a shorter version that's lighter on the math at the start.
    $endgroup$
    – Nat
    May 10 at 18:04










  • $begingroup$
    @NautArch I expanded the tl;dr. Does that look about right?
    $endgroup$
    – Nat
    May 10 at 18:28











  • $begingroup$
    Let us continue this discussion in chat.
    $endgroup$
    – NautArch
    May 10 at 18:29















1












$begingroup$

tl;dr- Assuming neither roll is a sure thing, then advantage has better odds if$$
frac
left(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2 < 20
tag1
,.$$
Here's an online C# script to play with this. Details at the bottom of this answer.




Example



  1. You have to beat a $textDC = 10 .$



  2. You have two options:



    • Roll normally with a bonus of $+5 .$


    • Roll with advantage and a bonus of $+1 .$



  3. Plug this into $operatornameEq.left(1right)$ to find:$$
    fracleft(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2
    ~=~
    fracleft(10 - 1 - 1right)^210 - 5 - 1
    ~=~
    frac8^24
    ~=~16
    ~<~ 20
    ,.$$


  4. Since $16 < 20 ,$ this inequality is $textttTRUE ,$ and therefore rolling with advantage is better.



  5. By contrast, if the $textDC$ were $17$ instead of $10 ,$ then the inequality would've reduced to$$
    fracleft(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2
    ~=~
    fracleft(17 - 1 - 1right)^217 - 5 - 1
    ~=~
    frac15^211
    ~=~ sim 20.45
    ~<~ 20
    ,,$$



    and since $sim 20.45 < 20$ is $textttFALSE ,$ this means that the odds aren't better when rolling with advantage. So, in this case, it'd seem better to roll normally with $+5$ rather than with $+1$ and advantage.




Explanation



First:



  1. If either option is a sure-thing, just do it.


  2. If neither option has a chance, nothing you can do anyway.


So this leaves only the case in which both options have some non-certain possibility.



Then, the odds of failing to beat a DC on a single roll are
$$
P_textroll
~=~ 5 , left(left[textDCright] - left[textbonusright] - 1right) , %
,,
$$
and the odds of failing to beat a DC with advantage are$$
P_beginarrayctextroll with \[-10px] textadvantageendarray
~=~ P_textroll^2
~=~ left(5 , left(left[textDCright] - left[textbonusright] - 1right) , %right)^2
~=~ 0.25 , left(left[textDCright] - left[textbonusright] - 1right)^2 , %
,.$$



So, your odds of failure with advantage are lower when
$$
0.25 , left(left[textDCright] - left[textbonusright]_textadvantage - 1right)^2 , %
~<~
5 , left(left[textDCright] - left[textbonusright]_textnormal - 1right) , %
,,$$

or
$$
frac
left(left[textDCright] - left[textbonusright]_textadvantage - 1right)^2

left[textDCright] - left[textbonusright]_textnormal - 1

~<~
20
,.
$$



To make that a little more intuitive, let's write it as
$$
frac
left(textDC - textadvantage bonus - 1right)^2

textDC - textnormal bonus - 1

~<~
20
,.
$$




Notes



  1. The tl;dr advice recommends against rolling with advantage when the odds are the same either way. I chose this convention since it's less work. But, if someone likes to roll, then they might instead roll with advantage if
    $$
    frac
    left(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2 le 20
    ,.$$


  2. The above logic assumes that the d20-die is fair. If it's not, then I'd guess that rolling without advantage is a bit better than it would normally be because an unfair die would seem to have less variability between rolls. Since most dice probably aren't perfectly fair, a hardcore optimizer might prefer to roll without advantage when$$
    frac
    left(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2 approx 20
    ,.$$


  3. The $`` 20 "$ in the inequality is no coincidence; it corresponds to the "20" in "d20". Likewise, the $`` 1 "$ corresponds to the minimum die value. So if another sort of die is used, this inequality can be generalized to$$
    frac
    left(textDC - textadvantage bonus - textmin die valueright)^2textDC - textnormal bonus - textmin die value phantom^2
    ~<~
    textmax die value - textmin die value + 1
    ,.$$


  4. The above derivation focused on the probability of failure, rather than the probability of success, because the math would've been a bit uglier for rolling with advantage if we focused on maximizing success (rather than minimizing error). However, if anyone does this same calculation for rolling with disadvantage, the math should be cleaner if you instead derive it by focusing on maximizing success. The reason for this is that advantage/disadvantage requires a second die roll only on failure/success of the first roll.



C# script to play with this



I was going to attach a JavaScript snippet here, but I guess that feature's not on this StackExchange. So, here's a C# script that can be run online.



Notes:




  1. To use it, call Report(dc, bonus_normal, bonus_advantage);, and it'll tell you which is better.




    • Currently, it's pre-loaded to call Report(10, 5, 1); and Report(17, 5, 1); to demonstrate the example given near the top of this answer. This should return:




      For DC = 10 Bonus (normal) = 5 Bonus (advantage) = 1:
      Your odds are better with the power of ADVANTAGE!

      For DC = 17 Bonus (normal) = 5 Bonus (advantage) = 1:
      Advantage is for losers; roll normally!




  2. By default, it uses a d20, with a minimum value of 1 and a maximum value of 20. Both of these values can be changed in the code.


  3. $operatornameEq.left(1right)$ (and its generalization, as used in this script) assume that, if the odds can't be improved by advantage, you prefer to roll normally (since it's less rolling).


  4. $operatornameEq.left(1right)$ assumes success and failure are both possible with both advantage and normal rolling. This script checks to ensure that that's true before using $operatornameEq.left(1right) .$


Source code (C#):



using System;

public class Program

// A typical d20 has a minimum value of 1 and a maximum of 20:
public const long MINIMUM_DIE_VALUE = 1;
public const long MAXIMUM_DIE_VALUE = 20;

public static void RunExample()

Report(
10
, 5
, 1
);

Report(
17
, 5
, 1
);


public static void Report(
long dc
, long bonus_normal
, long bonus_advantage
)

var stringMessage =
"FortDC = "
+ dc.ToString()
+ "tBonus (normal) = "
+ bonus_normal.ToString()
+ "tBonus (advantage) = "
+ bonus_advantage.ToString()
+ ":"
+ System.Environment.NewLine
;

if (ShouldRollWithAdvantage(
dc
, bonus_normal
, bonus_advantage
))

stringMessage += "Your odds are better with the power of ADVANTAGE!";
//Console.WriteLine("Your odds are better with the power of ADVANTAGE!");

else

stringMessage += "Advantage is for losers; roll normally!";
//Console.WriteLine("Advantage is for losers; roll normally!");


Console.WriteLine(stringMessage);
Console.WriteLine();


public static bool ShouldRollWithAdvantage(
long dc
, long bonus_normal
, long bonus_advantage
)

// Case 1:
// If rolling with advantage can't succeed, then just roll normally.
// Doesn't matter if rolling normally can't succeed, either, because if
// you're going to fail either way, may as well only roll once.
if (dc - bonus_advantage > MAXIMUM_DIE_VALUE)

return false;


// Case 2:
// If rolling without advantage can't succeed, then roll with advantage.
if (dc - bonus_normal > MAXIMUM_DIE_VALUE)

return true;


// Case 3:
// If rolling without advantage always succeeds, then roll without advantage.
if (dc - bonus_normal <= MINIMUM_DIE_VALUE)

return false;


// Case 4:
// If rolling with advntage always succeeds, then roll with advantage.
if (dc - bonus_advantage <= MINIMUM_DIE_VALUE)

return true;


// Case 5:
// Since rolling with advantage and rolling without advantage are both
// possible-but-not-guaranteed, we compare their odds of success.
//
// This method checks if
// (DC - bonus_advantage - 1)^2
// is less than
// 20 * (DC - bonus_normal - 1)
// instead of the fraction to avoid floating-point values.

var leftHandSide = (dc - bonus_advantage - MINIMUM_DIE_VALUE);
leftHandSide *= leftHandSide;

var rightHandSide = (MAXIMUM_DIE_VALUE - MINIMUM_DIE_VALUE + 1) * (dc - bonus_normal - MINIMUM_DIE_VALUE);

var shouldRollWithAdvantage = leftHandSide < rightHandSide;

return shouldRollWithAdvantage;



private static bool TryValidateProgramConstants(
out string errorMessage
)

if (!(MINIMUM_DIE_VALUE < MAXIMUM_DIE_VALUE))

errorMessage = "Maximum die value must be greater than minimum die value.";
return false;


if (MINIMUM_DIE_VALUE < -1000)

errorMessage = "Unreasonably low minimum die value.";
return false;


if (MAXIMUM_DIE_VALUE > 1000)

errorMessage = "Unreasonably high maximum die value.";
return false;


errorMessage = default(string);
return true;


public static void Main()

string errorMessage;
if (TryValidateProgramConstants(out errorMessage))

RunExample();

else

Console.WriteLine("Error in program validation; aborting run.");

if (!string.IsNullOrWhiteSpace(errorMessage))

Console.WriteLine(errorMessage);










share|improve this answer











$endgroup$












  • $begingroup$
    @NautArch I'd intended to explain it in the"Explanation" section. Is that what you mean, or is there something else?
    $endgroup$
    – Nat
    May 10 at 18:01










  • $begingroup$
    @NautArch Ah, gotcha. I can add a shorter version that's lighter on the math at the start.
    $endgroup$
    – Nat
    May 10 at 18:04










  • $begingroup$
    @NautArch I expanded the tl;dr. Does that look about right?
    $endgroup$
    – Nat
    May 10 at 18:28











  • $begingroup$
    Let us continue this discussion in chat.
    $endgroup$
    – NautArch
    May 10 at 18:29













1












1








1





$begingroup$

tl;dr- Assuming neither roll is a sure thing, then advantage has better odds if$$
frac
left(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2 < 20
tag1
,.$$
Here's an online C# script to play with this. Details at the bottom of this answer.




Example



  1. You have to beat a $textDC = 10 .$



  2. You have two options:



    • Roll normally with a bonus of $+5 .$


    • Roll with advantage and a bonus of $+1 .$



  3. Plug this into $operatornameEq.left(1right)$ to find:$$
    fracleft(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2
    ~=~
    fracleft(10 - 1 - 1right)^210 - 5 - 1
    ~=~
    frac8^24
    ~=~16
    ~<~ 20
    ,.$$


  4. Since $16 < 20 ,$ this inequality is $textttTRUE ,$ and therefore rolling with advantage is better.



  5. By contrast, if the $textDC$ were $17$ instead of $10 ,$ then the inequality would've reduced to$$
    fracleft(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2
    ~=~
    fracleft(17 - 1 - 1right)^217 - 5 - 1
    ~=~
    frac15^211
    ~=~ sim 20.45
    ~<~ 20
    ,,$$



    and since $sim 20.45 < 20$ is $textttFALSE ,$ this means that the odds aren't better when rolling with advantage. So, in this case, it'd seem better to roll normally with $+5$ rather than with $+1$ and advantage.




Explanation



First:



  1. If either option is a sure-thing, just do it.


  2. If neither option has a chance, nothing you can do anyway.


So this leaves only the case in which both options have some non-certain possibility.



Then, the odds of failing to beat a DC on a single roll are
$$
P_textroll
~=~ 5 , left(left[textDCright] - left[textbonusright] - 1right) , %
,,
$$
and the odds of failing to beat a DC with advantage are$$
P_beginarrayctextroll with \[-10px] textadvantageendarray
~=~ P_textroll^2
~=~ left(5 , left(left[textDCright] - left[textbonusright] - 1right) , %right)^2
~=~ 0.25 , left(left[textDCright] - left[textbonusright] - 1right)^2 , %
,.$$



So, your odds of failure with advantage are lower when
$$
0.25 , left(left[textDCright] - left[textbonusright]_textadvantage - 1right)^2 , %
~<~
5 , left(left[textDCright] - left[textbonusright]_textnormal - 1right) , %
,,$$

or
$$
frac
left(left[textDCright] - left[textbonusright]_textadvantage - 1right)^2

left[textDCright] - left[textbonusright]_textnormal - 1

~<~
20
,.
$$



To make that a little more intuitive, let's write it as
$$
frac
left(textDC - textadvantage bonus - 1right)^2

textDC - textnormal bonus - 1

~<~
20
,.
$$




Notes



  1. The tl;dr advice recommends against rolling with advantage when the odds are the same either way. I chose this convention since it's less work. But, if someone likes to roll, then they might instead roll with advantage if
    $$
    frac
    left(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2 le 20
    ,.$$


  2. The above logic assumes that the d20-die is fair. If it's not, then I'd guess that rolling without advantage is a bit better than it would normally be because an unfair die would seem to have less variability between rolls. Since most dice probably aren't perfectly fair, a hardcore optimizer might prefer to roll without advantage when$$
    frac
    left(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2 approx 20
    ,.$$


  3. The $`` 20 "$ in the inequality is no coincidence; it corresponds to the "20" in "d20". Likewise, the $`` 1 "$ corresponds to the minimum die value. So if another sort of die is used, this inequality can be generalized to$$
    frac
    left(textDC - textadvantage bonus - textmin die valueright)^2textDC - textnormal bonus - textmin die value phantom^2
    ~<~
    textmax die value - textmin die value + 1
    ,.$$


  4. The above derivation focused on the probability of failure, rather than the probability of success, because the math would've been a bit uglier for rolling with advantage if we focused on maximizing success (rather than minimizing error). However, if anyone does this same calculation for rolling with disadvantage, the math should be cleaner if you instead derive it by focusing on maximizing success. The reason for this is that advantage/disadvantage requires a second die roll only on failure/success of the first roll.



C# script to play with this



I was going to attach a JavaScript snippet here, but I guess that feature's not on this StackExchange. So, here's a C# script that can be run online.



Notes:




  1. To use it, call Report(dc, bonus_normal, bonus_advantage);, and it'll tell you which is better.




    • Currently, it's pre-loaded to call Report(10, 5, 1); and Report(17, 5, 1); to demonstrate the example given near the top of this answer. This should return:




      For DC = 10 Bonus (normal) = 5 Bonus (advantage) = 1:
      Your odds are better with the power of ADVANTAGE!

      For DC = 17 Bonus (normal) = 5 Bonus (advantage) = 1:
      Advantage is for losers; roll normally!




  2. By default, it uses a d20, with a minimum value of 1 and a maximum value of 20. Both of these values can be changed in the code.


  3. $operatornameEq.left(1right)$ (and its generalization, as used in this script) assume that, if the odds can't be improved by advantage, you prefer to roll normally (since it's less rolling).


  4. $operatornameEq.left(1right)$ assumes success and failure are both possible with both advantage and normal rolling. This script checks to ensure that that's true before using $operatornameEq.left(1right) .$


Source code (C#):



using System;

public class Program

// A typical d20 has a minimum value of 1 and a maximum of 20:
public const long MINIMUM_DIE_VALUE = 1;
public const long MAXIMUM_DIE_VALUE = 20;

public static void RunExample()

Report(
10
, 5
, 1
);

Report(
17
, 5
, 1
);


public static void Report(
long dc
, long bonus_normal
, long bonus_advantage
)

var stringMessage =
"FortDC = "
+ dc.ToString()
+ "tBonus (normal) = "
+ bonus_normal.ToString()
+ "tBonus (advantage) = "
+ bonus_advantage.ToString()
+ ":"
+ System.Environment.NewLine
;

if (ShouldRollWithAdvantage(
dc
, bonus_normal
, bonus_advantage
))

stringMessage += "Your odds are better with the power of ADVANTAGE!";
//Console.WriteLine("Your odds are better with the power of ADVANTAGE!");

else

stringMessage += "Advantage is for losers; roll normally!";
//Console.WriteLine("Advantage is for losers; roll normally!");


Console.WriteLine(stringMessage);
Console.WriteLine();


public static bool ShouldRollWithAdvantage(
long dc
, long bonus_normal
, long bonus_advantage
)

// Case 1:
// If rolling with advantage can't succeed, then just roll normally.
// Doesn't matter if rolling normally can't succeed, either, because if
// you're going to fail either way, may as well only roll once.
if (dc - bonus_advantage > MAXIMUM_DIE_VALUE)

return false;


// Case 2:
// If rolling without advantage can't succeed, then roll with advantage.
if (dc - bonus_normal > MAXIMUM_DIE_VALUE)

return true;


// Case 3:
// If rolling without advantage always succeeds, then roll without advantage.
if (dc - bonus_normal <= MINIMUM_DIE_VALUE)

return false;


// Case 4:
// If rolling with advntage always succeeds, then roll with advantage.
if (dc - bonus_advantage <= MINIMUM_DIE_VALUE)

return true;


// Case 5:
// Since rolling with advantage and rolling without advantage are both
// possible-but-not-guaranteed, we compare their odds of success.
//
// This method checks if
// (DC - bonus_advantage - 1)^2
// is less than
// 20 * (DC - bonus_normal - 1)
// instead of the fraction to avoid floating-point values.

var leftHandSide = (dc - bonus_advantage - MINIMUM_DIE_VALUE);
leftHandSide *= leftHandSide;

var rightHandSide = (MAXIMUM_DIE_VALUE - MINIMUM_DIE_VALUE + 1) * (dc - bonus_normal - MINIMUM_DIE_VALUE);

var shouldRollWithAdvantage = leftHandSide < rightHandSide;

return shouldRollWithAdvantage;



private static bool TryValidateProgramConstants(
out string errorMessage
)

if (!(MINIMUM_DIE_VALUE < MAXIMUM_DIE_VALUE))

errorMessage = "Maximum die value must be greater than minimum die value.";
return false;


if (MINIMUM_DIE_VALUE < -1000)

errorMessage = "Unreasonably low minimum die value.";
return false;


if (MAXIMUM_DIE_VALUE > 1000)

errorMessage = "Unreasonably high maximum die value.";
return false;


errorMessage = default(string);
return true;


public static void Main()

string errorMessage;
if (TryValidateProgramConstants(out errorMessage))

RunExample();

else

Console.WriteLine("Error in program validation; aborting run.");

if (!string.IsNullOrWhiteSpace(errorMessage))

Console.WriteLine(errorMessage);










share|improve this answer











$endgroup$



tl;dr- Assuming neither roll is a sure thing, then advantage has better odds if$$
frac
left(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2 < 20
tag1
,.$$
Here's an online C# script to play with this. Details at the bottom of this answer.




Example



  1. You have to beat a $textDC = 10 .$



  2. You have two options:



    • Roll normally with a bonus of $+5 .$


    • Roll with advantage and a bonus of $+1 .$



  3. Plug this into $operatornameEq.left(1right)$ to find:$$
    fracleft(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2
    ~=~
    fracleft(10 - 1 - 1right)^210 - 5 - 1
    ~=~
    frac8^24
    ~=~16
    ~<~ 20
    ,.$$


  4. Since $16 < 20 ,$ this inequality is $textttTRUE ,$ and therefore rolling with advantage is better.



  5. By contrast, if the $textDC$ were $17$ instead of $10 ,$ then the inequality would've reduced to$$
    fracleft(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2
    ~=~
    fracleft(17 - 1 - 1right)^217 - 5 - 1
    ~=~
    frac15^211
    ~=~ sim 20.45
    ~<~ 20
    ,,$$



    and since $sim 20.45 < 20$ is $textttFALSE ,$ this means that the odds aren't better when rolling with advantage. So, in this case, it'd seem better to roll normally with $+5$ rather than with $+1$ and advantage.




Explanation



First:



  1. If either option is a sure-thing, just do it.


  2. If neither option has a chance, nothing you can do anyway.


So this leaves only the case in which both options have some non-certain possibility.



Then, the odds of failing to beat a DC on a single roll are
$$
P_textroll
~=~ 5 , left(left[textDCright] - left[textbonusright] - 1right) , %
,,
$$
and the odds of failing to beat a DC with advantage are$$
P_beginarrayctextroll with \[-10px] textadvantageendarray
~=~ P_textroll^2
~=~ left(5 , left(left[textDCright] - left[textbonusright] - 1right) , %right)^2
~=~ 0.25 , left(left[textDCright] - left[textbonusright] - 1right)^2 , %
,.$$



So, your odds of failure with advantage are lower when
$$
0.25 , left(left[textDCright] - left[textbonusright]_textadvantage - 1right)^2 , %
~<~
5 , left(left[textDCright] - left[textbonusright]_textnormal - 1right) , %
,,$$

or
$$
frac
left(left[textDCright] - left[textbonusright]_textadvantage - 1right)^2

left[textDCright] - left[textbonusright]_textnormal - 1

~<~
20
,.
$$



To make that a little more intuitive, let's write it as
$$
frac
left(textDC - textadvantage bonus - 1right)^2

textDC - textnormal bonus - 1

~<~
20
,.
$$




Notes



  1. The tl;dr advice recommends against rolling with advantage when the odds are the same either way. I chose this convention since it's less work. But, if someone likes to roll, then they might instead roll with advantage if
    $$
    frac
    left(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2 le 20
    ,.$$


  2. The above logic assumes that the d20-die is fair. If it's not, then I'd guess that rolling without advantage is a bit better than it would normally be because an unfair die would seem to have less variability between rolls. Since most dice probably aren't perfectly fair, a hardcore optimizer might prefer to roll without advantage when$$
    frac
    left(textDC - textadvantage bonus - 1right)^2textDC - textnormal bonus - 1 phantom^2 approx 20
    ,.$$


  3. The $`` 20 "$ in the inequality is no coincidence; it corresponds to the "20" in "d20". Likewise, the $`` 1 "$ corresponds to the minimum die value. So if another sort of die is used, this inequality can be generalized to$$
    frac
    left(textDC - textadvantage bonus - textmin die valueright)^2textDC - textnormal bonus - textmin die value phantom^2
    ~<~
    textmax die value - textmin die value + 1
    ,.$$


  4. The above derivation focused on the probability of failure, rather than the probability of success, because the math would've been a bit uglier for rolling with advantage if we focused on maximizing success (rather than minimizing error). However, if anyone does this same calculation for rolling with disadvantage, the math should be cleaner if you instead derive it by focusing on maximizing success. The reason for this is that advantage/disadvantage requires a second die roll only on failure/success of the first roll.



C# script to play with this



I was going to attach a JavaScript snippet here, but I guess that feature's not on this StackExchange. So, here's a C# script that can be run online.



Notes:




  1. To use it, call Report(dc, bonus_normal, bonus_advantage);, and it'll tell you which is better.




    • Currently, it's pre-loaded to call Report(10, 5, 1); and Report(17, 5, 1); to demonstrate the example given near the top of this answer. This should return:




      For DC = 10 Bonus (normal) = 5 Bonus (advantage) = 1:
      Your odds are better with the power of ADVANTAGE!

      For DC = 17 Bonus (normal) = 5 Bonus (advantage) = 1:
      Advantage is for losers; roll normally!




  2. By default, it uses a d20, with a minimum value of 1 and a maximum value of 20. Both of these values can be changed in the code.


  3. $operatornameEq.left(1right)$ (and its generalization, as used in this script) assume that, if the odds can't be improved by advantage, you prefer to roll normally (since it's less rolling).


  4. $operatornameEq.left(1right)$ assumes success and failure are both possible with both advantage and normal rolling. This script checks to ensure that that's true before using $operatornameEq.left(1right) .$


Source code (C#):



using System;

public class Program

// A typical d20 has a minimum value of 1 and a maximum of 20:
public const long MINIMUM_DIE_VALUE = 1;
public const long MAXIMUM_DIE_VALUE = 20;

public static void RunExample()

Report(
10
, 5
, 1
);

Report(
17
, 5
, 1
);


public static void Report(
long dc
, long bonus_normal
, long bonus_advantage
)

var stringMessage =
"FortDC = "
+ dc.ToString()
+ "tBonus (normal) = "
+ bonus_normal.ToString()
+ "tBonus (advantage) = "
+ bonus_advantage.ToString()
+ ":"
+ System.Environment.NewLine
;

if (ShouldRollWithAdvantage(
dc
, bonus_normal
, bonus_advantage
))

stringMessage += "Your odds are better with the power of ADVANTAGE!";
//Console.WriteLine("Your odds are better with the power of ADVANTAGE!");

else

stringMessage += "Advantage is for losers; roll normally!";
//Console.WriteLine("Advantage is for losers; roll normally!");


Console.WriteLine(stringMessage);
Console.WriteLine();


public static bool ShouldRollWithAdvantage(
long dc
, long bonus_normal
, long bonus_advantage
)

// Case 1:
// If rolling with advantage can't succeed, then just roll normally.
// Doesn't matter if rolling normally can't succeed, either, because if
// you're going to fail either way, may as well only roll once.
if (dc - bonus_advantage > MAXIMUM_DIE_VALUE)

return false;


// Case 2:
// If rolling without advantage can't succeed, then roll with advantage.
if (dc - bonus_normal > MAXIMUM_DIE_VALUE)

return true;


// Case 3:
// If rolling without advantage always succeeds, then roll without advantage.
if (dc - bonus_normal <= MINIMUM_DIE_VALUE)

return false;


// Case 4:
// If rolling with advntage always succeeds, then roll with advantage.
if (dc - bonus_advantage <= MINIMUM_DIE_VALUE)

return true;


// Case 5:
// Since rolling with advantage and rolling without advantage are both
// possible-but-not-guaranteed, we compare their odds of success.
//
// This method checks if
// (DC - bonus_advantage - 1)^2
// is less than
// 20 * (DC - bonus_normal - 1)
// instead of the fraction to avoid floating-point values.

var leftHandSide = (dc - bonus_advantage - MINIMUM_DIE_VALUE);
leftHandSide *= leftHandSide;

var rightHandSide = (MAXIMUM_DIE_VALUE - MINIMUM_DIE_VALUE + 1) * (dc - bonus_normal - MINIMUM_DIE_VALUE);

var shouldRollWithAdvantage = leftHandSide < rightHandSide;

return shouldRollWithAdvantage;



private static bool TryValidateProgramConstants(
out string errorMessage
)

if (!(MINIMUM_DIE_VALUE < MAXIMUM_DIE_VALUE))

errorMessage = "Maximum die value must be greater than minimum die value.";
return false;


if (MINIMUM_DIE_VALUE < -1000)

errorMessage = "Unreasonably low minimum die value.";
return false;


if (MAXIMUM_DIE_VALUE > 1000)

errorMessage = "Unreasonably high maximum die value.";
return false;


errorMessage = default(string);
return true;


public static void Main()

string errorMessage;
if (TryValidateProgramConstants(out errorMessage))

RunExample();

else

Console.WriteLine("Error in program validation; aborting run.");

if (!string.IsNullOrWhiteSpace(errorMessage))

Console.WriteLine(errorMessage);











share|improve this answer














share|improve this answer



share|improve this answer








edited May 10 at 21:05

























answered May 10 at 17:01









NatNat

3451412




3451412











  • $begingroup$
    @NautArch I'd intended to explain it in the"Explanation" section. Is that what you mean, or is there something else?
    $endgroup$
    – Nat
    May 10 at 18:01










  • $begingroup$
    @NautArch Ah, gotcha. I can add a shorter version that's lighter on the math at the start.
    $endgroup$
    – Nat
    May 10 at 18:04










  • $begingroup$
    @NautArch I expanded the tl;dr. Does that look about right?
    $endgroup$
    – Nat
    May 10 at 18:28











  • $begingroup$
    Let us continue this discussion in chat.
    $endgroup$
    – NautArch
    May 10 at 18:29
















  • $begingroup$
    @NautArch I'd intended to explain it in the"Explanation" section. Is that what you mean, or is there something else?
    $endgroup$
    – Nat
    May 10 at 18:01










  • $begingroup$
    @NautArch Ah, gotcha. I can add a shorter version that's lighter on the math at the start.
    $endgroup$
    – Nat
    May 10 at 18:04










  • $begingroup$
    @NautArch I expanded the tl;dr. Does that look about right?
    $endgroup$
    – Nat
    May 10 at 18:28











  • $begingroup$
    Let us continue this discussion in chat.
    $endgroup$
    – NautArch
    May 10 at 18:29















$begingroup$
@NautArch I'd intended to explain it in the"Explanation" section. Is that what you mean, or is there something else?
$endgroup$
– Nat
May 10 at 18:01




$begingroup$
@NautArch I'd intended to explain it in the"Explanation" section. Is that what you mean, or is there something else?
$endgroup$
– Nat
May 10 at 18:01












$begingroup$
@NautArch Ah, gotcha. I can add a shorter version that's lighter on the math at the start.
$endgroup$
– Nat
May 10 at 18:04




$begingroup$
@NautArch Ah, gotcha. I can add a shorter version that's lighter on the math at the start.
$endgroup$
– Nat
May 10 at 18:04












$begingroup$
@NautArch I expanded the tl;dr. Does that look about right?
$endgroup$
– Nat
May 10 at 18:28





$begingroup$
@NautArch I expanded the tl;dr. Does that look about right?
$endgroup$
– Nat
May 10 at 18:28













$begingroup$
Let us continue this discussion in chat.
$endgroup$
– NautArch
May 10 at 18:29




$begingroup$
Let us continue this discussion in chat.
$endgroup$
– NautArch
May 10 at 18:29

















draft saved

draft discarded
















































Thanks for contributing an answer to Role-playing Games Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2frpg.stackexchange.com%2fquestions%2f147710%2fhow-do-i-compare-the-result-of-1d20x-with-advantage-to-1d20y-without-adva%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company