News:

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

Main Menu

Call for Probability Formulas

Started by Zak Arntson, November 07, 2001, 10:04:00 PM

Previous topic - Next topic

Zak Arntson

Okay, this was spurred by numerous questions (a few on here, tons on rpg.net) about dice probabilities.

Is there some way we can just collect a bunch of formulas and maybe some short essays on statistics? A central place for these kinds of things would be nice.

Especially if things were generalized.  Instead of saying:
roll <= 3 on 1d4 = 3:4 = 75%
roll <= 3 on 1d6 = 3:6 = 50%

It would rather look something like:
roll <= y on 1dn = y:n = y/n%

Of course, the more useful formulas would look like:
roll >= x on ydn, pick highest die.
roll >= x on ydn, pick average die.
ydn, pick highest >= zdn, pick highest.

Anyone up for working on this?  If nobody takes it up, I'll probably do it in January.

Don Lag

I'd have no problem in sharing whatever knowledge of mine in probabilities would come in handy to others. I'd suggest that people post what schemes they'd be interested in knowing more about, to see what to tackle first.
Sebastian Acuña

Zak Arntson

Okay, I've got one.  I've come up with a system where you compare two rolls.  There's always three dice rolled, but a person will either take the lowest, middle or highest die.

So basically I'd like formulas for:

Chances of 3dn pick low/mid/high > a target number.

