PDA

View Full Version : How do you calculate the odds of contested checks?



diplomancer
2021-12-31, 06:40 AM
As the title says. I can see pretty well how to calculate the odds of advantage or disadvantage. But contested checks stump me. If you know the modifier difference between the two contestants, is there an easy way to calculate success?

EggKookoo
2021-12-31, 07:08 AM
I think it's as simple as a 5% difference for every point difference in the modifiers, with a 50% base. So, if creature A is +1 and creature B is +2, there's a 45% chance A will win or a 55% chance B will win. Each +1 for B adds 5%.

Edit: Oh, are you asking about contested checks when one has advantage or disadvantage? Yeah, that's more complex.

If one side is a straight roll, you can calculate it as a DC equal to 10 + mod, then work out the adv/disadv roll like it was against that DC. If both have advantage, maybe calculate a DC as 10 + mod + 5 (-5 if it has disadvantage) and go from there with the other roll?

stoutstien
2021-12-31, 07:14 AM
As the title says. I can see pretty well how to calculate the odds of advantage or disadvantage. But contested checks stump me. If you know the modifier difference between the two contestants, is there an easy way to calculate success?

Not a huge difference if you are looking at large numbers with dd20 is on both sides washing out to a nice even average so you can cancel them out. That's why when it comes to ability challenges the modifier(s) are more important than the dice roll.

GeoffWatson
2021-12-31, 07:19 AM
Your probability of winning an opposed check can be calculated as follows, assuming the defender wins ties.

