News:

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

Main Menu

Inverse dice probability?

Started by geminidomino, December 14, 2004, 02:00:30 PM

Previous topic - Next topic

geminidomino

(I hope this is the right forum to post this question in. Pardon my newness.)

There are countless tools out there now that you can plug in an XdY+Z formula and it'll give you a probability table or (in some of the fancier ones) graph. Is there anything that works the other way, or is it even possible to do so?

For example, lets say my goal was "A result of 1-100, with a linear distribution?" Is there any way of figuring out mathmatically that a d100 will fill that need perfectly?

That's probably a bad (and definitely an overly simplified) example. What I actually want is "A score between 10-90, with a standard distribution(bell curve)."  So far I've worked out that I pretty much want an additive combination of dice (since multiplication tends, near as I can figure it, towards a linear distribution), but I have no idea where to go from there, other than trial and error (the closest I have come is 4d20+1d10, but that gives me 5-90)

So is there a mathmatic way to figure this out?

Akamaru

Well...

If you limit yourself to dice, there aren't really that many alternatives on how to achieve this with a bell curve that has it's peak probability in the center. Infact I think there is no way to achieve a 10-90 with a center bellcurve peak with standard dice (unless you want to do alot of adding and subtracting, which you don't, right?). The only solution I came up with is 10d9.

Just out of interest, why does the range have to be 10-90? Something like 5-100 (5d20) would a alot easier. Also, what kind of bell curve are you aiming for? A really sharp increase in the center or a more flat response? Somehow I feel that a math program won't help you much out with this kindof a problem. If the answer is so hard you need serious mathematical power to get it, you'll prolly need additional math power just to play your game.

-A

geminidomino

Actually, I'm shooting for a simpler system. :) It's developing the system that's the problem.  The goals I'm going for is that, rather than some arbitrary scale for attributes (D&D's 3-18, WW's 1-10, etc...), I want ability scores to represent a percentile of the population as a whole. Even the racial bonuses/penalties are balanced to keep this ratio.  It's going to be combined with a skill system, so that someone with a 75% agility and no "fencing" skill has at least a chance against someone with a 30% agility and high practice in fencing.

I might be able to adjust the boundaries a bit (20-80, e.g.) but I know that I definitely do NOT want PCs to have scores in the extreme ends. I can work with an add/subtract modifier if neccesary (4d20+10 gave me 14-90, 4d20+1d10 gave me 5-90). I'm more concerned with finding a way to do it mathmatically (if there is one) in case I have to do this kind of calculation again.

Akamaru

Ah, well in that case I'd go for something like 10d8 (10-80) but every number that turns up twice or thrice in a roll counts as 5 extra points or something similar. That way you could in theory get 10-XX (whatever you wish) by just adjusting the amount and the way you get these extra points.

I always find it more player-friendly to use simple little "bonusrules" like this than having to remember to always add a modifier etc. Rolling dice is way more exciting when you have these little extras.

geminidomino

Not a bad idea. It could get clunky if done too often, but the only time I plan to use this is during Char creation (checks will be made with basic percentiles)

I just have to work out how much that will skew the statistics now...

Though 10d8 clear might work... that gives a minimum roll-under chance of success of 10% and failure of 20%... I wonder if that's too harsh to players...

Heh, now I have to work out success/failures as well as keeping the statistics fairly even. ;)

geminidomino

Ok, I'm liking the kind of results I'm getting from 10d6 (10% minimum success, 90% maximum) but thats without using skills...

hrmm... wow, this is complex work. I'm so much better at developing settings. ;)

Eero Tuovinen

There's some math ways, but for the most part they're not standardized methods, rather very bulky tools for resolving much more complex issues. You're better off doing it by experimentation and experience, especially as there's no guarantee that there is a combination of dice that would be usable, even if it passed muster; I'll demonstrate:

The ultimate way is to approximate standard distribution through a chart. This is the general way to get any distribution you want - just roll d100 or whatever and plug in a chart that approximates your wanted distribution. There was a thread a while back about this:
http://www.indie-rpgs.com/viewtopic.php?t=12583

