New OOTS products from CafePress
New OOTS t-shirts, ornaments, mugs, bags, and more
Results 1 to 16 of 16
  1. - Top - End - #1
    Ogre in the Playground
     
    EvilClericGuy

    Join Date
    Dec 2010
    Location
    New York
    Gender
    Male

    Default Looking for math on advantage/disadvantage

    It's been a while since I've delved into the statistics world and I cannot seem to find what I need on google as most of the sources are not online anymore. I'm looking for an equation to model the values in this table which gives me the probability of hitting a given AC when I need a target number or greater on a d20. The numbers here come up fairly often, so I assume they are accurate. I've tried to use some regression calculators online but I cannot seem to find an equation that can accurately model this distribution. Can someone point me in the right direction?

  2. - Top - End - #2
    Titan in the Playground
     
    Nifft's Avatar

    Join Date
    Feb 2006
    Location
    NYC
    Gender
    Male

    Default Re: Looking for math on advantage/disadvantage

    Regular: 1d20 >= N

    Advantage: max(1d20,1d20) >= N

    Disadvantage: min(1d20,1d20) >= N


    If you're looking for statistics, check for graphs of two independent variables, which I'm going to call X & Y below. The target number is N.

    Advantage is where (X >= N) or (Y >= N).

    Disadvantage is where (X >= N) and (Y >= N).

  3. - Top - End - #3
    Titan in the Playground
     
    Knaight's Avatar

    Join Date
    Aug 2008

    Default Re: Looking for math on advantage/disadvantage

    The equations are pretty simple probability math. Basically, think of it this way:

    Normal: You need to hit once. This is what generates the basic probability values used in later calculations. Let p be the chance of hitting, and q be a miss (q=1-p) for the normal case.

    Disadvantage: You need to hit twice. Using P as the specific probability under disadvantage: P=p^2

    Advantage: You need to not miss twice. Using P as the specific probability under advantage: P=1-q^2

  4. - Top - End - #4
    Bugbear in the Playground
    Join Date
    Apr 2016

    Default Re: Looking for math on advantage/disadvantage

    For advantage, It's easiest to approach the problem from the other angle. Your chance of rolling X or better on one of two dice is the inverse of your chances of rolling both dice < X. There are X - 1 ways or rolling less than X, so your chances of rolling < X on both are (X-1/20)**2. Therefore your chances of rolling X or better with advantage are 1 - (X-1/20)**2

    For disadvantage, you can look at the problem straight-up. Your chance of rolling X or better on one die is (21 - X)/20. On two dice, it's ((21-X)/20)**2.

  5. - Top - End - #5
    Ogre in the Playground
     
    EvilClericGuy

    Join Date
    Dec 2010
    Location
    New York
    Gender
    Male

    Default Re: Looking for math on advantage/disadvantage

    Quote Originally Posted by Nifft View Post
    Regular: 1d20 >= N

    Advantage: max(1d20,1d20) >= N

    Disadvantage: min(1d20,1d20) >= N


    If you're looking for statistics, check for graphs of two independent variables, which I'm going to call X & Y below. The target number is N.

    Advantage is where (X >= N) or (Y >= N).

    Disadvantage is where (X >= N) and (Y >= N).
    Maybe I'm not understanding, but there should be some sort of discreet equation to predict your chance of success. For example, using 1 die:
    X = target number
    Y = chance to roll target number or higher
    N = number of sides on the die


    Y = [N+1-X]/N

    So for a d20 needing to roll a 6 or higher you have a [20+1-6]/20 = 0.75 = 75% chance of rolling a 6 or higher. How can I modify that equation for rolling 2 dice and taking the best or worst of the roll?

    Quote Originally Posted by Knaight View Post
    The equations are pretty simple probability math. Basically, think of it this way:

    Normal: You need to hit once. This is what generates the basic probability values used in later calculations. Let p be the chance of hitting, and q be a miss (q=1-p) for the normal case.

    Disadvantage: You need to hit twice. Using P as the specific probability under disadvantage: P=p^2

    Advantage: You need to not miss twice. Using P as the specific probability under advantage: P=1-q^2
    Oh, that's what I needed. Thank you.
    Last edited by Elric VIII; 2017-11-16 at 04:18 PM.

  6. - Top - End - #6
    Dwarf in the Playground
    Join Date
    Apr 2017

    Default Re: Looking for math on advantage/disadvantage

    Quote Originally Posted by Elric VIII View Post
    Maybe I'm not understanding, but there should be some sort of discreet equation to predict your chance of success. For example, using 1 die:
    X = target number
    Y = chance to roll target number or higher
    N = number of sides on the die


    Y = [N+1-X]/N

    So for a d20 needing to roll a 6 or higher you have a [20+1-6]/20 = 0.75 = 75% chance of rolling a 6 or higher. How can I modify that equation for rolling 2 dice and taking the best or worst of the roll?
    Here's your equation, using your variables. For Advantage.

    Only Change I use P as my probability for a single dice and Y for two.

    P = [N+1-X]/N

    Y = [(P)^2 ] + 2P(1-P)



    Advantage

    Examples(20 sided dice):

    Y(20) = (1/20)^2 + 2(1/20)(19/20) = .0975 => 9.75% chance of rolling a 20

    Y(19) = (2/20)^2 + 2(2/20)(18/20) = .19 => 19% chance of rolling a 19 or higher

    .
    .
    .
    .

    Y(2) = (19/20)^2 + 2(19/20)(1/20) = .95 => 99.75% chance of rolling a 2 or higher

    Y(1) = (20/20)^2 + 2(20/20)(0/20) = 1 => 100% chance of rolling a 1 or higher










    Disadvantage is much easier(again Y will be the probability you hit your target number or higher):


    P = [N+1-X]/N

    Y = [(P)^2 ]

    Examples(20 sided dice):

    Y(20) = (1/20)^2 = .0025 => .25% chance of rolling a 20

    Y(19) = (2/20)^2 = .01 => 1% chance of rolling a 19 or higher

    .
    .
    .
    .

    Y(2) = (19/20)^2 = .9025 => 90.25% chance of rolling a 2 or higher

    Y(1) = (20/20)^2 = 1 => 100% chance of rolling a 1 or higher
    Last edited by HermanTheWize; 2017-11-17 at 09:04 AM.

  7. - Top - End - #7
    Dwarf in the Playground
     
    PaladinGuy

    Join Date
    Jul 2017

    Default Re: Looking for math on advantage/disadvantage

    Lots of great calculations here! Here is an easy way.

    Variables:
    21 = the number of sides on the d20 + 1 because a tie is a success.

    For attacks:
    AC of target
    Att = your attack bonus

    For saving throws:
    DC of effect
    ST = your saving throw bonus

    Calculations vs. Percentages:
    Multiplying by .05 is the same as 5%. To convert from a decimal to a percentage, multiply the number by 100. To convert from a percentage to a decimal, divide the number by 100.

    Normal:
    Chance of Attack Success (S) = (21 - AC + Att) * .05
    Chance of Saving Throw Success (S) = (21 - DC + ST) * .05

    Advantage:
    Chance of Success (SA) = S * (2 - S)

    Disadvantage:
    Chance of Success (SD) = S * S


    Chance of failure = 1 - Chance of success
    Last edited by robbie374; 2017-11-17 at 09:49 AM.

  8. - Top - End - #8
    Titan in the Playground
     
    Tanarii's Avatar

    Join Date
    Sep 2015

    Default Re: Looking for math on advantage/disadvantage

    The generic probability function (P) for exactly k successes in n attempts with p chance of success in a binomial distribution is:

    P = [n! / k! * (n-k)!] * p^k * (1-p)^(n-k)

    With values of k=0 and n=2 (disadvantage chance of failing with advantage) this works out to:

    P = (1-p)^2

    With values k=1 + k=2 and n=2 (advantage, probability of both one success and both successful):

    P = 2*p*(1-p) + p^2

    If you notice, this is breaking out the two parts of a simple binomial function. Specifically, the function P(total) = [(1-p)+p]^2 = 1

    p (lowercase) in this case is hit chance. Stick in other formulas in there involving AC and number on the die as you like.
    Last edited by Tanarii; 2017-11-17 at 10:49 AM.

  9. - Top - End - #9
    Ogre in the Playground
     
    EvilClericGuy

    Join Date
    Dec 2010
    Location
    New York
    Gender
    Male

    Default Re: Looking for math on advantage/disadvantage

    Thank you very much everyone. I've got the info I need up and running.

  10. - Top - End - #10
    Titan in the Playground
     
    Knaight's Avatar

    Join Date
    Aug 2008

    Default Re: Looking for math on advantage/disadvantage

    Quote Originally Posted by Tanarii View Post
    With values k=1 + k=2 and n=2 (advantage, probability of both one success and both successful):

    P = 2*p*(1-p) + p^2
    Expanding this out (as an indirect way to reach the 1- (k=0) value:
    1-(1-p)^2=1-(1-2p+p^2)
    1-((1-p)^2)=2p-p^2

    P = 2p(1-p)+p^2
    P=2p-2(p^2)+p^2
    P=2p-p^2

    From this we can clearly see that 1-(1-p)^2 is equivalent to 2p(1-p)+p^2, and it's a much quicker form to use.

  11. - Top - End - #11
    Titan in the Playground
     
    Tanarii's Avatar

    Join Date
    Sep 2015

    Default Re: Looking for math on advantage/disadvantage

    Quote Originally Posted by Knaight View Post
    From this we can clearly see that 1-(1-p)^2 is equivalent to 2p(1-p)+p^2, and it's a much quicker form to use.
    Agreed. That's usually the way I arrive at it. And it's even more important/quicker as n gets larger, and you're looking to determine 'any success'.

    For example, if Elven Accuracy or Lucky is in play, n goes to 3. So P=1 - (1-p)^3

    But the original equation becomes relevant again if you're looking at things like k or more ability scores of X or higher (with p chance to get an X or higher) among n=6 ability scores. Or even the chance of getting X or higher on 4d6b3.

    Honestly, I just stick it all in anydice.com ;)

    Edit: what I'm not sure how to do is disadvantage. Not even sure it'd use the same formula.
    Last edited by Tanarii; 2017-11-17 at 03:04 PM.

  12. - Top - End - #12
    Titan in the Playground
     
    Knaight's Avatar

    Join Date
    Aug 2008

    Default Re: Looking for math on advantage/disadvantage

    Quote Originally Posted by Tanarii View Post
    Honestly, I just stick it all in anydice.com ;)
    Likewise.

    Quote Originally Posted by Tanarii View Post
    Edit: what I'm not sure how to do is disadvantage. Not even sure it'd use the same formula.
    Disadvantage is really easy - you need to succeed on all the rolls, so it just works out to squaring the initial probability.

  13. - Top - End - #13
    Titan in the Playground
     
    Tanarii's Avatar

    Join Date
    Sep 2015

    Default Re: Looking for math on advantage/disadvantage

    Quote Originally Posted by Knaight View Post
    Disadvantage is really easy - you need to succeed on all the rolls, so it just works out to squaring the initial probability.
    /facepalm. of course.

    Okay so the fun one is Lucky with disadvantage done properly, ie not the SA way, vs done the SA way of rolling all three and picking the best one, ie turning disadvantage into super advantage. So roll two, take lowest, then roll one more and take highest, should be determine probability of disadvantage success first, then take multiply disadvantage failure by single roll failure and subtract from one.

    Lucky done right:
    pD = p^2
    P = 1-(1-pD)*(1-p) = 1-(1-p^2)*(1-p)
    P = p+p^2-p^3
    Plot 0 to 1

    Lucky done SA method:
    P = 1-(1-p)^3
    P = 3p-3p^2+p^3
    Plot 0 to 1

    Yup. As I thought immediately on reading that SA, those are two considerably different things. If you plot them, the first is close to a straight line, or lucky canceling out disadvantage. The latter is a super advantage curve.

    I understand they wanted simplicity but JC must also know enough instinctive probability without crunching numbers to have had that be immediately obvious to him too. At least my id hope he does.

    Edit: going back and looking at the SA I'm writing about, even his complex method is totally off base. It's lucky first, then disadvantage. /sigh

    Edit2:
    Okay the SA Lucky first then disadvantage is close to a straight line too. It's just much worse odds than disadvantage first.
    P = (2p-p^2)]*p
    Plot from 0 to 1
    Last edited by Tanarii; 2017-11-18 at 11:00 AM.

  14. - Top - End - #14
    Titan in the Playground
     
    KorvinStarmast's Avatar

    Join Date
    May 2015
    Location
    Texas
    Gender
    Male

    Default Re: Looking for math on advantage/disadvantage

    There are some nice figures here that illustrate the math discussed above.
    Avatar by linklele. How Teleport Works
    a. Malifice (paraphrased):
    Rulings are not 'House Rules.' Rulings are a DM doing what DMs are supposed to do.
    b. greenstone (paraphrased):
    Agency means that they {players} control their character's actions; you control the world's reactions to the character's actions.
    Gosh, 2D8HP, you are so very correct!
    Second known member of the Greyview Appreciation Society

  15. - Top - End - #15
    Ogre in the Playground
     
    HalflingRangerGuy

    Join Date
    Sep 2015
    Location
    where South is East

    Default Re: Looking for math on advantage/disadvantage

    Quote Originally Posted by Knaight View Post
    Disadvantage is really easy - you need to succeed on all the rolls, so it just works out to squaring the initial probability.
    Yep, just like disadvantage fails when both fails, you square the failure.
    It's only the (1 - p) to convert between success/failure that makes it look hard.
    Trust but verify. There's usually a reason why I believe you can't do something.

  16. - Top - End - #16
    Titan in the Playground
     
    Knaight's Avatar

    Join Date
    Aug 2008

    Default Re: Looking for math on advantage/disadvantage

    Quote Originally Posted by bid View Post
    Yep, just like disadvantage fails when both fails, you square the failure.
    It's only the (1 - p) to convert between success/failure that makes it look hard.
    Advantage, and there's slightly more to it - it's 1-(1-p)2, not just (1-p)2. It's all really straightforward math, and it stays straightforward given more dice unless you start taking dice in the middle of the order.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •