Results 1 to 16 of 16
-
2017-11-16, 04:03 PM (ISO 8601)
- Join Date
- Dec 2010
- Location
- New York
- Gender
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?
-
2017-11-16, 04:09 PM (ISO 8601)
- Join Date
- Feb 2006
- Location
- NYC
- Gender
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).I want you to PEACH me as hard as you can.
-
2017-11-16, 04:12 PM (ISO 8601)
- Join Date
- Aug 2008
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
-
2017-11-16, 04:17 PM (ISO 8601)
- Join Date
- Apr 2016
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.
-
2017-11-16, 04:17 PM (ISO 8601)
- Join Date
- Dec 2010
- Location
- New York
- Gender
Re: Looking for math on advantage/disadvantage
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?
Oh, that's what I needed. Thank you.Last edited by Elric VIII; 2017-11-16 at 04:18 PM.
-
2017-11-17, 08:39 AM (ISO 8601)
- Join Date
- Apr 2017
Re: Looking for math on advantage/disadvantage
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 higherLast edited by HermanTheWize; 2017-11-17 at 09:04 AM.
-
2017-11-17, 09:45 AM (ISO 8601)
- Join Date
- Jul 2017
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 successLast edited by robbie374; 2017-11-17 at 09:49 AM.
-
2017-11-17, 10:43 AM (ISO 8601)
- Join Date
- Sep 2015
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 (disadvantagechance 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.
-
2017-11-17, 11:28 AM (ISO 8601)
- Join Date
- Dec 2010
- Location
- New York
- Gender
Re: Looking for math on advantage/disadvantage
Thank you very much everyone. I've got the info I need up and running.
-
2017-11-17, 02:48 PM (ISO 8601)
- Join Date
- Aug 2008
Re: Looking for math on advantage/disadvantage
-
2017-11-17, 03:02 PM (ISO 8601)
- Join Date
- Sep 2015
Re: Looking for math on advantage/disadvantage
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.
-
2017-11-18, 05:36 AM (ISO 8601)
- Join Date
- Aug 2008
-
2017-11-18, 10:20 AM (ISO 8601)
- Join Date
- Sep 2015
Re: Looking for math on advantage/disadvantage
/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 1Last edited by Tanarii; 2017-11-18 at 11:00 AM.
-
2017-11-18, 03:50 PM (ISO 8601)
- Join Date
- May 2015
- Location
- Texas
- Gender
Re: Looking for math on advantage/disadvantage
There are some nice figures here that illustrate the math discussed above.
Avatar by linklele. How Teleport Worksa. 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.
Second known member of the Greyview Appreciation Society
-
2017-11-18, 04:37 PM (ISO 8601)
- Join Date
- Sep 2015
- Location
- where South is East
Re: Looking for math on advantage/disadvantage
Trust but verify. There's usually a reason why I believe you can't do something.
-
2017-11-19, 02:02 AM (ISO 8601)
- Join Date
- Aug 2008