If the above is too bulky for you (which essentially means that you value usability more than exactness), we'll need some more information - by standard distribution you mean normal distribution, but do you care about the mean and variance? In any case, there's all kinds of solutions that approximate what you want:
- just roll 10d10: that'll get you a mean of 65 and a range of 10-100. Reroll results from 91 up (or preferably think of some use for them). This is simple, but even more bulky than the chart approach (the adding takes time).
- roll 50+4d10-4d10: that'll get you a mean of 50 and a range of 14-86. For more range but less variance use 50+2d20-2d20. Still bulky, adding results is simply slow in these amounts.
- roll 50+(d6-d6)*10: mean 50, range 0-100, but easy to roll, and you can still reroll -6 and +5 results. The best one this far, but only because it skips most values ;)
- phased coin: you start at 50. Flip two coins. If both are the same, go by one point to that direction (sides correspond to positive/negative). Then start flipping one coin, add one for each repeat of the original result, stop when you get the wrong result. This gets you mean 50, a very low variance and you can just stop after hitting 10/90 (not that you will). In a certain kind of game (that uses the phases for narration) this would work, at least if you didn't need that much granularity.
- weighted phase coin: like before, but to get more variance, add a die: before starting with the coins, roll d10. Then, multiply each coin result with the die roll, but substract one from the multiplier each time. The mean stays the same, but the variance jumps to somewhere around ten. For even more variance, use a d12 or d20. You can still just stop when hitting 10/90, perhaps considering overflows as 50 (which would bring a really interesting choice factor in there, too) to correct the overflow somewhat.
- named die pool: Use a suitable number of d10s, give each a value and a target number. Only add the dice that get to the target number. Potentially less dice and summing than the pure summing methods, but somewhat more granularity and you'd have to mark the dice in some way, making them essentially custom dice.
- separated curves: first, flip 8d2-7 (or 8 coins +1, counting the coin as 0-1), giving you tens. Then, roll ten d10, counting anything on the unlikely side of the tens (that is, low for 1-5, high for others) as successes. Add successes to the tens. Gives mean roughly 55, range 10-90. The ones are approximated wonkily, no idea if that's even close.
- multiplicated substraction dice: roll (d6-d6)*d8+50. Pretty simple, mean 50, range 10-90. Only approximates normal distribution, but so do they all.
- a custom die: the rough probability of each result can be calculated by assuming the centre of gravity in the middle of the die: then the relative probabilities are proportional to the relative areas of the corresponding sides. The actual form would be a little (very little) like an egg with corners in the middle range and more smoothness on the poles, I guess.

That's what comes to mind without stopping to think. There's probably some pure die pool options, too, and others I haven't considered. Probably nothing easier than the multiplicated substraction.

Overall it seems that the table is your best bet if you really want exactly normal distribution within this range. Other than that, I consider the multiplicated substraction dice the clear winner. Any die summing at those ranges is notoriously slow. Have you considered if you really need the granularity?
Blogging at Game Design is about Structure.
Publishing Zombie Cinema and Solar System at Arkenstone Publishing.

Eero Tuovinen

From your additional stuff in the crossposts my take is definitely the table/chart method. If it's just used for character creation, it beats easily the other options for usability. What's best, you can make it arbitrarily exact and twist it any which way, should you decide that you want some other distribution.
Blogging at Game Design is about Structure.
Publishing Zombie Cinema and Solar System at Arkenstone Publishing.

geminidomino

Wait, I think I like the chart idea, but let me make sure I understand it properly...

Instead of rolling the percentile of the score directly, I roll a d100, and take the chart, look where the score falls, and take the value that falls on the chart at that value? (so that 50% would indeed be 50%, but 40% might well be 45%, depending on the precision of the graph?)

Eero Tuovinen

Quote from: geminidominoWait, I think I like the chart idea, but let me make sure I understand it properly...

Yep, that's it. You can make the chart more exact by rolling a d1000, if you're so inclined, but that'd be a little neurotic for my tastes.

As to how to calculate the chart, just draw yourself a distribution you're comfortable with, divide it into a hundred columns with the same area, number them and pick a value out of each column (the one closest to the mean, for example) to correspond with the column numbering. There's probably a program out there that'll do this for you.

If put out clearly in a easily accessible format, such a chart wouldn't make chargen any more difficult. At least compared to summing ten dice over and over...
Blogging at Game Design is about Structure.
Publishing Zombie Cinema and Solar System at Arkenstone Publishing.

Walt Freitag

Well, 10-90 could be 5d10 + 5d8. Or 5d6 + 5d12.

Can you do it with a single die type? Actually, yes: 16d6 - 6.

I don't know enough number theory (the branch of mathematics I believe would be applicable) to try for a general solution. And there's no guarantee of a solution in any particular case, which makes it seem unlikely that there would be a simple formula.

But here's how I figured out the answers I gave above; maybe that will help in other cases too.

If you want to limit a roll to a single die type, then you have a die roll of

xDn + y  where n is an element of {4, 6, 8, 10, 12, 20}

To get a range of A-B, you need

A = x + y
B = xn + y

The difference B - A = x (n - 1)
You can also say that B - A = xm where m is an element of {3, 5, 7, 9, 11, 19}.

From this it's easy to find the 16d6 - 6 solution for 10-90. The difference B-A is 80. The only divisor of 80 among the listed set of m's is 5. 80=x*5 gives you x=16. And m=5 corresponds to n=6, so you're rolling 16d6. Then it's just a matter of figuring out y, which comes out to negative six.

Now, if the list of allowable m included 8 (which would correspond to d9s), that would also be a divisor for 80. In that case B - A = 80 = x*8, so x = 10 and y = 0. So 10d9 would do it for you, except that there are no d9s. However, 2d9 = 1d8 + 1d10 as far as the range is concerned. (Beware, though: 2d9 does not have the same overall outcome distribution as 1d8 + 1d10!). So 10d9 converts into 5d8 + 5d10. Similarly, 1d6 + 1d12 has the same range as 2d9, so 10d9 converts into 5d6 + 5d12.

