News:

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

Main Menu

Math formula to determine probabilities of this mechanic?

Started by LizardLips, November 11, 2003, 04:40:14 AM

Previous topic - Next topic

LizardLips

I have no head for numbers. I want to build a table of probabilities. Along one axis would be a row of target numbers (1 to 20), along the other would be skill numbers (1 to 6). Here's how the mechanic works. You roll 1d6. If you roll under your skill you keep your roll. If you roll over your skill you get a 0. If you roll your skill exactly the die exploes (you roll the die again and add that number to the previous roll).

Eero Tuovinen

Let's let the mathematician take care of this! No handydandy program on my home machine, but perhaps old-style math will solve this...

The key is that for skill level n the probability of rolling under it is (n-1)/6, probability for rolling over is (6-n)/6 and the probability of rolling the same number is always 1/6. Let's see what we get with the first throw, assuming no explosions.

Skill:     Result:
           0    1    2    3    4     5    6
1          .83  -     -    -    -     -     -
2          .66  .17   -    -    -     -     -
3          .50  .17   .17  -    -     -     -
4          .33  .17   .17  .17  -     -     -
5          .17  .17   .17  .17  .17   -     -
6          .00  .17   .17  .17  .17   .17   -


To get the probability of at least any level of success just add the columns from that level onward. Let's see how this changes when we factor in the explosions: The probability of an explosion is always 1/6 and combined probabilities come from the classical theory with some adding and multiplication. The probability of getting a 3 with skill of 2 would, for example, come from multiplying the probability of getting two (1/6) on the first throw with the likelyhood of getting one on the second (1/6).

Skill:     Result:
           0    1    2    3    4     5     6     7     8     9     10    11    12
1          .83  .14   .02  .00  .00   .00   .00   .00   .00   .00   .00   .00   .00
2          .66  .17   .11  .03  .02   .00   .00   .00   .00   .00   .00   .00   .00
3          .50  .17   .17  .08  .03   .03   .01   .00   .00   .00   .00   .00   .00
4          .33  .17   .17  .17  .06   .03   .03   .03   .01   .00   .00   .00   .00
5          .17  .17   .17  .17  .17   .03   .03   .03   .03   .03   .00   .00   .00
6          .00  .17   .17  .17  .17   .17   .00   .03   .03   .03   .03   .03   .00


As you see, I've only computed within one percent of accuracy. Actually where there's a '.00' marked there is some chance of success still. On every line the first .00 is actually a .0046, for example (except line six, where the probability of getting a result of 6 or 12 is of course zero). Not very useful for roleplaying, though.

The probability of getting at least the named result can of course be gained by adding the appropriate line from right to left, stopping at the desired result. Thus, the probability of getting at least three with skill of six is .17*3+5*.03=.66.

Assuming I've not made any mistakes in this (always possible; mathematicians get notoriously worse in basic math when they progress in the ars magna), I'd say using this with the 1-20 spread you intimated might take some work.
Blogging at Game Design is about Structure.
Publishing Zombie Cinema and Solar System at Arkenstone Publishing.

LizardLips

Thanks Eero, that's a big help. Unforunatly I'm still having problems. I was hoping I could extrapolate the rest of the calculations from your help so I didnt have to bug anyone else on the forum, but I'm still stumped by the following problem:

I want to use this mechanic in a dice pool. After rolling dice and taking care of "explosions" the final result of each die would be added together into a final number.

Example. Skill 3 and rolling 3d6. They come up 5, 3, and 2. The 3 explodes and comes up a 1 for a total of 4. 4+2 (ignoring the 5 since it was over the skill of 3) = 6.

Any idea on how to calculate those odds? I figure the dice pools will run between 2 and 5 dice.

-John

Eero Tuovinen

QuoteI want to use this mechanic in a dice pool. After rolling dice and taking care of "explosions" the final result of each die would be added together into a final number.

Well, Lips, this shouldn't be too hard, it's just quite tedious. We need a third axis in the matrix for these, so you'll need five tables like the previous one, one for each amount of dice. First one is the one-die case we already discussed:

Skill:     Result:                  [one-die pool]
           0    1    2    3    4     5     6     7     8     9     10    11    12
1          .83  .14   .02  .00  .00   .00   .00   .00   .00   .00   .00   .00   .00
2          .66  .17   .11  .03  .02   .00   .00   .00   .00   .00   .00   .00   .00
3          .50  .17   .17  .08  .03   .03   .01   .00   .00   .00   .00   .00   .00
4          .33  .17   .17  .17  .06   .03   .03   .03   .01   .00   .00   .00   .00
5          .17  .17   .17  .17  .17   .03   .03   .03   .03   .03   .00   .00   .00
6          .00  .17   .17  .17  .17   .17   .00   .03   .03   .03   .03   .03   .00


