- Gnome Stew - http://www.gnomestew.com -

Encounters with Poissons and Exponentials

Posted By Matthew J. Neagley On June 19, 2012 @ 1:21 am In Tools for GMs | 9 Comments

The other day, Martin posed a question to me. To paraphrase: “How do I set up a die roll to determine how many encounters I have per day and when those encounters occur?” After some discussion, I suggested the below system, which is based on the Exponential distribution. Since we’ve gotten requests for info on this distribution before and the result turned out pretty neat, I wanted to share.

The exponential distribution isn’t a concept that exists in a vacuum. Instead it’s a function of the Poisson distribution, which is itself a function of the Binomial distribution, which is a function of the Bernoulli distribution. Here’s the rundown:

  • A Bernoulli trial is set up like a coin flip.  You can have either Success or Fail and p is the constant probability of success. Most basic die rolls against a DC are Bernoulli trials. The Probability we achieve x successes in a Bernoulli trial is px*(1-p)(1-x) where 0<p<1 and x=0 or 1.
  • A Binomial distribution is simply a set number of Bernoulli trials. You have n trials, each with p probability of being a success, and you can find the probability of achieving x successes with: (n!/(x!*(n-x)!))*px*(1-p)(n-x), where 0<p<1, n is the number of trials and 0<x<n
  • A Poisson distribution is a binomial distribution, but n is getting closer and closer to infinity, and p is getting closer and closer to 1/infinity. Thus we have an infinite number of nearly zero probability chances to get a success.  That’s why most queues (like how many people are standing in line at the store) have a poison distribution.  The chance of a person entering the queue at any given second are very small, but the number of chances are very large. The average number of successes of a Poisson distribution is commonly noted as λ. The probability that a Poisson distribution achieves x successes is given as: (λ)x * 1/x! * e-x, where λ=any number and 0<x<∞. (P.S.: if you want to approximate an ugly Binomial with a Poisson because the math is easier, just use n*p for λ, but the approximation is only so-so unless n is large and p is small.)
  • An Exponential distribution is the distribution of the amount of time between getting two successes in a Poisson Distribution. (These time periods are called Sojourn Times). It also relies on the parameter λ. The probability that the wait time before the next occurrence in a Poisson process is x is given as: λe-λx. The probability that the wait time before the next occurrence is less than or equal to x is instead 1-e-λx.

Thus, given that we know λ, our desired average number of encounters per day, if we make the reasonable assumption that our encounters follow a Poisson distribution, then the time, also in days, until our next encounter follows an exponential distribution. That makes determining exactly when the next encounter happens a fairly simple matter (with some spreadsheet help) and because the exponential distribution formula is based on the parameter λ, the average number of encounters per day will be spot on in the long term while retaining a minute chance of running into three encounters in an hour or none in a month.

To translate our formula into a die roll, we’ll need to use a table. In addition, because there are an infinite number of values the time until our next encounter could take, we have to use ranges of values instead of exact time values.  To do this, we’d select the die we want to work with and our average number of encounters per day, and plug them into our probability formula for the exponential distribution, then solve for time. Here’s an example:

We want to use a d10. Each number on a d10 is 10%, a proportion of .1, and we want an average number of encounters per day of 1/6th. Thus our formula is .1 = 1-e-(1/6)x. Solving for x, we get –6*ln(.9) = x ~ .6 of a day, or 15 hours. This means that there is a 1 in 10 chance that our next encounter happens within 15 hours.  Using this setup, we get results, but the average is too high because we’re breaking up the possible outcomes into chunks and using the greatest result from each. To get a result with a better average, we can adjust the proportions by –.04 each. This gives the following results:

Roll 1 2 3 4 5 6 7 8 9 10
Time 9h 1d 1h 1d 19h 2d 16h 3d 17h 4d 22h 6d 11h 8d 14h 11d 19h 19d 8h

This process works for other average encounter numbers, and the adjustment stays the same as long as you use a d10 (d20 uses a –.02 adjustment instead.) Here are results for a variety of average encounters per day:

Ave. \ Roll 1 2 3 4 5 6 7 8 9 10
1/8 12h 1d 9h 2d 10h 3d 14h 4d 22h 6d 14h 8d 15h 11d 10h 15d 17h 27d 18h
1/6 9h 1d 1h 1d 19h 2d 16h 3d 17h 4d 22h 6d 11h 8d 14h 11d 19h 19d 8h
1/4 6h 17h 1d 5h 1d 19h 2d 11h 3d 7h 4d 8h 5d 17h 7d 21h 12d 21h
1/2 3h 8h 14h 21h 1d 6h 1d 15h 2d 4h 2d 21h 3d 22h 6d 11h
1 1h 4h 7h 11h 15h 20h 1d 2h 1d 10h 1d 23h 3d 5h
1 1/2 1h 3h 5h 7h 10h 13h 17h 23h 1d 7h 2d 4h
3 0h 1h 2h 4h 5h 7h 9h 11h 16h 1d 2h
5 0h 1h 1h 2h 3h 4h 5h 7h 9h 15h

The same process also works on other scales (such as a 10 min scale for use in high threat zones like dungeons) as long as you keep the average encounters and time in the same units.  Here are some examples using the 10 min scale:

