• The VOIDRUNNER'S CODEX is coming! Explore new worlds, fight oppressive empires, fend off fearsome aliens, and wield deadly psionics with this comprehensive boxed set expansion for 5E and A5E!

Calculating Probability Distributions

Elder-Basilisk

First Post
I know the general rule that threads with or about numbers go into the Rules Forum, but this is more about how to come up with the numbers than the numbers themselves and is thus more of a math/statistics post than a rules post. If the moderators think otherwise, I imagine it'll show up in Rule shortly.

So, here's the question: How does one calculate probabilities for die distributions. If I want the % of 3's and of 5's in a 3d6 roll, what would be the equation for coming up with that? Also--I think this is closely related--if I want to know the average of, say 4d6-10, how do I calculate that? I know it's not as simple as calculating the average and subtracting ten since a roll of 4-10 is zero rather than -6. My brother wrote a program to do brute force calculations but I'd like to use a simple and elegant formula that would come up with an exact answer rather than just depending upon my computer trying a few thousand different combinations of random numbers and figuring they're a representative sample.

Thanks.
 

log in or register to remove this ad

tarchon

First Post
There isn't really a single method for all cases, though there are a number of theorems that can be useful.
Generally, when you have a simple sum of independent random numbers (like a sum of die rolls), there's a very useful theorem which says that the probability mass function (PMF) of the sum is the convolution of the PMFs of the addends. This sounds complicated perhaps, but it's very simple to apply with dice, since they have uniform discrete distributions. You can do it manually, but it's well suited to computer code, and there are extremely efficient algorithms for it. Also, if you happen to know the characteristic function (CF) of the addend distributions, the CF of the total is just the CFs of the addends multiplied together.
Once you have the PMF of the distribution, it directly gives you the answer to "how likely is n?"
Things only get complicated if you do things like dropping the lowest die or rejecting characters with a score less than 5, or something like that. In those cases, you can sometimes come up with elegant expressions, but it often takes a lot of work and the expression is usually something that's prohibitively difficult to calculate without a computer. Therefore, unless you have some overwhelming need to have the formula written down, some combination of some elementary theorems like the one above and brute force is usually the easiest practical way to get there. Often even simple enumeration and testing of the cases takes a trivial amount of computer resources, and even when it takes too much memory or time to do that way, some very simple arguments can be used to reduce it to manageable levels.

In my experience with dice probabilities, I almost always recommend something very close to simple enumeration because, invariably, once you have the answer to one form of the problem, somebody changes it slightly, and it's a lot easier to change enumeration code that runs in 10 seconds than to spend 20 hours coming up with a new formula that takes a computer to run anyway.
 

Darren

First Post
Ditto tarchon.

If there were a single elegant formula, my probability and statistics textbook would be rather thinner... Using a computer to generate the numbers and crunch them isn't really that uncommon.

I'll give die distributions a quick shot though...
Each side on a d6 (properly weighted) has equally likely outcome - 1/6.
The number on the face of one die does not depend in any way on the number on another die. In probability terms, the outcomes are independent, meaning we can simply add and multiply outcomes of individual die rolls to find results for multiple die rolls. (If this were no so, the outcomes would be said to be dependent, and the math would get more complicated.)

So, how many ways to get a 3 on a 3d6?
Just one: 111
The probability to roll this is (1/6)*(1/6)*(1/6) = 1/216, or about 0.46%
This is also the probability of rolling any three given numbers.
So how many ways to get a 5 on a 3d6?
There are 6 ways:
113
131
311
122
212
221
The probability for any one of these is 1/216, but there are 6 outcomes that sum up to 5, so we can add the individual probabilities: The odds of rolling a five on a 3d6 is 6/216 or about 2.78%

Basically, I'm just counting up the number of outcomes that gives me the result I'm interested in, then dividing that by the total number of outcomes possible. With dice, you can usually draw a little table and figure out how things work, unless you have very many dice or are interested in many different outcomes. Then it may be simpler to have a computer crunch numbers, or take a sample to get a close estimate.

Averages are a bit simpler if no result goes below one. 2d6-1, for example. In this case it really is just the average of the die, then subtract 1. Each d6 has average of 3.5, so the average of 2d6 is 7, subtract 1 for 6. To get the average of 4d6-10, you would have to add up the outcome of each roll and divide by the number of all possible outcomes.
 





tarchon

First Post
Altamont Ravenard said:
So there isn't a way to calculate the probability of getting a total of x on 3d6 without going through all the possible outcomes?

The method I mentioned (PMF convolution) doesn't require going through all the possible outcomes.
For MdN, there's also a semi-reasonable combinatoric expression, though it's not something that you can just rattle off an answer with. A lot of web sites list it, but here's a link to one I can recall from a USENET D&D group:
http://groups.google.com/groups?hl=...52eeefb15&seekm=3tk1im$l2p@news.asu.edu#link1
 
Last edited:



Remove ads

Top