but the rest have to be calculated with combinatorics, resulting in a quite tedious calculation. I'll try to show you how it's done with the two-die case, and we'll see if you can do it yourself, OK?

The basic principle here is that the probability of getting the result x with skill n and die-pool m is calculated as follows: First, list all combinations of the m die values that, when summed, result in x. So for x=5 and m=2 this would be 0+5, 1+4, 2+3, [the same combinations backwards]. Now, the probability we want is the sum of the probabilities of all these results. This should make sense, of course the overall probability is the sum of the probabilities of all the cases that belong to the wanted result. Now, to calculate the probability for getting exactly 0+5 or 1+4 or whatever, we do the following: check the probability for getting the first number on a single die from the above table with skill n, and multiply that with the probability for the second number, and continue for all the dice in the combination. So, for combination 1+4 we multiply the probability of getting one with the probability of getting 4 (from skill level n). For a three die combination 1+3+2 we'd multiply three numbers, all from the above table.

Now, I present the easiest case, the two-die table. It's easiest because there's the smallest amount of basic calculations here, but the principle is the same: sum of the probabilities of all the die results resulting in the target number, which probabilities are calculated by multiplying from the above table. Try your hand at solving for example the probability of getting a result x=2 with skill n=3 and two dice. If you manage to get to a resulting probability of p=.20, you probably calculated correctly. After getting the hang of it by crossreferencing this table, try calculating the probabilities for three dice. Thus we save my work by your sweat. The table below is axis-switched because the results go much higher than in the one-die case.

Result:     Skill:                  [two-die pool]
           0    1    2    3    4     5     6
0          .00  .69   .44  .25  .11   .03   .00
1          .00  .23   .22  .17  .11   .06   .00
2          .00  .05   .17  .20  .14   .09   .03
3          .00  .01   .08  .14  .17   .12   .06
4          .00  .00   .05  .09  .13   .14   .09
5          .00  .00   .01  .07  .10   .13   .12
6          .00  .00   .00  .04  .08   .11   .14
7          .00  .00   .00  .02  .06   .09   .12
8          .00  .00   .00  .01  .04   .07   .10
9          .00  .00   .00  .00  .03   .05   .08
10         .00  .00   .00  .00  .02   .04   .06
11         .00  .00   .00  .00  .01   .03   .04
12         .00  .00   .00  .00  .00   .02   .05
13         .00  .00   .00  .00  .00   .01   .04
14         .00  .00   .00  .00  .00   .00   .03
15         .00  .00   .00  .00  .00   .00   .02
16         .00  .00   .00  .00  .00   .00   .01
17         .00  .00   .00  .00  .00   .00   .00


There is many methods to simplify the calculations (and the easiest is to use a computer), but try your hand at it with the simple method at first. You'll soon notice that there is a number of symmetries in the system that can be exploited to shorten the number-crunching. One simple discovery is that in the two-die case, for example, almost all die-combinations are duplicates, with for example 1+4 and 4+1 having the exact same probability, which of course needs to be calculated only once. The general result for this goes over the needs of this course, but keep it in mind.
Blogging at Game Design is about Structure.
Publishing Zombie Cinema and Solar System at Arkenstone Publishing.

HMT

I feel compelled to point out that this mechanic gives the same results as the one where 1s explode instead of skill value exploding. I point this out because fixing the number that explodes would likely make reading rolls easier in practice.

Eero Tuovinen

Quote from: HMTI feel compelled to point out that this mechanic gives the same results as the one where 1s explode instead of skill value exploding. I point this out because fixing the number that explodes would likely make reading rolls easier in practice.

I'll have to disagree, fully knowing how fuzzy my math can occasionally be. For an example, consider skill of three and target number of one: when the skill number explodes my table there gives a probability of (1/6)=.17, as the result can only happen when the die comes up as one. On the other hand, if one were to explode, the probability of getting one would be (1/6)*(3/6), as you'd have to throw first the one and then fail to throw 1, 2 or 3. Likewise most of the other probabilites would be affected.

I agree about the mechanic feeling a little clumsy, though.

Anyway, to elucidate about what I wrote earlier about this kind of computation: when solving the tables for bigger die-pools, it helps enormously to use the formerly made tables as an aid. For example, the probabilities for three dice can be gained with multiplicating and adding an element from both one-die and two-die cases, without need for operating with three elements from the one-die table. Likewise, the four-die case can be calculated from either the first and third or the second table alone. I don't know if this was left clear by my earlier explanation.
Blogging at Game Design is about Structure.
Publishing Zombie Cinema and Solar System at Arkenstone Publishing.

HMT

Oops, you are correct. Sorry. [My method produces the same expectation with a lower standard deviation.]

Mike Holmes

Sounds somewhat similar to Silhouette.

Often with pools its better to look at expected values, rather than odds, and certainly simpler. Just multiply the odds of one die times the number of dice.

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