The Forge Archives

Inactive Forums => The Riddle of Steel => Topic started by: ShaneNINE on August 19, 2002, 02:45:17 PM

Title: Math Help
Post by: ShaneNINE on August 19, 2002, 02:45:17 PM
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.
Title: Math Help
Post by: Mike Holmes on August 19, 2002, 03:56:46 PM
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
Title: Math Help
Post by: Mike Holmes on August 19, 2002, 04:17:02 PM
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
Title: Math Help
Post by: ShaneNINE on August 19, 2002, 04:48:17 PM
Thanks!
Title: Math Help
Post by: ShaneNINE on August 19, 2002, 07:08:27 PM
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?
Title: Math Help
Post by: Jaif on August 19, 2002, 07:32:19 PM
Try:

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


-Jeff
Title: Math Help
Post by: ShaneNINE on August 19, 2002, 08:53:52 PM
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.
Title: Math Help
Post by: Durgil on August 22, 2002, 03:55:17 PM
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.
Title: Math Help
Post by: Lance D. Allen on August 22, 2002, 05:15:12 PM
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::
Title: Math Help
Post by: Jaif on August 26, 2002, 12:38:15 PM
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
Title: Math Help
Post by: Durgil on August 26, 2002, 02:04:42 PM
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!
Title: Math Help
Post by: Mike Holmes on August 26, 2002, 02:07:38 PM
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
Title: Math Help
Post by: Mike Holmes on August 26, 2002, 02:11:14 PM
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?]
Title: Math Help
Post by: ShaneNINE on August 26, 2002, 02:58:39 PM
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?
Title: Math Help
Post by: Mike Holmes on August 26, 2002, 03:21:57 PM
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
Title: Math Help
Post by: Jaif on August 26, 2002, 03:38:32 PM
Quotebut what is meant by C(D N)?

The -C-ombination of D events taken N at a time.

Let's say you want to figure out the probability that you get 2 successes (exactly).  Step 1 is to figure out the odds of the first & second die both being successes, and the remainder failures.  Step 2 is realizing that the chance of the first and second die being successes is the same as the 3rd and 4th, the 2nd and 5th, or any other combination of 2 dice out of the 5.  Then you find the number of combinations, and multiply the probability by that number.

In a math text book, the "(D N)" part would be vertical, but I lack the skills to make that happen in the messages. :-)

Now, a mistake I found.  I switched the "t-1" and "11-t" parts, so the forumula should be:

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

Again, I think.  I made an elementary spreadsheet to check this out, and the numbers are looking good, but this is a stab at something I did ages ago, so please check.

-Jeff
Title: Math Help
Post by: Mike Holmes on August 26, 2002, 03:46:25 PM
Hey, Shane, as you can see from the math in Jeff's post (and my own stupidity), it gets a bit complicated. Why are you interested, exactly? Is it just curiosity, or do you have some practical application that you are trying to apply? If the latter, if you let us know what it was about, we might be better able to help you with whaterver it is.

Mike
Title: Math Help
Post by: Mike Holmes on August 26, 2002, 04:02:44 PM
Quote from: Jaif
Quotebut what is meant by C(D N)?

Ah, I get it now. What I was missing, and probably Durgil as well is that you were doing the entire operation for C(D N) and substituting.

C(5 0) = 5!(0!(5-0)!) = 1

C(5 1) = 5!(1!(5-1)!) = 5

The full equation with numbers sunbstituted for variables would be:

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

which evaluates exactly as he has it. Once again, Jeff's right on it.

Mike
Title: Math Help
Post by: ShaneNINE on August 26, 2002, 04:45:08 PM
Quote from: Mike HolmesHey, Shane, as you can see from the math in Jeff's post (and my own stupidity), it gets a bit complicated. Why are you interested, exactly? Is it just curiosity, or do you have some practical application that you are trying to apply? If the latter, if you let us know what it was about, we might be better able to help you with whaterver it is.

1. Simple curiosity. I've always gotten into the probability and statistics and such of every RPG I've ever owned. Sort of a side hobby. TROS (with Exalted) is my first die-pool game and the mechanics are alien to me. I just want to get a handle on the probability and the math behind it.

2. I want to plug a formula into Excel where I can change the TN, the number of dice, and the number of required successes and see what the base percent chance of getting the required successes is.
Title: Math Help
Post by: Durgil on August 26, 2002, 04:45:42 PM
Check out what I found on Excel a little earlier today:
=BINOMDIST(N,D,(11-T/10),FALSE)
Now, if I wanted to find the chance of getting at least 3 successes with a TN of 6 and throwing 5 dice, I would add up the chances of 0, 1, and 2 successes, as found by the above formula, and subtract that from 1?