Chances of 3dn pick low/mid/high > 3dn pick low/mid/high (so there's 6 combinations there, but you really only need to calculate three cases).

Of course, this could be generalized to xdn, where x is the number of dice to roll and n is the sides of dice.  But this would only be efficient for rpgs if you picked lowest or highest.  Picking the middle gets inordinately difficult above 3 dice.

Voila! Instant die pool formulas!

And, what the heck, I'll stick the results up (along with credits) up at Harlekin-Maus. Clinton, Ron, would the Forge be a good place for this instead?


_________________
Zak
http://mailto:zak@mimir.net">zak@mimir.net
http://zaknet.tripod.com/hmouse">Harlekin-Maus Games

[ This Message was edited by: Zak Arntson on 2001-11-08 11:40 ]

Mike Holmes

[...] a man who confines knowledge to formulae necessary for the solution of an algebraic or other perplexity, the same deserves to be shot with a Fusil or old-fashioned light musket.

Flann O'Brien --- At Swim-Two-Birds

A note on notation. In all formulae below, P is the probablility sought. The use of the carat "^" indicates raising the numbner on the left to the power of the number on the right.  The exclamation point "!" indicates factorial (multiplying a number by itself and each lower integer; thus 3! = 1x2x3 = 6). I will use more parentheses than are necessary in some cases to (hopefully) make things more clear. All results are diplayed as fractions. To get a percentage, do the division and multiply by 100 as usual.


First, remember that all probabilities of an event add to one. Or in other words there is a 100% chance that one of the set of all possibilities that can occur will. So for all the following formulae you can develop an additional formula which represents the chance of not getting the desired result by subtracting the result from one. To illustrate this we'll look at the simplest formula.

Chance of getting a particular number on a die.

P = 1/x

where:
x = sides on die

thus the chance of rolling a three on a six-sided die is 1/6.

Given the above, the chance that one does not get that particular number is:

P = 1 - (1/x)

where:
x = sides on die

thus the chance of rolling anything but a three is 5/6.

I mention this because quite often these negative figures are more important than the positive ones.


A standard question is often what the chance is of rolling the highest possibility (or lowest) on a number of dice. This is found simply by multiplying the probablilities of one such occurance on one die a number of times equal to the available dice, or:

P = (1/x)^n

Where:
x = number of sides on the dice
n = the number of dice

thus the (classic) chance of rolling three sixes on three six sided dice is 1/216.

The chance of rolling doubles or tripples, etc. This one is simple, but throws people occasionally.

P = (1/x)^(n-1)

x = number of sides on the dice
n = the number of dice

thus the chance to roll tripples on three six-sided dice is not 1/216 (which many assume) but only 1/36. This is because there are six different combinations of tripples available (or, if you like, the first die rolled does not matter, it only says what the second and third need to be).

Another mistake that people often make is to assume that the chance of not rolling a particular number on any of a certain number of dice rolled is equal to one minus the chance of rolling that number on all of the dice. So they mistakenly assume that if the chance to roll all three dice as sixes is 1/216 that the chance to roll no sixes is 215/216 or P = 1 - ((1/x)^n). This dissallows the chance that some part might be sixes. The actual chance of rolling a nuber of dice and NOT getting a certain result on ANY of them is.

P = (1 - (1/x))^n

x = number of sides on the dice
n = the number of dice

thus the chance of not rolling a six on three six sided dice is 125/216.

and the chance of rolling a six on one or more dice is 91/216.


The above formulae work for a multitude of situations. What they will not tell you, however is the chance of getting a particular number of sixes for example. More importantly, in target number systems you may need to know the chance of scoring a certain number of successes, success being rolling a certain target or higher.

Chance of a particular number of successes on a number of dice.

P = (n!/(x!(n-x)!))((1-((t-1)/d))^x)(((t-1)/d)^(n-x))

where:
x = successes
n = number of dice
t = target number
d = number of sides on dice

Thus, the chance to roll two successes on three six sided dice when the target number is five is 2/9.

So, therefore, the chance to roll a particular target number or higher (ususally what the player is interested in) is equal to the sum of all the chances to roll the target number and all the higher possibilities. I have no shortcut formula for this, I usually just work it out on a spreadsheet. OTOH, some math wizard may want to figure out the integral that I suspect would become necessary.

In the case above the chance to roll two or more (three, in this case) successes is 2/9 + 1/216 = 25/216.


These formulae will cover about 80% of your problems (did you know that 39.7% of all statistics are made up on the spot?). And for the other 20% they can often get you close.

If anyone spots any errors, please make sure to let us all know.

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

Zak Arntson

You rule, Mike.

Now if we can talk you into doing roll vs. roll probabilities.

(all dice have s sides, all rolls are pick highest value)
P1 of x dice > y dice
P2 of x dice = y dice
P3 of x dice < y dice

But since 1 = P1 + P2 + P3 -> P3 = 1 - P1 - P2, all we really need are P1 and P2.

Any takers?

Don Lag

Zak, do I understand your last question correctly?

You make two rolls: one with x dice and the other with y dice. Both are made with s-sided dice. You pick the highest from each roll and compare?

The system I'm finishing uses this mechanic, and if you ignore ties (roll-x == roll-y), then you basically have an x/(x+y) probability for x winning  and y/(x+y) prob for y winning.

This comes from the fact that it's the same as rolling x+y dice and guessing in which group the highest die will appear. Again, this ignores the case in which the highest die appears twice; once in each group. But since this special case is usually managed with any of different tie-rules it requiers a bit more thought. Examples: choose next-highest and so on, "defending" wins, largest group wins on ties, etc.

Personally I think this is an awesome mechanic :smile: I have a little more info posted here.

I hope this helps :smile:
Sebastian Acuña

Mike Holmes

This is, of course, the mechanic for Sorcerer. See Sorcerer for further well thought out use of the mechanic.

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

kwill

here's a few formulae lifted wholesale from http://hjem.get2net.dk/Klaudius/Dice.htm">http://hjem.get2net.dk/Klaudius/Dice.htm (which is actually a neat page about the properties of dice; number of sides, true dice and so on)

David®




Dice Probabilities

The following formulae can be used to find the probability of rolling a sum S using N dice of M faces. The formulae provide the number of permutations that give the desired result; to obtain the probability as an absolute number, divide by M^N.

In the formulae, {A:B} is the binomial coefficient A!/B!/(A-B)!, 0!=1, and SUM[i=0,j]( Xi ) is the sum of Xi for all values of i from 0 to j.

Number of permutations that give sum = S:
P(S,N,M) = SUM[i=0,j]( (-1)^i * {N:i} * {(S-i*M-1):(N-1)} )
Where j = Int((S-N)/M).

For large S the identity P(S) = P(Z), where Z = N*(M+1)-S, can be used to simplify the calculation.

Number of permutations that give sum =< T:
P(=Where j = Int((T-N)/M).

For large T the identity P(=
In some games you roll a pool of dice and have to count the number of dice that have a certain value or higher. For that and similar problems, the following formulae can be used to find the probability of various results. The notation is the same as above.

Number of permutations that have exactly I dice coming up with a value of exactly J:
P(I,J,N,M) = (M-1)^(N-I) * {N:I}

Number of permutations that have exactly I dice coming up with a value of J or higher:
P(I,>=J,N,M) = (J-1)^(N-I) * (M-J+1)^I * {N:I}

Number of permutations that have exactly I dice coming up with a value of J or less:
P(I,<=J,N,M) = (M-J)^(N-1) * J^I * {N:I}
d@vid