Jump to content

The probability and predictability of dice.


SteveZilla

Recommended Posts

Re: The probability and predictability of dice.

 

I've modified the code to limit the low end to a width of one' date=' and to also round the widths to the nearest integer. That should clear up any weirdness.[/quote']

Yep. Looks good now.

 

I'm fond of algorithms, and especially so of coding. :) I prefer to let the computer do my counting for me, however. ;)

I think you're only counting the trivial practice of counting. I was counting the only kind of counting that really counts. :P

Link to comment
Share on other sites

  • Replies 140
  • Created
  • Last Reply

Top Posters In This Topic

Re: The probability and predictability of dice.

 

I came up with a web-based program (in PHP) that will show the distribution of probabilities (the chance of each result possible) for any group from dice from 1d6 to 30d6.

 

...

 

Here's the link.

 

Mighty cool and repped when I can.

 

Any chance I can get a copy of that page/program to save to my computer? I currently don't have internet access at home and that could come in handy when I least expect it to.

 

P.S.: PhilFleischmann, if you look at the probability distribution on the charts SteveZilla's program generates, you'll notice how all the long red bars start gathering near the middle and grow longer in comparison to those near the extremes. This is what I mean when more dice give a more predictable roll. The majority of possible rolls are near the middle of the graph.

Link to comment
Share on other sites

Re: The probability and predictability of dice.

 

Mighty cool and repped when I can.

 

Any chance I can get a copy of that page/program to save to my computer? I currently don't have internet access at home and that could come in handy when I least expect it to.

 