Ave. \ Roll 1 2 3 4 5 6 7 8 9 10
1/8 5m 14m 24m 36m 49m 1h 6m 1h 26m 1h 54m 2h 37m 4h 18m
1/6 4m 10m 18m 27m 37m 49m 1h 5m 1h 26m 1h 58m 3h 13m
1/4 2m 7m 12m 18m 25m 33m 43m 57m 1h 19m 2h 9m
1/2 1m 3m 6m 9m 12m 16m 22m 29m 39m 1h 4m

With a table like these (feel free to grab and use these if you like) you can roll on the line for the average number of encounters that matches the area your players are currently exploring, and shift up or down rows to adjust for player behavior that may make encounters more or less likely. This allows for a great variety in encounter timings, with minimal rolling that actually matches real world statistics, which as we all know, is one of the most important requirements for a fantasy game Winking smile.

About  Matthew J. Neagley

First introduced to RPGs through the DnD Red Box Set in 1990, Matt fights on ongoing battle with GMing ADD, leaving his to-do list littered with the broken wrecks of half-formed campaigns, worlds, characters, settings, and home-brewed systems. Luckily, his wife is also a GM, providing him with time on both sides of the screen.




9 Comments (Open | Close)

9 Comments To "Encounters with Poissons and Exponentials"

#1 Comment By Trace On June 19, 2012 @ 10:37 am

I’m in favor of this method: Would it be fun to have an encounter? Yes, let’s have an encounter (or “No, let’s not have an encounter”).

#2 Comment By Necrognomicon On June 19, 2012 @ 7:33 pm

These articles on probability are interesting, but implementing this doesn’t really solve the problem, at least for me.

If I’m using random encounters in my game, I’m probably already consulting (and rolling on) a table to see what the party encounters, so this just adds another table to find/tape to my GM screen/etc. Generally I prefer something that’s simple to adjudicate on the fly.

Here’s the solution I came up with, though I imagine it’s been thought of before. It’s still one roll, but with two dice:

1d12 & 1d20 Method

The d12 indicates hours. (It can also be 5 min increments of an hour if necessary.)

The d20 is the percentage probability in 5% increments. Odd on the d20 indicates the d12 value is AM, even indicates PM.

Note: Obviously in this system 5% increments will skew towards being AM, most noticeably in lower percentage chances. (A 5% chance for a random encounter, would have a 100% chance of being AM for instance.) If you don’t like what side of the meridian it’s on, simply change it. It’s your game.

#3 Comment By Martin Ralya On June 19, 2012 @ 10:25 pm

I dig it. This is the kind of stuff I love tinkering with, and you make it understandable to me.

#4 Comment By Redcrow On June 20, 2012 @ 2:00 am

I only skimmed through the math bits because that looks way more complex than I care for when I GM. I prefer to just wing it when it comes to random encounters. If the characters are in an environment that seems likely to have more random encounters then I just throw more random stuff at them and time it out based on what ‘feels’ right.

I do the same thing with changing weather and most other randomized stuff.

The only difference my players would notice is if I stopped to roll and consult a chart which I don’t like doing too much because it tends to break my GM rhythm.

#5 Comment By Riklurt On June 20, 2012 @ 5:34 am

On a theoretical level, I love this table. It’s very beautifully designed! Now, I probably wouldn’t use it myself (most of my games have random encounters that are very rarely combats, so frequency has little impact) but I applaud the effort – nice work.

#6 Comment By Matthew J. Neagley On June 20, 2012 @ 6:06 am

Thanks everyone for weighing in.

I kind of felt as I was writing this that there was little chance of someone sitting down and producing one of these tables, hence the “too much math” tag and the fully-created tables. I figured this was much more useful as a “Here are some tables you can grab for your game. P.S. here’s how I got them.” than a “Here. Do this math for yourself.” Not that I feel there’s anyone here who couldn’t do the math, just that it’s not always a practical effort vs return thing to MAKE these tables unless you find it fun in the first place or are planning to use it as a long-term solution.

@Necrognomicon – You could replace your d12 with a d10 and use these tables, but that is an additional table. Or you could look into the Dtotal by gamescience http://www.gamescience.com/newproducts or any other 24 sided die.

#7 Comment By Norcross On June 20, 2012 @ 9:17 am

Even better – just roll your “d10000000″ and look for every digit that matches your probability. If there is a 10% chance every 3 hours roll every 21 hours. If your dice come up 6314716, then the first encounter occurs after 9 hours and there is another after 18 hours. If the chance is 1/6, use d6 instead of d10. This is simpler than doing the math and gives a perfectly accurate result instead of approximating.

#8 Comment By Matthew J. Neagley On June 20, 2012 @ 10:06 am

@Norcross – That’s certainly a clever technique, but I wouldn’t describe it as a perfectly accurate result versus an approximation. It is a perfectly accurate binomial, but a binomial isn’t the distribution we’re looking for. That doesn’t make your approach bad, but it does make it an approximation.

#9 Pingback By Ravenous Role Playing » Blog Archive » Friday Five: 2012-06-22 On June 22, 2012 @ 8:00 pm

[...] Encounters with Poissons and Exponentials [...]


Article printed from Gnome Stew: http://www.gnomestew.com

URL to article: http://www.gnomestew.com/tools-for-gms/encounters-with-poissons-and-exponentials/

All articles copyright by their individual authors. All rights reserved.