News:

Forum changes: Editing of posts has been turned off until further notice.

Main Menu

Math Help

Started by ShaneNINE, August 19, 2002, 07:45:17 PM

Previous topic - Next topic

ShaneNINE

I need some help figuring out how changing the number of dice in a die pool, or changing the TN, affects the % chance of success. In other words, I need a formula wherein I can change the number of dice and/or the TN and get a percent chance of getting at least 1 success. Many thanks in advance.
::: Shane

Mike Holmes

P = 1 - ( ( (11 - TN) / 10) ^ D)

Where probability P, the chance of getting at least on success, is calculated from the target number TN, and the number of dice rolled D.

Mike
Member of Indie Netgaming
-Get your indie game fix online.

Mike Holmes

This does not work with TNs over ten, obviously. The ( (11 - TN) / 10 ) is the chance of failure on any single die. To calculate this for a TN over ten, substitute:

(.1 * (21 - TN)/10)

BTW, for those not used to programing language notation, the "^" means "raised to the power of".

Mike
Member of Indie Netgaming
-Get your indie game fix online.

ShaneNINE

::: Shane

ShaneNINE

I get some whacked results with that first formula. The numbers on the left are the TN and the numbers accross the top are the # of dice.


       1       2       3       4       5       6       7       8       9       10
3       20.0%   36.0%   48.8%   59.0%   67.2%   73.8%   79.0%   83.2%   86.6%   89.3%
4       30.0%   51.0%   65.7%   76.0%   83.2%   88.2%   91.8%   94.2%   96.0%   97.2%
5       40.0%   64.0%   78.4%   87.0%   92.2%   95.3%   97.2%   98.3%   99.0%   99.4%
6       50.0%   75.0%   87.5%   93.8%   96.9%   98.4%   99.2%   99.6%   99.8%   99.9%
7       60.0%   84.0%   93.6%   97.4%   99.0%   99.6%   99.8%   99.9%   100.0%  100.0%
8       70.0%   91.0%   97.3%   99.2%   99.8%   99.9%   100.0%  100.0%  100.0%  100.0%
9       80.0%   96.0%   99.2%   99.8%   100.0%  100.0%  100.0%  100.0%  100.0%  100.0%
10      90.0%   99.0%   99.9%   100.0%  100.0%  100.0%  100.0%  100.0%  100.0%  100.0%


I'm assuming this is the chance of failure because 1 die at TN 3 is 20%. But the chance of failure goes up the more dice you add to the die pool. 10 dice at TN 3 is 89.3%. ?! Can you fix it?
::: Shane

Jaif

Try:

100*(1-((TN-1)/10)^Dice)


-Jeff

ShaneNINE

Jeff, that worked:


       1       2       3       4       5       6       7       8       9       10
3       80.0%   96.0%   99.2%   99.8%   100.0%  100.0%  100.0%  100.0%  100.0%  100.0%
4       70.0%   91.0%   97.3%   99.2%   99.8%   99.9%   100.0%  100.0%  100.0%  100.0%
5       60.0%   84.0%   93.6%   97.4%   99.0%   99.6%   99.8%   99.9%   100.0%  100.0%
6       50.0%   75.0%   87.5%   93.8%   96.9%   98.4%   99.2%   99.6%   99.8%   99.9%
7       40.0%   64.0%   78.4%   87.0%   92.2%   95.3%   97.2%   98.3%   99.0%   99.4%
8       30.0%   51.0%   65.7%   76.0%   83.2%   88.2%   91.8%   94.2%   96.0%   97.2%
9       20.0%   36.0%   48.8%   59.0%   67.2%   73.8%   79.0%   83.2%   86.6%   89.3%
10      10.0%   19.0%   27.1%   34.4%   41.0%   46.9%   52.2%   57.0%   61.3%   65.1%


Now, how about the probability of getting X amount of successes instead of just one. Example: what's the chance of getting 5 successes at TN 7 with 8 dice?

Thanks a bunch.
::: Shane

Durgil

Quote from: ShaneNINENow, how about the probability of getting X amount of successes instead of just one. Example: what's the chance of getting 5 successes at TN 7 with 8 dice?

Thanks a bunch.
Doesn't anyone know the math behind this?  This is the basic dynamics of one, if not the most important facits of the game.  I understand all of the math up to this point and how to figure TN's of 12 and higher (11's have the same chance as 10) or rolling 2 8's or higher with 2 dice, but how does increasing the number of dice increase the odds of getting 2 8's?  I took statistics in college, but I don't remember problems similar to these.
Tony Hamilton

Horror has a face... and you must make a friend of horror.  Horror and moral terror are your friends.  If they are not then they are enemies to be feared.  They are truly enemies.

Lance D. Allen

QuoteI took statistics in college, but I don't remember problems similar to these.

My guess is because they never expected hard mathematical principles to be applied to roleplaying games. ::tongue-ever-so-firmly-in-cheek::
~Lance Allen
Wolves Den Publishing
Eternally Incipient Publisher of Mage Blade, ReCoil and Rats in the Walls

Jaif

In the words of the prophets, this is complicated crap. :-) I'll take a stab at it, but I won't swear to it in a court of law.