Do you know HTML, PHP, and MySQL? :) It's written in HTML/PHP and uses a MySQL database. The database holds the number of combinations for each result and also the total combinations for each set of dice. I wasn't sure how long it would take the program to generate all the results, which is why I split the process in two (generation and display). The first program created and filled the 182 column, 30 row table, and the second one (which I linked here, is what reads that data and generates the output.

 

Also, I wasn't sure how many hits this page might generate, and didn't want to bog down the server.

 

I could easily combine the two, or I could just modify them to use a flatfile (*.txt) instead of a database. But I don't know how I could change it from PHP to some other language for someone's PC. Although, PHP is available free. One just has to download, configure, compile, and install it on their PC.

 

If you need me to change it from MySQL to flatfile, let me know so I can change it before I post it here. The two took me about a day-and-a-half to write, so that change won't take very long. :)

 

An addition I've been contemplating is to use different colors of bars to show the different Standard Deviations. Is that something people would want/need?

 

P.S.: PhilFleischmann' date=' if you look at the probability distribution on the charts SteveZilla's program generates, you'll notice how all the long red bars start gathering near the middle and grow longer in comparison to those near the extremes. This is what I mean when more dice give a more predictable roll. The majority of possible rolls are near the middle of the graph.[/quote']

 

Question about this. When you say "grow longer in comparison to those near the extremes", are you referring to the relative actual length of the bars (i.e., the %chance), or the number of bars in the "hump" vs. the number of bars in the "flats"?

 

Out of curiosity, I did calculate the average % chance in each group, and found that the average % chance drops as one adds dice. But I'm not sure if that shows anything, or is at all relevant.

Link to comment
Share on other sites

Re: The probability and predictability of dice.

 

Do you know HTML' date=' PHP, and MySQL?[/quote']

I know HTML, but not the others.

:) It's written in HTML/PHP and uses a MySQL database. The database holds the number of combinations for each result and also the total combinations for each set of dice. I wasn't sure how long it would take the program to generate all the results, which is why I split the process in two (generation and display). The first program created and filled the 182 column, 30 row table, and the second one (which I linked here, is what reads that data and generates the output.

 

Also, I wasn't sure how many hits this page might generate, and didn't want to bog down the server.

 

I could easily combine the two, or I could just modify them to use a flatfile (*.txt) instead of a database. But I don't know how I could change it from PHP to some other language for someone's PC. Although, PHP is available free. One just has to download, configure, compile, and install it on their PC.

 

If you need me to change it from MySQL to flatfile, let me know so I can change it before I post it here. The two took me about a day-and-a-half to write, so that change won't take very long. :)

Whatever would let me run in from my hard drive would make me happy. This is probably something that I would never need to bring up at a moment's notice, but I just know if I can't I'll be sitting at the game table one day and find myself saying "well, if I had an internet connection here I could just pop up this web page and show you what I mean."

 

An addition I've been contemplating is to use different colors of bars to show the different Standard Deviations. Is that something people would want/need?

Personally, I'm confused as to what anyone means by "standard deviations" and how it applies to statistical probability, so I'm not sure how much utility I'd get from it. I can't see it making the program any less useful though.

 

Question about this. When you say "grow longer in comparison to those near the extremes", are you referring to the relative actual length of the bars (i.e., the %chance), or the number of bars in the "hump" vs. the number of bars in the "flats"?

The latter. The actual %chance of an individual roll is inconsequential, but if add up the %s of those of in the hump, you'll see a numerical representation of what the graph is showing visually.

 

Out of curiosity, I did calculate the average % chance in each group, and found that the average % chance drops as one adds dice. But I'm not sure if that shows anything, or is at all relevant.
Each group meaning each individual result (such as the % chance of rolling a 10 on 3d6)? If so, then yes, that's exactly what you should expect to happen. If you add more possible results, the chance for any of those results drops. If you compare a d6 to a d10, you'll find they have the exact same probability curve (all flat), but the chance of rolling any result on the d10 (10%) is less than that of the d6 (16.67%).
Link to comment
Share on other sites

Re: The probability and predictability of dice.

 

I know HTML, but not the others.

 

Whatever would let me run in from my hard drive would make me happy. This is probably something that I would never need to bring up at a moment's notice, but I just know if I can't I'll be sitting at the game table one day and find myself saying "well, if I had an internet connection here I could just pop up this web page and show you what I mean."

 

Without a language that your PC and I have in common (I don't know Java or Javascript), It'll have to be static HTML pages. Which the program could be easily modified to generate. We really don't need to calculate the curve out each time -- once is good enough. Then you could just do a "File->Save As" and there you go! Or I could zip all 30 pages and email them to you.

 

Personally' date=' I'm confused as to what anyone means by "standard deviations" and how it applies to statistical probability, so I'm not sure how much utility I'd get from it. I can't see it making the program any [i']less [/i]useful though.

 

I'm pretty much in the same boat so far, and came to a similar conclusion. :)

 

The latter. The actual %chance of an individual roll is inconsequential' date=' but if add up the %s of those of in the hump, you'll see a numerical representation of what the graph is showing visually.[/quote']

 

That is what I think finally dawned to me -- the width of the "hump" vs the "flats". Which was the main impetus for me to write these programs. It was an added bonus that I had to write my own math operation subroutines! I can now add, subtract, or divide any two integers (positive or negative) that are up to at least 253 digits? And I can specify the max number of decimal places the division produces (up to at least 252 decimal places).

 

... Sorry, I get carried away when I've done something I've never done before with code. :)

 

Each group meaning each individual result (such as the % chance of rolling a 10 on 3d6)? If so' date=' then yes, that's exactly what you should expect to happen. If you add more possible results, the chance for any of those results drops. If you compare a d6 to a d10, you'll find they have the exact same probability curve (all flat), but the chance of rolling any result on the d10 (10%) is less than that of the d6 (16.67%).[/quote']

 

After I had run the averages, I realized that it should have been obvious to me. :o

Link to comment
Share on other sites

Re: The probability and predictability of dice.

 

Without a language that your PC and I have in common (I don't know Java or Javascript)' date=' It'll have to be static HTML pages. Which the program could be easily modified to generate. We really don't need to calculate the curve out each time -- once is good enough. Then you could just do a "File->Save As" and there you go! Or I could zip all 30 pages and email them to you.[/quote']

 

Individual html pages would be fine. It's easy enough to create an index page that links to each of them. I'm not sure how you'd get them to me though, unless you email me from the link in my profile and I email you back, then you send them direct as a zipped attachment.

Link to comment
Share on other sites

Re: The probability and predictability of dice.

 

Individual html pages would be fine. It's easy enough to create an index page that links to each of them. I'm not sure how you'd get them to me though' date=' unless you email me from the link in my profile and I email you back, then you send them direct as a zipped attachment.[/quote']

 

I was going to put the links on each page, avoiding the need for an index page.

 

I'll post the zip file as an attachment here. That way, whoever wants it can grab it.

Link to comment
Share on other sites

Re: The probability and predictability of dice.

 

Sounds excellent, Steve.

 

Aod for the record, I just finished taking an applied statistics course. Standard deviation would possibly be useful (imho) in this case to quickly eyeballing areas. One standard deviation on each side is 68% of the data. The area for two standard deviations is 95% of the data. Three is 97% of the data. More-or-less, anyway.

 

And the more dice you have, the smaller the range of numbers appears inside one standard deviation, which is part of why it's more predictable.

Link to comment
Share on other sites

Re: The probability and predictability of dice.

 

P.S.: PhilFleischmann' date=' if you look at the probability distribution on the charts SteveZilla's program generates, you'll notice how all the long red bars start gathering near the middle and grow longer in comparison to those near the extremes. This is what I mean when more dice give a more predictable roll. The majority of possible rolls are near the middle of the graph.[/quote']

Yes, I know that's what you mean. I've known that for a long time now, and I've said so. However, if you look at prestidigitator's graph, you can see that the likelihood of the results in the middle hump goes down with increase numbers of dice, and the likelihood of numbers farther from the hump goes up. That's what I mean when I say that more dice give a less predictable roll.

Link to comment
Share on other sites

Re: The probability and predictability of dice.

 

And the more dice you have' date=' the smaller the range of numbers appears inside one standard deviation, which is part of why it's more predictable.[/quote']

Uh, no. The more dice you have, the larger the range of numbers inside the standard deviation (the standard deviation gets larger), which is why it's less predictable.

 

If 68% of the results are within N-1 and N+1, then the standard deviation is 1. If 68% of the results are within N-5 and N+5, then the standard deviation is 5, and the results are less predictable (a range of 10 vs, a range of 2).

Link to comment
Share on other sites

Re: The probability and predictability of dice.

 

Yes' date=' I know that's what you mean. I've known that for a long time now, and I've said so. However, if you look at prestidigitator's graph, you can see that the likelihood of the results in the middle hump goes down with increase numbers of dice, and the likelihood of numbers farther from the hump goes up. That's what I mean when I say that more dice give a less predictable roll.[/quote']

 

Have you noticed that Prestidigitator's graph is not a graph of results of a roll of Xd6 but rather a graph of the results of Xd6 + 3.5X? It really doesn't have much of a bearing on the discussion (although I would love to hear prestidigitator's reasoning as to why it does).

Link to comment
Share on other sites

Re: The probability and predictability of dice.

 

Uh' date=' no. The more dice you have, the larger the range of numbers inside the standard deviation (the standard deviation gets larger), which is why it's less predictable. [/quote']

 

Facts are right, conclusion is wrong. The absolute range is larger (which is what you say) but the relative range is smaller (which you for some reason either refuse to admit or dismiss).

 

If 68% of the results are within N-1 and N+1, then the standard deviation is 1. If 68% of the results are within N-5 and N+5, then the standard deviation is 5, and the results are less predictable (a range of 10 vs, a range of 2).

 

A roll of 2d6 has a standard deviation of 2.42 and a mean of 7.0. 68.2% of the time the roll will be within 7.0 + or - 34.5%.

 

A roll of 10d6 has a standard deviation of 5.40 and a mean of 35.0. 68.2% of the time the roll will be within 35.0 + or - 15.4%.

 

34.5%/15.4 = 2.24

 

10d6 is almost 2 and 1/4 times more predictible than 2d6.

 

Edit: removed extra php code

Link to comment
Share on other sites

Re: The probability and predictability of dice.

 

Have you noticed that Prestidigitator's graph is not a graph of results of a roll of Xd6 but rather a graph of the results of Xd6 + 3.5X? It really doesn't have much of a bearing on the discussion (although I would love to hear prestidigitator's reasoning as to why it does).

It is a mere shifting of the means of the distributions to the same place (it doesn't change the standard deviation or, "predictability," a bit). Also, the discussion that sparked this thread brought up the balance factors of replacing part of an effect roll with a 3.5/d6 Standard Effect (whether it made the attacks more or less powerful, and whether it would be an unbalanced thing to do).

Link to comment
Share on other sites

Re: The probability and predictability of dice.

 

Have you noticed that Prestidigitator's graph is not a graph of results of a roll of Xd6 but rather a graph of the results of Xd6 + 3.5X? It really doesn't have much of a bearing on the discussion (although I would love to hear prestidigitator's reasoning as to why it does).

Actually, it's Xd6 - 3.5X. And yes, I've noticed. The purpose of that is to compare predictability, not mean result. If we're talking about predictability (the exact word in the title of this thread), then it has direct bearing on the discussion.

 

Facts are right, conclusion is wrong. The absolute range is larger (which is what you say) but the relative range is smaller (which you for some reason either refuse to admit or dismiss).

I don't know why you would say something like this, other than not reading my posts. I admitted many times that the relative range is smaller. And yes, I dismiss that fact as being irrelevent to the HERO System (and as far as I know, irrelevent to every other game with dice). In the HERO System (and every other dice roll in a game), it is the absolute range that matters. There may well be other contexts in which the relative range matters, but I don't know what those are off hand.

 

A roll of 2d6 has a standard deviation of 2.42 and a mean of 7.0. 68.2% of the time the roll will be within 7.0 + or - 34.5%.

 

A roll of 10d6 has a standard deviation of 5.40 and a mean of 35.0. 68.2% of the time the roll will be within 35.0 + or - 15.4%.

 

34.5%/15.4 = 2.24

 

10d6 is almost 2 and 1/4 times more predictible than 2d6.

34.5% of 7 = 2.42

15.4% of 35 = 5.39

 

5.39/2.42 = 2.23

 

2d6 is almost 2 and 1/4 times more predictable than 10d6.

 

In the HERO System, we don't deal with figures like "15.4% above the mean" or "34.5% below the mean." We deal with absolute numbers like 40 and 5.

Link to comment
Share on other sites

Re: The probability and predictability of dice.

 

Phil, I think what is being said is that + or - 1 standard deviation from the mean for 10d6 is a significantly smaller percentage of the total than that of 2d6, which in statistics means that it is more predictable, because you have a ~70% chance of rolling with in 30.8% of the total, where as with 2d6 you have a ~70% chance of rolling with in 68.8% of the total.

Link to comment
Share on other sites

Re: The probability and predictability of dice.

 

Phil' date=' I think what is being said is that + or - 1 standard deviation from the mean for 10d6 is a significantly smaller percentage of the total than that of 2d6,[/quote']

Yes, I know that. How many more times do I have to say it?

 

which in statistics means that it is more predictable,

I've never seen any specific definition for "predictable" in statistics. The terms they use are: mean, mode, median, standard deviation, etc. There is no precise technical statistics-definition for "predictability". I base the definition I'm using on the useful result - the one that useful to the HERO System. That useful result is the absolute number. If the bad guy blasts you for 35 STUN, it doesn't matter whether it was an average roll on 10d6 or an almost maximum roll on 6d6, or a minimum roll on 35d6, or a slightly above average roll on 9d6, or a slightly below average roll on 11d6. The effect on you is the same. It's the absolute number that matters, not the percentage above of below the mean.

 

because you have a ~70% chance of rolling with in 30.8% of the total, where as with 2d6 you have a ~70% chance of rolling with in 68.8% of the total.

Not "total". You mean "mean" or "average" or to be possibly redundant "arithmetic mean". Have you ever used the phrase "30.8% of the mean" in a HERO game?

 

If your GM tells you that you've been hit by the bad guy's blast, and the damage is 50% above the mean, is that bad? If he tells you that the damage is 50% below the mean, is that good? You have no way of knowing, because it's the actual number that matters. Even a maximum roll on a 2d6 EB isn't going to hurt the average superhero. There is no special bonus or additional effect of rolling maximum beyond the 12 STUN and 4 BODY. And even a minimum roll on 50d6 is going to hurt the average superhero, there is no additional rule for rolling the minimum beyond the 50 STUN.

Link to comment
Share on other sites

Re: The probability and predictability of dice.

 

There may well be other contexts in which the relative range matters' date=' but I don't know what those are off hand.[/quote']

The only real one I can think of is where you might be considering going to a different number of dice for attack and skill rolls, as has come up a few times over the years, and you plan to increase both the number of dice and the modifiers. A planned modification to the entire system, not the number of dice in an attack or where you place the Standard Effect value.

Link to comment
Share on other sites

Re: The probability and predictability of dice.

 

The only real one I can think of is where you might be considering going to a different number of dice for attack and skill rolls' date=' as has come up a few times over the years, and you plan to increase both the number of dice and the modifiers. A planned modification to the entire system, not the number of dice in an attack or where you place the Standard Effect value.[/quote']

 

 

Relative range is used by every player every time he sits down whether he realizes it or not. It is used when picking targets. "That brick seems pretty tough he must have at least 25 PD, my attack only averages 20-30 STUN, I think I'll blast the mentalist who only seems to have 15 PD." There, a specifc use of relative range that happens only 30 to 40 times any time any one sits down to play HERO. Dust Raven has said it before and I will say it again:

 

Relative ranges matter before a roll is taken, absolute numbers only matter afterwords.

Link to comment
Share on other sites

Re: The probability and predictability of dice.

 

Yes' date=' I know that's what you mean. I've known that for a long time now, and I've said so. However, if you look at prestidigitator's graph, you can see that the likelihood of the results in the middle hump goes down with increase numbers of dice, and the likelihood of numbers farther from the hump goes up. That's what I mean when I say that more dice give a less predictable roll.[/quote']

 

You're reading the graph wrong.

Link to comment
Share on other sites

Re: The probability and predictability of dice.

 

I don't know why you would say something like this' date=' other than not reading my posts. I admitted many times that the relative range is smaller. And yes, I dismiss that fact as being irrelevent to the HERO System (and as far as I know, irrelevent to every other game with dice). In the HERO System (and every other dice roll in a game), it is the absolute range that matters. There may well be other contexts in which the relative range matters, but I don't know what those are off hand.[/quote']

 

Phil, why would you dismiss a mathematical fact just because the math isn't used in a game (any game)? We're not talking about a game (any game) here. We're talking about dice.

 

And as I've said countless times before, the absolute results of a roll only matter once you have them. The entire purpose of predicting a result is that you don't know it yet! And there is no such thing as an "absolute range" of results that matters in the Hero System. You never roll a final result of 10-12 (for example). You roll 10, or you roll 11, or you roll 12. Single results, not a range. On top of that, the purpose of having a range of anything is to compare it to what's not in the range. Ranges are always relative to something else, if the the value of the range is absolute.

Link to comment
Share on other sites

Re: The probability and predictability of dice.

 

Okay, for the sake of argument, let's present an example of an event that may happen during a game where the player will have to make a decision based on his prediction of how the dice may roll.

 

Deduction Dan has two Attack Powers:

 

EB 12d6, STUN Only (vs. ED)

EB 4d6, AVLD (Power Defense)

 

DD knows his target has an ED of 54 and Power Defense of 18. (I picked these numbers based off of 75% the total damage possible for the attack they defend against to represent a stastical equivilant for each.)

 

Which attack should Deduction Dan use?

 

Well, DD whould naturally use the attack that is most likely to cause the most damage to his target. So which is it?

Link to comment
Share on other sites

Re: The probability and predictability of dice.

 

Okay, for the sake of argument, let's present an example of an event that may happen during a game where the player will have to make a decision based on his prediction of how the dice may roll.

 

Deduction Dan has two Attack Powers:

 

EB 12d6, STUN Only (vs. ED)

EB 4d6, AVLD (Power Defense)

 

DD knows his target has an ED of 54 and Power Defense of 18. (I picked these numbers based off of 75% the total damage possible for the attack they defend against to represent a stastical equivilant for each.)

 

Which attack should Deduction Dan use?

 

Well, DD whould naturally use the attack that is most likely to cause the most damage to his target. So which is it?

Ah! Good! A concrete applicable example. Cool.

12d6 EB - Mean 42, Std dev. 5.92...

4d6 EB - Mean 14, Std dev. 3.42...

The ED of 54 is 12--or just over 2 standard deviations--above the mean of the 12d6 EB. The PowD of 18 is 4--or just over 1 standard deviation--above the mean of the 4d6 EB. The latter is more likely to do damage, and will do more average damage over a number of applications. Notice I cared nothing for how big the actual total ranges were (12-72 on the 12d6 and 4-24 on the 4d6). They are pretty irrelavent unless we are actually talking about a threshold completely above the range (making our desired outcome impossible), which we aren't.

Link to comment
Share on other sites

Re: The probability and predictability of dice.

 

Ah! Good! A concrete applicable example. Cool.

12d6 EB - Mean 42, Std dev. 5.92...

4d6 EB - Mean 14, Std dev. 3.42...

The ED of 54 is 12--or just over 2 standard deviations--above the mean of the 12d6 EB. The PowD of 18 is 4--or just over 1 standard deviation--above the mean of the 4d6 EB. The latter is more likely to do damage. Notice I cared nothing for how big the actual total ranges were (12-72 on the 12d6 and 4-24 on the 4d6). They are pretty irrelavent unless we are actually talking about numbers outside the range (making our desired outcome impossible), which we aren't.

Pretty much. The ALVD is the better choice. Why? Because the roll is less predictable, it's far more likely to reach those results near the maximum, which is the only way you'll do damage in either case. The statistical break down is that the 12d6 EB has less than a 5% chance of doing damage, and the AVLD have around a 35% chance (haven't calculated the actual numbers, but if someone else would like to).

 

I believe the AVLD is the better choice over a continued attack as well, but I'm fuzzy on the math for calculating that. Anyone want to figure out how much total damage each will do (statistically) over the course of 20 consecutive hits (with or without taking into account the target's DCV of 3, REC of 20 and the attacker's OCV of 6, SPD of 5, and if you want to haymaker either shot, the target has a CON of 30).

Link to comment
Share on other sites

Re: The probability and predictability of dice.

 

Pretty much. The ALVD is the better choice. Why? Because the roll is less predictable' date=' it's far more likely to reach those results near the maximum, which is the only way you'll do damage in either case.[/quote']

Not quite. The example required less variation for the AVLD case. As in, it only required you to be 4 away from the mean instead of 12 away from the mean like the ED. The situation would be a lot different if the ED had only been 46 (4 above the mean of the 12d6 EB).

 

The statistical break down is that the 12d6 EB has less than a 5% chance of doing damage, and the AVLD have around a 35% chance (haven't calculated the actual numbers, but if someone else would like to).

 

I believe the AVLD is the better choice over a continued attack as well, but I'm fuzzy on the math for calculating that. Anyone want to figure out how much total damage each will do (statistically) over the course of 20 consecutive hits (with or without taking into account the target's DCV of 3, REC of 20 and the attacker's OCV of 6, SPD of 5, and if you want to haymaker either shot, the target has a CON of 30).

Not really, no. I'm going to be lazy on this one for the moment, as is now my divine prerogative ( ;) ). Maybe later. :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...