1-BINOMDIST(0,5,(11-6)/10,FALSE)-BINOMDIST(1,5,(11-6)/10,FALSE)-BINOMDIST(2,5,(11-6)/10,FALSE) = 0.5
Title: Math Help
Post by: Durgil on August 26, 2002, 04:57:09 PM
Quote from: Mike HolmesHey, Shane, as you can see from the math in Jeff's post (and my own stupidity), it gets a bit complicated. Why are you interested, exactly? Is it just curiosity, or do you have some practical application that you are trying to apply? If the latter, if you let us know what it was about, we might be better able to help you with whaterver it is.

Mike
Knowing exactly how the math works behind the game makes it much easier to create House Rules for things that the author didn't include, possibly change an already present rule to better fit your own tastes or campaign, or just improve your ability to Game Master by properly awarding bonuses or penalties during play without throwing off the balance of the game.

For example, is it better to change the number of dice or change the target number?  By knowing how the chance for successes and blunders changes by changing those numbers, you will become a better GM IMHO.
Title: Math Help
Post by: Mike Holmes on August 26, 2002, 05:54:49 PM
Good point Tony.

There is another, pretty obvious technique that you can use when you don't know the math off the top of your head, and you have a spreadsheet. I call it the brute force method. Simply use the RAND function (with ROUNDUP or RANDBETWEEN if you have it) an have the machine count the dice that come up this way or that (using other stat functions like Countif, etc). Can be easier in the short run for coming up with approximations on such things as house rules. Just do a few thousand iterations, and you'll get the idea of where a rule is headed quickly.

Mike
Title: Math Help
Post by: Durgil on August 27, 2002, 08:12:34 AM
Quote from: Mike Holmes...use the RAND function (with ROUNDUP or RANDBETWEEN if you have it) an have the machine count the dice that come up this way or that (using other stat functions like Countif, etc). Can be easier in the short run for coming up with approximations on such things as house rules. Just do a few thousand iterations, and you'll get the idea of where a rule is headed quickly.
That's an excellant idea!  I've never thought about doing that before, Thanks.
Title: Math Help
Post by: Durgil on September 03, 2002, 01:10:40 PM
Hi all, if anyone is interested, I've created an Excel Workbook that computes the odds, on one page, of getting a specific number of successes, and, on the second page, finds the probability of getting at least a certain number of successes or more.  This is done for pools of ten-sided dice from 1 to 20 and for target numbers up to 20, and also shows the odds of rolling a botch or fumble.  The sheets are protected so that only the target number may be changed, but I didn't use a password to protect them with so if you want to change anything, go right ahead.  If anyone's interested, then just send me a short email to the address below, and I'll attach the workbook to the reply.
Title: math and multiple d10
Post by: Thirsty Viking on September 06, 2002, 06:57:16 PM
As i understand it,  you want the average number of succes given a #d and a TN?

ok first use the earlier formulas  for

x = the % chance of sucess on 1 die

x =  (11-tn) /10     when    tn < 11
or    (21-tn)/100    when    10 < tn < 21
or    (31-tn/1000   when    20 < tn < 31  For the ALWAYS A CHANCE people

y = # of dice rolled

x * y =  Average number of success at TN for y dice

if you put these into a spread sheet,   you will then have the comparative effects of changing either the TN or the # of  dice.  in terms of the AVERAGE # success per role

hope this answers what you were looking for.
send me your email,  and i'll send you my works spread sheet for this.


                                  TN
d10 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0
1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1
2.0 1.8 1.6 1.4 1.2 1.0 0.8 0.6 0.4 0.2
3.0 2.7 2.4 2.1 1.8 1.5 1.2 0.9 0.6 0.3
4.0 3.6 3.2 2.8 2.4 2.0 1.6 1.2 0.8 0.4
5.0 4.5 4.0 3.5 3.0 2.5 2.0 1.5 1.0 0.5
6.0 5.4 4.8 4.2 3.6 3.0 2.4 1.8 1.2 0.6
7.0 6.3 5.6 4.9 4.2 3.5 2.8 2.1 1.4 0.7
8.0 7.2 6.4 5.6 4.8 4.0 3.2 2.4 1.6 0.8
9.0 8.1 7.2 6.3 5.4 4.5 3.6 2.7 1.8 0.9
10.0 9.0 8.0 7.0 6.0 5.0 4.0 3.0 2.0 1.0


A warning,  players will expect a little consistency,   make decisions on trends,  not current situation....   lie about opponents die roles  not how a situation is handled  when the story demands it.