Topic: Inverse dice probability?
Started by: geminidomino
Started on: 12/14/2004
Board: RPG Theory
On 12/14/2004 at 2:00pm, geminidomino wrote:
Inverse dice probability?
(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?
On 12/14/2004 at 2:39pm, Akamaru wrote:
RE: Inverse dice probability?
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
On 12/14/2004 at 2:51pm, geminidomino wrote:
RE: Inverse dice probability?
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.
On 12/14/2004 at 2:59pm, Akamaru wrote:
RE: Inverse dice probability?
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.
On 12/14/2004 at 3:07pm, geminidomino wrote:
RE: Inverse dice probability?
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. ;)
On 12/14/2004 at 3:17pm, geminidomino wrote:
RE: Inverse dice probability?
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. ;)
On 12/14/2004 at 3:21pm, Eero Tuovinen wrote:
RE: Inverse dice probability?
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?
Forge Reference Links:
Topic 12583
On 12/14/2004 at 3:25pm, Eero Tuovinen wrote:
RE: Inverse dice probability?
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.
On 12/14/2004 at 3:35pm, geminidomino wrote:
RE: Inverse dice probability?
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?)
On 12/14/2004 at 3:43pm, Eero Tuovinen wrote:
RE: Inverse dice probability?
geminidomino wrote: Wait, 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...
On 12/14/2004 at 3:44pm, Walt Freitag wrote:
RE: Inverse dice probability?
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
On 12/14/2004 at 3:48pm, geminidomino wrote:
RE: Inverse dice probability?
Walt Freitag wrote: 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
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!
On 12/14/2004 at 3:53pm, geminidomino wrote:
RE: Inverse dice probability?
Eero Tuovinen wrote:geminidomino wrote: Wait, 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*
On 12/14/2004 at 3:58pm, timfire wrote:
RE: Inverse dice probability?
Eero Tuovinen wrote: - 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.
On 12/14/2004 at 4:02pm, geminidomino wrote:
RE: Inverse dice probability?
timfire wrote:Eero Tuovinen wrote: - 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.
On 12/14/2004 at 5:36pm, ffilz wrote:
RE: Inverse dice probability?
If you want a standard bell curve, you can even use Excel (and presumably other spreadsheet programs) to generate the chart for you. Of course the chart mentioned in the cross referenced thread is actually an open ended chart that theoretically allows any point on the infinite bell curve, but in practicality doesn't because you can't pregenerate an infinite chart, on the other hand, you really don't need the results that have an infintesimal probability.
Of course if you want to provide hard limits at one or both ends of the chart, you can do that.
The reccomendation of using 5% intervals is good, though you need to decide what you want regularly distributed, the points on the chart, or the results. For example, if you want the chart to have an entry every 5% (which also only works if you provide hard limits at both ends), then your results will not be evenly spaced (so you might find that the available results say are 10, 30, 35, 40, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 60, 65, 70, 90). You'll also find that you either have an odd number of results and thus have a center result, or your have an even number of results with a pair of results that straddle the 50% boundary. In the chart I presented, there is not the same chance of getting a +1 as a -1 because of this. Of course you see this in regular dice distributions also. 2d6 has an odd number of results with a center result, while 3d6 has an even number of results with a pair that straddles the center.
I'd be happy to try and answer questions on how to produce the results you want from such a chart.
Frank
On 12/14/2004 at 6:00pm, geminidomino wrote:
RE: Inverse dice probability?
ffilz wrote: If you want a standard bell curve, you can even use Excel (and presumably other spreadsheet programs) to generate the chart for you.
Yeah, I've got OpenOffice Calc running with this as I type this. :)
The reccomendation of using 5% intervals is good, though you need to decide what you want regularly distributed, the points on the chart, or the results. For example, if you want the chart to have an entry every 5% (which also only works if you provide hard limits at both ends), then your results will not be evenly spaced (so you might find that the available results say are 10, 30, 35, 40, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 60, 65, 70, 90).
The points. The type of limited result set you mentioned are EXACTLY what I want. I want there to be much more of a chance of rolling up an "Average Joe" (with abilities in the 40-60 range) than a Superman with 4 out of 6 scores in the 90s.
I'd be happy to try and answer questions on how to produce the results you want from such a chart.
Frank
Well, I used the appropriate functions to come up with both a probability and cumulative probability tables, as well as a table of standard deviations for reference(I wrote the spreadsheet so that the mean and STDDEV can be adjusted by changing one cell each).
Now I'm just trying to work out how to tie a score to a roll to make it usable. ;) It would be easier with a graph, but as I don't have Excel, I have to make do with the table.
On 12/14/2004 at 6:22pm, geminidomino wrote:
RE: Inverse dice probability?
geminidomino wrote:
Now I'm just trying to work out how to tie a score to a roll to make it usable. ;) It would be easier with a graph, but as I don't have Excel, I have to make do with the table.
Woot! I figured it out! Dummy that I am, I kept spacing the "dice points" (the graph reigion separators) evenly by the scores and wondering why it still came out linear!
I put 1 die point at each 5% boundary (or close to it) and came up with the following table (using a "Realistic graph, STD DEV of 20 and a MEAN of 50):
ROLL -> Score
1 -> 10 (fudged to make 10 a minumum score)
* -> 18 (skipped)
2 -> 25
3 -> 30
4 -> 34
5 -> 37
6 -> 40
7 -> 43
8 -> 45
9 -> 48
10 -> 50
11 -> 53
12 -> 56
13 -> 58
14 -> 61
15 -> 64
16 -> 67
17 -> 71
18 -> 76
19 -> 85
20 -> 90
That works out just like I'd hoped. :) Using a chart like that was really a brilliant idea!
On 12/14/2004 at 6:46pm, ffilz wrote:
RE: Inverse dice probability?
Interesting that your chart isn't exactly symetrical, but that's a cool thing about using a chart, you can fudge the results around for your own purposes. If you relied on a 20d6 model or something like that, you're stuck with the result curve the dice generate.
The one thought I would have on using evenly distributed values in the random column as opposed to evenly distributed values in the result column is whether the game significance of a 48 vs. 50 is sufficient to justify the slight extra complexity vs a chart using 1d100 with a wide range producing 50, and smaller ranges producing 45 and 55, etc. out to 10 and 90 with very small ranges. Remember, you use the table once, but you constantly use the results.
On the other hand, it may be nice to have room for apparent differences between "average" characters without there being real differences. For example, if you were to randomly simulate a race with such a table, you wouldn't want 70% of the people to finish with the same time, ideally you would want each finisher to have a different time, but most of them happen to be about the same. If two PCs happened to finish in the center of the grouping, they will want to know who finished first even though the order they finished is irrelevant to the race as a whole, so you don't want to tell them they both finished somewhere between 16th and 85th place.
Of course what this points out is that when you are developing dice mechanics, you need to keep in mind how you will use the results and applyt meaning to them, not just how you generate the results.
Frank
On 12/14/2004 at 7:11pm, geminidomino wrote:
RE: Inverse dice probability?
Checks are going to be done with roll-under D&D style. Either you hit or miss. For things like running, swimming, meditating, etc, I'm probably going to used an "extended check" style rule... Kind of like "you roll till you fail a check, then you're done/out/etc..."
For all I know, I'll have to redo the charts and/or scrap the whole idea after I get some playtesting in. :)
On 12/15/2004 at 4:44am, M. J. Young wrote:
RE: Inverse dice probability?
10d9 was the first thing that occurred to me (sorry--I've been away a few days, so I'm coming to the party late). Of course, d9's are problematic. You can get at them by ignoring the 0's on d10's or by the rather complicated method of using (1/2 d6)x(1/2 d6) for each of them, neither particularly fast in play.
I'm surprised, actually, that my second thought was not spotted by anyone. I thought Walt was going to nail it, but he was all around it because he was looking to match standard dice. (20d5)-10 will get you 10 to 90. Since (1/2 d10) works for d5 pretty easily, it's not as difficult to roll as all those d9's. On the other hand, this is going to have a very steep curve--5^20 permutations, 1 chance of rolling 10, 5 for 11, 15 for 12, and I think if I set my computer to doing those calculations I'd be waiting quite a while for the results.
--M. J. Young