D = (your bonus) - (opponent's bonus).

%victory = 0.475 + (41D-D^2)/800.

Or:

D Win% Tie% Lose%

+0 47.5 5 47.5
+1 52.5 4.75 42.75
+2 57.25 4.5 38.25
+3 61.75 4.25 34
+4 66 4 30
+5 70 3.75 26.25
+6 73.75 3.5 22.75
+7 77.25 3.25 19.5
+8 80.5 3 16.5
+9 83.5 2.75 13.75
+10 86.25 2.5 11.25
+11 88.75 2.25 9
+12 91 2 7
+13 93 1.75 5.25
+14 94.75 1.5 3.75
+15 96.25 1.25 2.5
+16 97.5 1 1.5
+17 98.5 0.75 0.75
+18 99.25 0.5 0.25
+19 99.75 0.25 0
+20 100 0 0

Chronos
2021-12-31, 07:46 AM
GeoffWatson has it correct, assuming that you have the higher modifier (so D is never negative). To see this, imagine a 20x20 grid, for every possible die roll for both of you. The scenarios where your opponent wins form a triangular region in one corner (where they roll high and/or you roll low).

Of course, it gets more complicated with advantage and/or disadvantage. Then, you have not 400 but 8000 possible sets of rolls (or 160,000 if both sides have 'vantage). I don't have a full formula here, but I can tell you a couple of facts:

With equal modifiers and ignoring ties, a player with advantage has approximately a 2/3 chance of winning (because one of the three dice will be the highest, and it can be any of the three). This cannot be exact, since 8000 is not a multiple of 3: That comes from the "ignoring ties" bit.

Player A having advantage (and B rolling normally) is equivalent to player B having disadvantage (and A rolling normally). This one is exact and can be proven. However, A having double-advantage (Elven Accuracy) and B rolling normally is not the same as A having regular advantage and B having disadvantage.

Eldariel
2021-12-31, 08:02 AM
One easy way of counting the lower modifier's chance of victory: SUM(n) from 1 to n where n = (D-numeric advantage) [so for instance, if you have +2 advantage, take n = 17 or 18 depending on tiebreaker used; 17 if tie wins for higher modifier or you need to handle even cases separately, 18 if lower mod wins on tie] or success divided by D^2. D is die size. This gives you the chance that the side at disadvantage wins.

So for instance, if you have +1 advantage on d20 and higher modifier wins on tie, you lose SUM(1:18)/20^2 = 171/400 = 42,75% and thus win 100%-42,75% = 57,25%. Of those 19/400 = 4,75% are ties for 52,5% chance of strictly higher result.

Note, it's unwise to use this directly for the results of the side with advantage (rather count those as the complementary events of losing) since then you'd need to bound the SUM to max die size and remove the lowest number, which is a bit more complex (at +20 it simply looks like 20x20/20^2 = 100%). Also don't forget to account for possible autosuccess or fail (though those are rare on opposed checks by RAW). I find this quicker than the posted method, however, particularly if doing it by hand or in head (you'll learn the sums 1-20 quite quickly this way).

MoiMagnus
2021-12-31, 10:06 AM
Here is the approximate correspondence between a contested checks where the difference between the bonuses is D, and a regular check of bonus B against DC 11:

If D is between -5 and 5, B = D. In other words, there is almost no practical difference in success rate between a contested check and a regular check.

If D = 5 + N, then B = 5 + N/2. In other words, passed 5, every additional point of difference is only worth half as much. Symmetrically, if D = -5 - N, then B = -5 - N/2 meaning that passed -5, every additional point of difference is only worth half as much.

[Note: this approximation is not mathematically exact, I've taken some liberties with the actual numbers to have something easy to remember]

bid
2021-12-31, 11:35 AM
Player A having advantage (and B rolling normally) is equivalent to player B having disadvantage (and A rolling normally). This one is exact and can be proven.
Yep. I had to swap the 3rd dice around to see it.

14 vs 13-20. (advantage win)
14-20 vs 13. (disadvantage win)

8 vs 7-1. (advantage lost)
8-1 vs 7. (disadvantage lost)

Flipping the dice flips the result, nice symmetry.
{20+1 = 21 = 14+7 = 13+8}

PhantomSoul
2021-12-31, 11:40 AM
Player A having advantage (and B rolling normally) is equivalent to player B having disadvantage (and A rolling normally). This one is exact and can be proven. However, A having double-advantage (Elven Accuracy) and B rolling normally is not the same as A having regular advantage and B having disadvantage.

The visualisation might be especially striking. For anydice, this is the graph of results (https://anydice.com/program/260af) using these options:

output [highest 1 of 2d20]-1d20
output 1d20-[lowest 1 of 2d20]

For quick checks where you don't want to do the math, using anydice is a nice option.

OldTrees1
2021-12-31, 02:39 PM
The "[bonus 0]" calls the function "bonus" and returns the bonus in "result: __"(currently 0). I did that to quickly iterate through many bonuses. Change "result: 0" to the bonus the tiebreaker has. Then check "1" (aka "true") to see the chance the tiebreaker wins. If there is no tie breaker change ">=0" to "> 0" instead.


function: bonus NN:n { result: 0 }
output 1d20 - 1d20 + [bonus 0] >= 0 named "norm norm"
output 1d20 - [highest 1 of 2d20] + [bonus 0] >= 0 named "norm adv"
output [lowest 1 of 2d20] - 1d20 + [bonus 0] >= 0 named "dis norm"
output 1d20 - [lowest 1 of 2d20] + [bonus 0] >= 0 named "norm dis"
output [highest 1 of 2d20] - 1d20 + [bonus 0] >= 0 named "adv norm"
output [highest 1 of 2d20] - [highest 1 of 2d20] + [bonus 0] >= 0 named "adv adv"
output [lowest 1 of 2d20] - [lowest 1 of 2d20] + [bonus 0] >= 0 named "dis dis"
output [highest 1 of 2d20] - [lowest 1 of 2d20] + [bonus 0] >= 0 named "adv dis"
output [lowest 1 of 2d20] - [highest 1 of 2d20] + [bonus 0] >= 0 named "dis adv"


Equivalent comparisons. These surprised me but I checked.
Advantage vs Normal: See Normal vs Disadvantage
Disadvantage vs Normal: See Normal vs Advantage
Disadvantage vs Disadvantage: See Advantage vs Advantage



Bonus
Norm vs Norm
Norm vs Adv
Norm vs Disadv
Adv vs Adv
Adv vs Disadv
Disadv vs Adv

-5 30.0015.5044.50 24.9764.036.03
-4 34.0018.7049.30 29.6768.947.73
-3 38.2522.3154.19 34.8473.549.79
-2 42.7526.3659.14 40.5177.7712.22
-1 47.5030.8864.13 46.6781.5815.08
0 52.5035.8869.13 53.3384.9218.42
1 57.2540.8673.64 59.4987.7822.23
2 61.7545.8177.69 65.1690.2126.46
3 66.0050.7081.30 70.3492.2731.06
4 70.0055.5084.50 75.0393.9735.97
5 73.7560.1987.31 79.2495.3841.13



Since I assumed a tiebreaker, there is an invisible line at bonus = -1/2. If you reverse the bonus across the invisible line and reverse the column you will get the other person's win rate. Advantage with +4 and Tiebreaker vs Disadvantage would be: (Adv with +4 vs Dis with Tiebreaker) + (Dis with -5 vs Adv with Tiebreaker) = 93.97% + 6.03% = 100%. If there is no tie breaker then subtract 1 from the bonus and flip across the -1 line instead of the -1/2 line. Advantage with +4 without Tiebreaker vs Disadvantage would be: (Adv with +3 vs Dis with Tiebreaker) + (Dis with -5 vs Adv with Tiebreaker) + Tie = 92.27% + 6.03% + Tie = 100%. Tie = 100% - 98.3% = 1.7%.

Chronos
2022-01-01, 08:49 AM
Eldariel, that's a solid analysis, except for your unfortunate use of the word "advantage" to mean "higher modifier". Given that "advantage" already means something else, that could be confusing.