Math / Probability Help

wilrich

First Post
I think it's about time we had one of our semi-regular threads about probability, so here goes . . .

I need some assistance from our math experts, please. Is there a formula for establishing the probability of suceeding at an oppossed d20 roll if you know the bonus of each person rolling? For example, if PC A attempts to sneak past NPC B and PC A has a move silently bonus of +10 and NPC B has a listen bonus of +5, I'm assumming that there is a (relatively) simple formula whereby one could determine the likelihood of A's success -- I just don't know enough about math to know and/or devise it. If it affects the formula, assume that all ties indicate failure.

Thanks in advance for your help!
 

log in or register to remove this ad



I could probably give a formula if I dug through the archives of the RPG Create group on Yahoo, but here's how I think through situations like that.

The person with the better skill has a certain chance of, in effect, automatically succeeding (he rolls so high, and/or the other person rolls so low, that it's impossible for the less skilled person to win the opposed roll). Figure that out. The person with the better skill will succeed that much of the time, plus exactly half of the rest of the time, give or take a bit depending on your tiebreaking conventions.

In your example, character A automatically succeeds if he rolls a 16 or better (25% chance) or character B rolls a 5 or worse (25% chance). In this sort of probability situation, where you have two independant events, you can't just add up the percentages, because then you'll be double-counting the cases where both events happen[1]; there's another step where you subtract those cases. So the probability that at least one of these two events will happen is .25 + .25 - (.25x.25) = .4375, or 43.75%.

There are only fifteen possible tied results (A rolls 1 and B rolls 6, A rolls 2 and B rolls 7, and so on up to A rolls 15 and B rolls 20), all of which go to B by your stated assumption. 15 divided by 400 (the total number of possible results) is .0375, or 3.75%.

A will succeed in exactly half of the remaining cases, which covers the remaining 52.5% of the time.

So A succeeds (43.75 + 52.5/2 =) exactly 70% of the time, while B succeeds the other (3.75 + 52.5/2 =) 30% of the time.


[1] Lots of people resist this part when they first learn probability, which is silly; to ignore this is to say that when rolling 4d6, you have a 133% chance of getting at least one 1 or 2, which a) doesn't even make sense, and b) if it's taken to mean you'll always get at least one, is observably not true.
 


Where X is A's bonus and Y is B's bonus the formula is as follows.

Let Z be the absolute value of X-Y if A wins ties.

Let Z be the absolute value of X-Y-1 if A looses ties.

The chance of the character with the higher bonus (or the character that wins ties if the bonuses are the same) succeeding is as follows

(20-Z)*(21-Z)/8 %
 

Centaur said:
Here is a small excel spreadsheet which should make things easier for anyone interested

Bloody Typical - I see the problem, open up Excel and construct an almost exact copy of your spreadsheet and then find you've already posted it... :mad: ;)
 



Note: The original poster says, that ties indicate failure (which I read as meaning B succeeds on a tie). This is wrong! In D&D 3.5 the one with the higher bonus wins a tie, and if this bonus is also tied, then the roll is repeated. The following is how it actually works in D&D.

A simple, but slightly tedious (still doable in such simple examples and you do not need a formula), way to find out the probability is to just add up all probabilities for B to beat a particular roll (from 1 to 20 on the d20) from A and then divide the sum by 20 to get the average.

That would be:

20: 0% (result is 30, B can at most achieve a 25)
19: 0%
18: 0%
17: 0%
16: 0%
15: 0% (since A wins ties with the higher bonus)
14: 5% (result is 24, B needs to roll a 20 to beat it)
13: 10% (result is 23, B needs to roll a 19-20 to beat it)
...
2: 65% (result is 12, B needs to roll a 8-20 to beat it)
1: 70% (result is 11, B needs to roll a 7-20 to beat it)

So, we have to add up 14 numbers with a 5% increment.

We can use the n*(n+1)/2 formula (which gets us the sum of all natural numbers from 1 to n) to do so quicker, adding together the numbers 1 through 14 and then multiply by the increment (5%), but simply adding them all together works the same.

14*15/2=105 *5%=525% total.

Now divide by 20 to get the average.

525% / 20 = 26.25% on average.

So there's a 26.25% chance that B beats A, or a 73.75% (=100%-26.25%) chance, that A succeeds.


As for a general formula, we only need to put in variables instead of the constants there.

Since the higher bonus always wins on a tie in D&D (unlike what was written in the original post), we only need to look at Z=X-Y (as in a post above), the difference between the higher bonus (X ~ A's bonus in the example) and the lower bonus (Y ~ B's bonus in the example). This only works for a difference greater than 0, that is, when one bonus is actually higher than the other (the case of a tied bonus is covered later).

n (from the n*(n+1)/2 formula) is 19-Z then, because the one with the lower bonus needs to roll 2 (!) higher to beat the one with the higher bonus at least (with the smallest difference of only 1 between the bonuses), again, because the higher bonus wins ties.

Mixing these into the above and juggling it all together, we come to the following:

100% - [(19-Z)*(19-Z+1)/2 *5% /20] ; Z=X-Y; X>Y.

Or more condensed:

100% - [(19-Z)*(20-Z)/8]% ; Z=X-Y; X>Y.

This is the chance for the one with the higher bonus to succeed (if one bonus is higher, that is).


In the special case, that the bonuses are equal, the above formula doesn't work properly, because you need to figure in the re-roll when the two rolls are tied and the re-re-roll and re-re-re-roll and so on, if you continue to roll a tie).

However, it's simple enough to figure out that probability without any formulas, as it is exactly 50%, obviously.

Bye
Thanee
 
Last edited:

Remove ads

Top