First thing we have to do is review combinations.  Ignore the probabilities for a second: if you want 2 successes out of 5 dice, there are 5!/(2!(5-2)!) ways to do this, or 10 different ways.  In other words, the first and second die could be successes, the first and third, the first and fourth, and so on...

C(D N) = D!/(N!(D-N)!)

Where D is dice, N is the number of successes, and !=factorial, e.g. 5!=5*4*3*2*1, and 0!=1.

Ok, now the probability of getting exactly N success out of D dice at a given T (target number) =

C(D N) * ((T-1)/10)^N * ((11-T)/10)^(D-N)

So, if you want to know the probability of getting 2 or more successes on 5 dice with a target number of 6, just add up getting 0 successes and 1 success, and subtract from 1.  In other words:

1
- C(5 0) * ((5)/10)^0 * ((5)/10)^5   -----  0 successes
- C(5 1) * ((5)/10)^1 * ((5)/10)^4   -----  1 success

or

1
- 1 * 1 * .5^5 (=.03125)
- 5 * .5 * .5^4 (=.15625)

= .8125, or roughly 81%

Again, I won't swear to this.  I'm not a mathmatician (nor a speller, either), I'm not terribly careful, and this was all a long time ago (yes, it was in your college prob&stat class).

-Jeff

Durgil

Quote from: JaifC(D N) = D!/(N!(D-N)!)

C(D N) * ((T-1)/10)^N * ((11-T)/10)^(D-N)

1
- C(5 0) * ((5)/10)^0 * ((5)/10)^5   -----  0 successes
- C(5 1) * ((5)/10)^1 * ((5)/10)^4   -----  1 success

or

1
- 1 * 1 * .5^5 (=.03125)
- 5 * .5 * .5^4 (=.15625)

= .8125, or roughly 81%
Please forgive me if this is too obvious (it really has been a long time since I took math at this level), but what is meant by C(D N)?  I know that D is the number of dice thrown and N is the number of successes that you're looking for, but I don't see "C" anywhere.  Also, (D N) is not equal to (D*N) because in the example you have 0 successes with 5 dice and that expression you use equals 1 (i.e. C(5 0)=1), so what does it mean?.  Thanks Jaif for all of your help.  It must have taken up quite a bit of your time to look this stuff up!
Tony Hamilton

Horror has a face... and you must make a friend of horror.  Horror and moral terror are your friends.  If they are not then they are enemies to be feared.  They are truly enemies.

Mike Holmes

Sorry to take so long getting back.

The above chart is correct; my formula was right. It shows the chance of getting at least one success on the number of dice shown with the target number given. Which is what you asked for. The "1-" part is what changes it from the chance of failure to the chance of at least one sucess.

OTOH, Jaif has the probability looking for the number of successes correct.

That and other formulae can be found at:

http://www.indie-rpgs.com/forum/viewtopic.php?t=875

(Though I think one of Don's formulae is wrong)

Mike
Member of Indie Netgaming
-Get your indie game fix online.

Mike Holmes

Quote from: Durgil[what is meant by C(D N)?  I know that D is the number of dice thrown and N is the number of successes that you're looking for, but I don't see "C" anywhere.  Also, (D N) is not equal to (D*N) because in the example you have 0 successes with 5 dice and that expression you use equals 1 (i.e. C(5 0)=1), so what does it mean?.  


C(D N) is math language for "The function that determines probability (Chance?) C given A certain D and N. In othe words that side of the equation is the answer you're looking for. Just calculate the right side, and you'll be fine.

Mike

[Edited to note that, given this standard notation, it makes Jeff's calcualtions look funny. Jeff, can you check them again?]
Member of Indie Netgaming
-Get your indie game fix online.

ShaneNINE

Quote from: Mike HolmesSorry to take so long getting back.

No problem!

QuoteThe above chart is correct; my formula was right. It shows the chance of getting at least one success on the number of dice shown with the target number given.

That can't be right. It gives 20% chance of getting TN 3 with 1 die where it should be 80%. But it gives 80% chance of getting TN 9 with 1 die where it should be 20%. And the chances of success increase the higher the TN. That's the part I thought was messed up. Am I looking at it wrong?
::: Shane

Mike Holmes

Apollogies. For some reason I was thinking that you had to roll under the TN. Musta been high (or thiniking of some other game). Jaif's got it right.

Mike
Member of Indie Netgaming
-Get your indie game fix online.