- Walt
Wandering in the diasporosphere

geminidomino

Quote from: Walt FreitagWell, 10-90 could be 5d10 + 5d8. Or 5d6 + 5d12.

Can you do it with a single die type? Actually, yes: 16d6 - 6.

I don't know enough number theory (the branch of mathematics I believe would be applicable) to try for a general solution. And there's no guarantee of a solution in any particular case, which makes it seem unlikely that there would be a simple formula.

But here's how I figured out the answers I gave above; maybe that will help in other cases too.

If you want to limit a roll to a single die type, then you have a die roll of

xDn + y  where n is an element of {4, 6, 8, 10, 12, 20}

To get a range of A-B, you need

A = x + y
B = xn + y

The difference B - A = x (n - 1)
You can also say that B - A = xm where m is an element of {3, 5, 7, 9, 11, 19}.

From this it's easy to find the 16d6 - 6 solution for 10-90. The difference B-A is 80. The only divisor of 80 among the listed set of m's is 5. 80=x*5 gives you x=16. And m=5 corresponds to n=6, so you're rolling 16d6. Then it's just a matter of figuring out y, which comes out to negative six.

Now, if the list of allowable m included 8 (which would correspond to d9s), that would also be a divisor for 80. In that case B - A = 80 = x*8, so x = 10 and y = 0. So 10d9 would do it for you, except that there are no d9s. However, 2d9 = 1d8 + 1d10 as far as the range is concerned. (Beware, though: 2d9 does not have the same overall outcome distribution as 1d8 + 1d10!). So 10d9 converts into 5d8 + 5d10. Similarly, 1d6 + 1d12 has the same range as 2d9, so 10d9 converts into 5d6 + 5d12.

- Walt

That's excellent! An answer to my original question that will most certainly come in handy, even if I do go with the chart for the character scores.

The only solution that's too complicated is the one that I can't code into perl. ;) Yours will work nicely. Thank you!

geminidomino

Quote from: Eero Tuovinen
Quote from: geminidominoWait, I think I like the chart idea, but let me make sure I understand it properly...

Yep, that's it. You can make the chart more exact by rolling a d1000, if you're so inclined, but that'd be a little neurotic for my tastes.

As to how to calculate the chart, just draw yourself a distribution you're comfortable with, divide it into a hundred columns with the same area, number them and pick a value out of each column (the one closest to the mean, for example) to correspond with the column numbering. There's probably a program out there that'll do this for you.

If put out clearly in a easily accessible format, such a chart wouldn't make chargen any more difficult. At least compared to summing ten dice over and over...

Even going down to the 1% precision strikes me as a mite neurotic... maybe splitting it into 5% increments tho...

And I can use multiple charts for dramatic vs. realistic vs. heroic games...

*Gets that geeky glint in his eye again*

timfire

Quote from: Eero Tuovinen- just roll 10d10: that'll get you a mean of 65 and a range of 10-100. Reroll results from 91 up (or preferably think of some use for them). This is simple, but even more bulky than the chart approach (the adding takes time).
Actually, there's an easier way: 9d10. That'll give you a spread of 9-90. Not quite but almost. Besides the probability of rolling a 9 is so small that for practical purposes you wouldn't need to worry about it (literally 1 in a million!). But that bring up the problem with this setup - rolling 9d~ sets up a really steep bell. Most results will center around the middle, and the chance of rolling outliners is impossibly low.

Anyway, geminidomino, here's the practical advice. I think I understand what you're asking, but I think its better to be flexible with the exact probabilty/distribution. There's always ways to make it work, but like others have said, those ways tend to be clunky. I also believe that most gamers tend to have a low tolerance for clunky math, though I have no data to back that up.
--Timothy Walters Kleinert

geminidomino

Quote from: timfire
Quote from: Eero Tuovinen- just roll 10d10: that'll get you a mean of 65 and a range of 10-100. Reroll results from 91 up (or preferably think of some use for them). This is simple, but even more bulky than the chart approach (the adding takes time).
Actually, there's an easier way: 9d10. That'll give you a spread of 9-90. Not quite but almost. Besides the probability of rolling a 9 is so small that for practical purposes you wouldn't need to worry about it (literally 1 in a million!). But that bring up the problem with this setup - rolling 9d~ sets up a really steep bell. Most results will center around the middle, and the chance of rolling outliners is impossibly low.

Anyway, geminidomino, here's the practical advice. I think I understand what you're asking, but I think its better to be flexible with the exact probabilty/distribution. There's always ways to make it work, but like others have said, those ways tend to be clunky. I also believe that most gamers tend to have a low tolerance for clunky math, though I have no data to back that up.

Yeah, the chart approach seems to be the best I've seen so far. The hard math is only on the part of the designer (i.e. me). It keeps the distribution without subjecting the players to rolling dozens of dice eight times over.