Skip to Content
 

Dice probabilities

36 replies [Last post]
apertotes
Offline
Joined: 08/04/2014

Hi, I am working on a simulation game where attacking is done with a certain number of dice, and the player selects the higher value for their attack.

So, if your attack is 1, you roll 1d12, and take the value as your attack, but if your attack is 7, you roll 7d12 and take the highest number as your attack.

I would love if someone could explain to me the math involved in calculating average scores for different number of die, from 1 to 15. I know a bit about probability, but I have tried and tried and have not found any reliable way to come with the answer.

---------------------------------------------------------------

Advance task:

What if rolling a 12 meant that the player could roll a new die and add to the result? How would that affect the average value? The idea is that for every 12 rolled on the original roll, the player rolls a die on a second roll and then add it to the original highest number (12, in this case).

Example: a player rolls 9 dice: 8, 12, 1, 4, 5, 12, 4, 12, 10.

The highest value is 12, and he rolled 3 of them, so he would roll again 3 dice, and add the highest value to his original roll, which was 12. So he rolls: 3, 12, 7.

Another 12, which means he has again the chance to increase his roll. He adds the new highest value to the original one (12+12) and rolls another die. If he rolls a 12, he would repeat the process. But he rolls a 1. So the final value of the roll would be 12+12+1=23.

Is there any way to calculate the average score for this kind of rolls with 1-15 dice?

---------------------------------------------------------

Absurd level task:

I would like to introduce an automatic fail feature, and so I thought about turning 1s into fails in the following manner: each 1 will cancel the highest number rolled. For example, rolling 7 dice: 10, 12, 1, 4, 1, 10, 5. One of the 1s would cancel the 12, and the other 1 would cancel one of the 10s, so, the highest valid number would be 10.

I know (this math was approachable for me) that increasing the number of dice will decrease the possibility of a complete fail (more than half 1s) which is perfect to my intentions: higher attack values have lower risk of complete failure.

But I find it out of my reach how to calculate average values of rolls.

------------------------------------------------------

Collateral absurd level task:

When applying the 1=fail system, rolling an even number of dice becomes a problem. For example, two dice: 7, 1. The 1 cancels the 7, and there is no number left. This could be taken as a fail, but then rolling 2 dice would be worse than rolling only 1, which is completely stupid in a system where higher attack values should be better than lower attack values. The same would happen for 3 and 4 dice, and 5 and 6, etc.

So, does anybody have any idea on how to balance even number of dice with a system of 1=fail like I explained above?

PS: I already thought about the obvious solution: having only odd values for attack. That will remain as a last-resort solution, but I would like a more universal solution that would not mess with the possibility of attack bonus (+1,+2, -3, etc.)

Thanks a lot.

Masacroso
Offline
Joined: 05/05/2014
You can think the numbers of

You can think the numbers of dice as consecutive throws of one dice because you choose the higher.

The probability for the higher number (12) on the thrown of a dice is 1/12 if you are using a standard homogeneous dice of 12 dice with values from 1 to 12.

The probability of any side on consecutive throws is described by cumulative binomial distribution.

Basically is a sum of binomial probabilities changing the value of k (number of success) from 0 to n (where n is the number of throws/dice). And p is the probability of success is a isolated event (in the throw of a dice, in your case is 1/12=0,08333...)

(WTF is this shit... this is really more complex than I expected... this is linked to Euler beta function... LOL. This function is STRONGLY IMPORTANT on mathematics... and these days way more cause the string theory).

This distribution maybe interesting too.

P.S.: Im interested in this topic too.. if I have time I will do some tables with probabilities using mathematical software.

Masacroso
Offline
Joined: 05/05/2014
You can use this tool to know

You can use this tool to know the probabilities that you want.

In your case you want to match binomial and right side (cumulative probability) marked on 1 (because you want to have at least one success, so X>=1).

Example: to know the probabilities to get one or more 3 on the throw of 4 dice (n=4 and X=>1 because you need at least one 3) of six sides (p=1/6) we have that the probability is P=0.5178=52%

The same for n=5 (five throws/dice) is P=0.5982. And of course when you increased n the probability increases, obviously, because you have more opportunities to obtain a 3.

For your case, cause probability to take ONE number is fixed (p=constant) and the condition X>=1 is fixed too... you want to see how probability evolve when the number of throws/dice increase and the number of sides of the dice increases (when p changes).

To your "advanced tasks" I dont think that the average of probability have some meaning because the mechanic of repeat when you have a 12 seems to go for a more and more little probability... the probability to a sequence (order is important here) is the multiplication of all the isolated probabilities.

To roll a 12 of a 12-sided die the probability is p=1/12. To have two 12 (consecutively) the probability is p^2=1/144...

The probability for 12+n (where n is different of 12) is just p^2=1/144... the probability to take a cumulative value of 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 and 23 is the same and is p^2=1/144. The probability to take values from 1 to 11 is p=1/12...

So the values from 13 to 23 have a probability of p^2, throwing just one die of course. The probability from 25 to 35 (you cant take the value of 24) is p^3, and so on.

So your distribution of probabilities in this case is

  • P(X)=(1/s)^(X+1 mod s), where s is the number of sides of the die and X the accumulated value

  • in the case of 12 is P(X)=(1/12)^(X+1 mod 12)

  • * As a group the probability of a 12+n result is p=1/12, the same as any simple throw... because is the probability of have a 12 that is p=1/12.

To expand this to throws of more than one die you must calculate before the cumulative binomial that I showed before for X>=1 in a n number of throws (with the probability p=1/12 in your case of a die of 12 homogeneous sides and the condition to have at least one 12 on the throws).

apertotes
Offline
Joined: 08/04/2014
mmm... i do not know if i am

mmm... i do not know if i am following you (heck, more than probably i am not). I do not want to know the probability of rolling a 34, I would like to know the expected value of a roll of n dice with the rules above so that i can track the improvement in rising the attack of a unit from 4 to 7 and know more or less what it means. Like, is the average roll going to increase from 9.3 to 10.7, or is going to rise up to 13.5?

I hope i explained myself better this time. It is very difficult to talk about unkown stuff in a second language.

But thanks a lot for your help.

Masacroso
Offline
Joined: 05/05/2014
apertotes wrote:mmm... i do

apertotes wrote:
mmm... i do not know if i am following you (heck, more than probably i am not). I do not want to know the probability of rolling a 34, I would like to know the expected value of a roll of n dice with the rules above so that i can track the improvement in rising the attack of a unit from 4 to 7 and know more or less what it means. Like, is the average roll going to increase from 9.3 to 10.7, or is going to rise up to 13.5?

I hope i explained myself better this time. It is very difficult to talk about unkown stuff in a second language.

But thanks a lot for your help.

Ok, I understand. This is very interesting because is a limit of a discrete variable.

I have a formula:

where M is the average value and N is the number of sides of a homogeneous and standard 1 to N die (your case N=12).

This formula is for the case of throwing only one die and repeating the throw and sum if you get the higher value (the N value, in your case is 12).

To know the average value is needed to know how the series of the summation evolves (studying it convergence or limit) but I will see this in another moment.

Generalize the formula to a n number of throws (or another value as condition of repeating) is possible (I need to do some calculus with permutations with repetitions).

After I can try the ultimate case when you can lesser the accumulated value if you have a 1.

Thank you for the fun man but I dont have more time to this today. Of course surely I will continue tomorrow or so :p. Bye.

apertotes
Offline
Joined: 08/04/2014
WoW. Thanks a lot. I'll wait

WoW. Thanks a lot. I'll wait anxiously for your next message.

But there is one thing I do not understand in your formula. If you roll 1 die, and do not roll a 12, the expected value is (N+1)/2, right? Or is the (N-1)/2 in your formula representing something different?

Masacroso
Offline
Joined: 05/05/2014
apertotes wrote:WoW. Thanks a

apertotes wrote:
WoW. Thanks a lot. I'll wait anxiously for your next message.

But there is one thing I do not understand in your formula. If you roll 1 die, and do not roll a 12, the expected value is (N+1)/2, right? Or is the (N-1)/2 in your formula representing something different?

The expected value is the sum from 1 to N-1 divided between all the cases (that is N-1), that is N/2 (the sum from p to q values is (p+q)(q-p+1)/2).

If you "dont roll a 12" is the case of a die of 11 sides because you eliminated the possibility of the 12. This expected value is (11*12)/(2*11)=12/2=6 that is N/2 thinking that N=12 altough we are talking of a die of 11 sides.

See that to clear your mind. And remember that after the sum of the powers to know the average value you must divide between the number of cases (=sides).

Maybe this discussion is of your interest where I try to put a meaning in percent probability about it relation to amount of "determination/randomness" (predictability/unpredictability).

X3M
X3M's picture
Offline
Joined: 10/28/2013
Yesterday my computer crashed

Yesterday my computer crashed while writing a comment.

What you are looking for is the help of several simulation writers on this forum.

Then they give you the results in a nice looking list.

It starts with:
1 Die = 6,500
2 Dice = 8,486
3 Dice = 9,479
etc.

That is for the first question that you asked.
I know that I didn't put 4 to 15 here. Because it is hard math.

Further, it isn't hard to imagine that the average will slow down in the increasing immensely. This means that having 7 or 8 dice, it will probably not matter at all any more. While there is still a clear difference between the first 3 dice.

Further, having your second question and so on to be answered, you really need a simulator. Using only formulas wont get you there.

apertotes
Offline
Joined: 08/04/2014
Well, I found the solution

Well, I found the solution for the easy part. The formula for the expected value of the highest number in a roll of n 12-sided dice is: 12-(1^n+...+11^n)/12^n

and so the expected value for n dice is:

n=1 ---> 6.5
n=2 ---> 8.486111111
n=3 ---> 9.479166667
n=4 ---> 10.07224151
n=5 ---> 10.465326
n=6 ---> 10.74414397
n=7 ---> 10.95155734
n=8 ---> 11.11138028
n=9 ---> 11.23790309
n=10 ---> 11.34022116
n=11 ---> 11.4243995
n=12 ---> 11.49463816
n=13 ---> 11.55393828
n=14 ---> 11.60450165
n=15 ---> 11.64798044

Still do not know how to proceed with the advanced tasks.

Thanks everybody for your help so far!

X3M
X3M's picture
Offline
Joined: 10/28/2013
First advanced one, is too advanced?

For the first advanced one.

You need to calculate the chance on getting 1 x 12 for 1 die. Than multiplying this chance (1/12) with the average score for when you throw 1 die. Of course you also have 1/144 to add, then 1/12^3, 1/12^4 etc.

The new average is 7,091 instead of 6,500

For 2 dice however, things already go differently. Not only do you need to add the possibility for 1 die to end up with 12. Also a, what if 2 dice both have a 12, or only 1 of them has a 12? Not only that, but each double 12, has a chance of giving just 1, or 2 times a 12 in the next roll.

Now, for 1 die, the chance is 1/12 to get 12.
and for 2 dice, the chance is 22/144 to get 1 x 12.
and for 2 dice, the chance is 1/144 to get 2 x 12.

With the first, only the first is possible to repeat.
With the second, only the first one is again possible to repeat.
With the third, all 3 are possible to happen.

10,765 instead of 8,486
But I am starting to doubt myself a lot now.

Well, I could continue. But perhaps it is better if you PM someone that knows how to create simulators.

Masacroso
Offline
Joined: 05/05/2014
Im getting some fun with

Im getting some fun with these things.

The series of my previous formula

is convergent (I see it with the root test and the help of a mathematical graphic software). This means that exist a average, a expected value.

This expected value can be evaluated on any mathematical software but I will try to see if I can obtain a explicit formula for the series.

Second thing. I have a formula for the average expected value when you do some throws and you choose the greatest value of all of them (no rerolls this time, maybe other day, just average value for a set of throws with this rule about greatness)

where s is the total number of sides of the dice, and n is number of throws. And of course M is the average value from a set of n throws.

Detailed info if you want to understand something about this:

Where P(f,n) is the probability to obtain a f final value of the n throws of the dice when you only take the greatest of all of them. This means, e.g., that P(5,7) is the probability to obtain on 7 throws the number 5 as the greatest value (so the final value is 5).

Third and last thing (by now :p): this text maybe very interesting for you guys.

Masacroso
Offline
Joined: 05/05/2014
Dont trust in the formula on

Dont trust in the formula on commentary #4, I just was drunk (joking), it is complete bullshit.

The correct one is this:

This formula calculates the average value when you roll a dice and you reroll and sum if you get the hightest value of the dice.

As you can see the series aproximates very fast to it limit because it ratio of growth is inverse to an exponential function.

So you can have a significant estimation of the average setting with n < 7.

  • n is the number of layers of a group of results with the same probability

(If you dont see the applet correctly try this URL.)

apertotes
Offline
Joined: 08/04/2014
Hey! That looks magnificient,

Hey! That looks magnificient, but I am unable to see it complete. Even on the external link, the green table on the rigth is incomplete.

But there is something I do not understand. For n=2, the expected value on that graphic seems to be 6.9 or something like that (on the table I can only see the 6, so I am trying to guess based on the graph).

But I know that the expected value of 2 dice of 12 sides is 7.48 without rolling again with a 12, and my intution tells me that if you get a chance to reroll with a 12 and add to your score, the expected value should be higher, right?

Also, with 1 dice the expected value is 6.5, so it seems odd that in that table the expected value is 5.5.

And finally, it seems that the limit is somewhere around 7 or 7.1, but I am sure that it should be well over 12, maybe even as high as 18 or 19.

X3M
X3M's picture
Offline
Joined: 10/28/2013
The table that he produced is

The table that he produced is sort of the same as the re-roll that I calculated for just 1 die.

Just like him, I too had those other numbers when limited in the number of re-rolls.
But if you can re-roll infinitely every time when you have a 12. Then that 7,091 is indeed the correct answer.

His 5,5 is however odd. Although it is at 0 rolls? Maybe a little change is needed to give an correct 6,5?

apertotes
Offline
Joined: 08/04/2014
Well, that is certainly

Well, that is certainly strange. I mean, the expected value of the highest number out of 2 dice of 12 sides is 8.48

I would assume that if you were given the option to roll more dice to add to your score if you roll a 12, then that expected value would increase, not decrease. Strange math!

Masacroso
Offline
Joined: 05/05/2014
There is a link to a gif with

There is a link to a gif with the same info than in the applet of commentary #11.

apertotes wrote:
Well, that is certainly strange. I mean, the expected value of the highest number out of 2 dice of 12 sides is 8.48

I would assume that if you were given the option to roll more dice to add to your score if you roll a 12, then that expected value would increase, not decrease. Strange math!

I dont follow you here guy. The applet that I post on commentary #11 is just for when you throw only ONE dice with the rule of reroll-and-sum-when-max. For a D12 de average value is about 7.1, for a D6 is about 4.2 and for a D20 is about 11.1.

For the case of more than one dice you need another formula. Maybe I will develop something related to this because seems interesting for fine tunning probabilities.

The standard deviation is another important thing to know because it show how strongly the random throws can be deviated from the average value. This means more or less degree of randomness on the final value of a throw.

Third thing. The formula on commentary #10 is WRONG, sry guys. The correct one is this

  • for P(1)=(0^0)/D^n what is a indeterminate form but it value on this context is 1, so P(1)=1/D^n

Where X is the average and P the probability for M, and M is the maximum value on the throws. Of course D is the number of sides of the dice, and n the number of dice you throw (remember: there is no reroll or sum in this case, you only get the greater value on the dice).

(k is the internal number of exactly k success of M on a number n of dice.)

I tried to create a java applet here.

Masacroso
Offline
Joined: 05/05/2014
apertotes wrote:Well, that is

apertotes wrote:
Well, that is certainly strange. I mean, the expected value of the highest number out of 2 dice of 12 sides is 8.48

I would assume that if you were given the option to roll more dice to add to your score if you roll a 12, then that expected value would increase, not decrease. Strange math!

Ah! I understand now... yes it is 8.486. But this is because you arent doing a sum with the dice, what you are doing is taking the maximum value of all rolled dice.

We need to compare this result with the simple average sum to see what is happening or if something is wrong.

X3M wrote:
The table that he produced is sort of the same as the re-roll that I calculated for just 1 die.

Just like him, I too had those other numbers when limited in the number of re-rolls.
But if you can re-roll infinitely every time when you have a 12. Then that 7,091 is indeed the correct answer.

His 5,5 is however odd. Although it is at 0 rolls? Maybe a little change is needed to give an correct 6,5?

No, no... the 5.5 is correct because when n=0 this is very different of the simple average. It is a different thing... the only real value of X is when n is infinite... in lower numbers the estimation is very poor and isnt the case for the simple average without reroll (that is 6.5).

This is because _n_ is a "layer" of a group of numbers with the same probability. So when n=0 Im calculating a "partial" dice without the last digit.. so it is a different thing of the simple average.

These things, in this case, dont have relation to physical reality.

apertotes
Offline
Joined: 08/04/2014
Masacroso wrote: I dont

Masacroso wrote:

I dont follow you here guy. The applet that I post on commentary #11 is just for when you throw only ONE dice with the rule of reroll-and-sum-when-max. For a D12 de average value is about 7.1, for a D6 is about 4.2 and for a D20 is about 11.1.

For the case of more than one dice you need another formula. Maybe I will develop something related to this because seems interesting for fine tunning probabilities.

Ah! Now I understand! I thought n was the number of dice rolled, but it is the layers of repetitions for repeated 12s, right?

Masacroso
Offline
Joined: 05/05/2014
apertotes wrote:Masacroso

apertotes wrote:
Masacroso wrote:

I dont follow you here guy. The applet that I post on commentary #11 is just for when you throw only ONE dice with the rule of reroll-and-sum-when-max. For a D12 de average value is about 7.1, for a D6 is about 4.2 and for a D20 is about 11.1.

For the case of more than one dice you need another formula. Maybe I will develop something related to this because seems interesting for fine tunning probabilities.

Ah! Now I understand! I thought n was the number of dice rolled, but it is the layers of repetitions for repeated 12s, right?

Yes but you are mixing topics... I put basically 2 formulas:

1) For throw ONE dice and reroll and sum if you get the maximum value (this is the gif). On this topic n dont means something real... is just a abstract number to order layers of probabilities. It doesn't means rolls or dice. The layers are partials calculus over different number of rerolls.

When n=0 there is the partial value to the average without taking in account any reroll (layer zero). For n=1 there are the values that are added to layer 0 for one reroll (without taking in account possible more rerolls). For n=2 for 2 rerolls, etc...

But any number of layers but infinity can show us real values of the average, but it falls so fast to numbers completely negligible so you can get easily a very good and useful estimation.

2) Rolling n dice and taking the maximum value for all of them (e.g.: rolling 3 D6 I get 4, 5 and 1... so the value of the play is 5 because is the maximum of all). On this topic n means number of dice you throw.

I created some formulas here to know the probability of get a specific value or the average value for the mechanic. Maybe more interesting to know the cumulative probability for some value (taking a value greater or equal to) but this is easy to track (you only must sum some individual probabilities).

3) I have for you (or me, or anyone :p) two more formula that maybe interesting. One to know the average of a throw of any amount of dice, and the other is a generalization of the throw discussed on 1): the reroll and sum of a dice if you get a value V or higher, by example taking a 4, a 5 or a 6 on a D6 (instead of just a 6).

But I will show this in another moment.

X3M
X3M's picture
Offline
Joined: 10/28/2013
Quote: No, no... the 5.5 is

Quote:

No, no... the 5.5 is correct because when n=0 this is very different of the simple average. It is a different thing... the only real value of X is when n is infinite... in lower numbers the estimation is very poor and isnt the case for the simple average without reroll (that is 6.5).

I suspected as much that that 5.5 had notching to do with 6.5. :D Although, I couldn't see it yet. But now I do.

Perhaps it is better to post more tables with answers than just the formula's. After all, almost no one understands those formula's. Even some one like me (even though I know what you have posted) has trouble calculating with them if I can't use my calculator ^^.

apertotes
Offline
Joined: 08/04/2014
Masacroso wrote:[ 2) Rolling

Masacroso wrote:
[

2) Rolling _n_ dice and taking the maximum value for all of them (e.g.: rolling 3 D6 I get 4, 5 and 1... so the value of the play is 5 because is the maximum of all). On this topic _n_ means number of dice you throw.

But isn't that the formula I wrote several messages above?

12-(1^n+...+11^n)/12^n -------> this is for 12-sided die, write K instead of 12 and (K-1) instead of 11 to know the general case for fair dice of any number of sides.

Masacroso
Offline
Joined: 05/05/2014
X3M wrote:Quote:No, no...

X3M wrote:
Quote:

No, no... the 5.5 is correct because when n=0 this is very different of the simple average. It is a different thing... the only real value of X is when n is infinite... in lower numbers the estimation is very poor and isnt the case for the simple average without reroll (that is 6.5).

I suspected as much that that 5.5 had notching to do with 6.5. :D Although, I couldn't see it yet. But now I do.

Perhaps it is better to post more tables with answers than just the formula's. After all, almost no one understands those formula's. Even some one like me (even though I know what you have posted) has trouble calculating with them if I can't use my calculator ^^.

Mmm... I dont think so because we are designing games... so we need formulas to fine-tune probabilities.

With formula I can setup variables faster to a concrete probability distribution. Variables are number of dice, number of sides of them or just values non-homogeneous of them, etc... And I can see if is better to "reroll", "sum", "subtract" or "choose" on a dynamic, or see distribution for concrete values or a range of them (greater or equal than...)

And many of these things are very useful for card games too, so I think formula are better to know some details that are not visible when you design the mechanic of a game.

The formula are not hard but I put here completely terminated so you cant "understand" what means these variables or where comes all of this.

I created a general formula for the "sum and reroll" of a die or any number of die. But I will post on a blog or something cause is a bit more long but is simpler and more beautiful that any formula of this topic (the mechanic itself of "reroll and sum" makes the distribution different of a standard binomial but is very similar and is very useful for any conditional event).

Masacroso
Offline
Joined: 05/05/2014
LOL, see this fucking shit!!!

LOL, see this fucking shit!!! This is what I was searching to calculate the probability of a sum on a throw of dice:

http://mathworld.wolfram.com/Dice.html

X3M
X3M's picture
Offline
Joined: 10/28/2013
I doubt that has anything to

I doubt that has anything to do with his question.
Further, that one is one of the oldest analysed dice rolling, kids get that one to do in school.
However, the formula does look interesting.

apertotes
Offline
Joined: 08/04/2014
Well, I have made some

Well, I have made some progress. I have created a Google Sheets document with the expected value of several dice.

The first page is a table with 12 rows (numbered 1-12, one for each side of the die) and multiple columns (34 at the moment, indicating the number of dice rolled).

That table has the following formula on each cell: P = (k^n - (k-1)^n)/s^n

where k=highest number, n=number of dice, s=sides of dice

What this table does is generate the posibilities for each side of the die to be the highest numbered side in relation to the number of dice rolled. For example, the firsts columns of the table are like this:
1 2 3
1 0.083333333 0.006944444 0.000578704
2 0.083333333 0.020833333 0.004050926
3 0.083333333 0.034722222 0.010995370
4 0.083333333 0.048611111 0.021412037
5 0.083333333 0.062500000 0.035300926
6 0.083333333 0.076388889 0.052662037
7 0.083333333 0.090277778 0.073495370
8 0.083333333 0.104166667 0.097800926
9 0.083333333 0.118055556 0.125578704
10 0.083333333 0.131944444 0.156828704
11 0.083333333 0.145833333 0.191550926
12 0.083333333 0.159722222 0.229745370
1.00000000 1.00000000 1.00000000

That was really the hardest part, mathematically speaking. After that, there was a lot of work to create a table on a different sheet referencing cells on the probabilities sheet, but the math was quite easy.

So, the tables on the other sheets are tailored for specific 12-sided dice. For example, a regular 1-12 dice, a 0-11 dice, a 0-11 dice where 0 are failures, a 0-11+ dice, a 2x dice (2, 4, 6,..., 24), a 0,0,0,0,0,0,0,0,0,0,0,12 dice, etc.

To do that, the rows are numbered as values of the side of the dice, in ascending order. The columns remain the same as before (number of dice rolled). And in each cell there is the following formula: i*P

where i is the value of the side of the dice in each row, and P is the value from that same row and column on the probabilities table.

Then we add all the values of each column to obtain the expected highest value when rolling n dice.

For example, the first columns of a dice with 11 sides as 0 and only one side as 12 looks like this:

0 0.00000000 0.00000000 0.00000000
0 0.00000000 0.00000000 0.00000000
0 0.00000000 0.00000000 0.00000000
0 0.00000000 0.00000000 0.00000000
0 0.00000000 0.00000000 0.00000000
0 0.00000000 0.00000000 0.00000000
0 0.00000000 0.00000000 0.00000000
0 0.00000000 0.00000000 0.00000000
12 1.00000000 1.91666667 2.75694444
Exp. value 1.00000000 1.91666667 2.75694444

With this system is incredibly easy to calculate expected values for many different 12-sided dice. For example, if I wanted a system where any 0 would turn the roll into a failure, I would only have to number the rows on the second table as 1,2,3,4,5,6,7,8,9,10,11,0.

And I thought, well, if I want to calculate how the expected value would be affected by rolling an extra dice for every 12, I could use the expected value of a single die when re-rolling with every 12, and put in on the table.

So I created a table with the rows numbered like this: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, (11+6.091)

The first columns are:

1 2 3
0 0.00000000 0.00000000 0.00000000
1 0.08333333 0.02083333 0.00405093
2 0.16666667 0.06944444 0.02199074
3 0.25000000 0.14583333 0.06423611
4 0.33333333 0.25000000 0.14120370
5 0.41666667 0.38194444 0.26331019
6 0.50000000 0.54166667 0.44097222
7 0.58333333 0.72916667 0.68460648
8 0.66666667 0.94444444 1.00462963
9 0.75000000 1.18750000 1.41145833
10 0.83333333 1.45833333 1.91550926
17.091 1.42425000 2.72981250 3.92657813
Exp. value 6.00758333 8.45897917 9.87854572

I noticed that the expected value when increasing the number of dice was capped at aprox. 17, which did not feel right. I am sure that rolling 2000 dice and then rolling again as many dice as 12s, and then again, and again, etc, would almost always grant a value much higher than 17, so I made a change in the formula and decided to use the expected value of each column as the number to add to "11" on the next column. This created a table without any asymptote, which felt much more realistic.

These are the first columns of this table:

1 2 3
0 0.00000000 0.00000000 0.00000000
1 0.08333333 0.02083333 0.00405093
2 0.16666667 0.06944444 0.02199074
3 0.25000000 0.14583333 0.06423611
4 0.33333333 0.25000000 0.14120370
5 0.41666667 0.38194444 0.26331019
6 0.50000000 0.54166667 0.44097222
7 0.58333333 0.72916667 0.68460648
8 0.66666667 0.94444444 1.00462963
9 0.75000000 1.18750000 1.41145833
10 0.83333333 1.45833333 1.91550926
17.091 1.42425000 2.71648900 4.46754936
Exp. value 6.00758333 8.44565567 10.41951696

As a comparison, when using a constant 17.091 as highest row, the expected highest value when rolling 10 dice is 13.87967758, and if we use the expected value of the previous roll + 11, the expected value for 10 dice is 22.16154432, a very large difference.

Now, I am sure that this is probably not the most accurate way to calculate the values. But, how inaccurate would you say it is? Enough as to disregard the values completely?

Also, I still have not found any way to introduce the "1s cancel highest values" condition.

Anyway, I keep on researching. Thanks a lot for your help so far, guys!

Masacroso
Offline
Joined: 05/05/2014
Wow, this is really

Wow, this is really interesting, thanks for the job man.

(I really learned A LOT on mathematics doing these type of tasks.)

I can try about the "first cancel condition", this is all about combinations and it probabilities... the different combinations of 1's and 12's (or whatever other group of numbers).

kos
Offline
Joined: 01/17/2011
Simulation

Using a spreadsheet, I simulated the results of the Advanced challenge (roll Nd12, reroll 12's, keep the highest).

Iterations: 1000
Average result:
- 1 die: 7.2
- 2 dice: 9.8
- 3 dice: 11.3
- 4 dice: 12.5
- 5 dice: 13.5
- 6 dice: 14.2
- 7 dice: 15.0
- 8 dice: 15.5
- 9 dice: 15.9
-10 dice: 16.4

Of course those numbers do not exactly match the theoretical results, but it gives a rough idea of what the probabilities are.

Interesting to note is that the standard deviation slowly increases with the number of dice, starting around 5 and increasing to the low 6's. What this means is that the amount of variability in the rolls is gradually increasing, whereas in typical dice rolling (Nd12, add the results) the standard deviation decreases as the number of dice increases.

The other side effect to note is that the probability curve is a step function, meaning that there are "jumps" in the curve at 12, 24, 36. This is what you would expect, given the exploding dice rule.

Once you get more than 3 dice, it really heavily stacks the results around 10 and 11. That is, for any number of dice greater than 3, around 40% of your results will be 10 or 11 (no matter how many extra dice you add). The effect of adding more dice is that the number of results in the <=9 category decreases while the >=13 category increases, but the 10-11 category stays relatively stable.

---------------------------
Although I didn't model the 1's cancellation rule, I expect that the result would be an even greater concentration in the range 10-11. It wouldn't surprise me if the range 10-11 ended up with 75% of more of the results.

---------------------------
If you were using this dice rolling system as part of a game, I'd recommend that you keep the number of dice lower, say 3 dice for "average" and 5 dice for "excellent". Aside from the impact on the probability curve, the physical aspect of spotting the maximum dice from a group of 10 dice (and then rerolling them) can become time consuming.

Regards,
kos

Masacroso
Offline
Joined: 05/05/2014
I reached the "absurd level

I reached the "absurd level of task" xD.

I did a worksheet with the mechanic with the 1's and eliminations. It was hard and easy at the same time: hard because my knowledge of maths is so low in many areas, and easy because when you understand finally how to calculates these probabilities all is done.

The thing is two binomial distributions, one conditional to the other: the first one is the probability of take 1's, from zero to the maximum number of dice

where a is the number of 1's, D the number of sides of the dice and n the amount of dice you throw.

After is the other binomial conditional to the first .This is for know the probability to take a value V on the throw after eliminations (cause mechanic of 1's) and is

This formula have the probability to have a throw with a low bound on value on V on a specific number a of 1's.

If you multiply the two binomials and sum over a you take the probability for have at least a value of V on the throw. Deleting just the "+1" on the second formula and repeating the sum above explained you take the probability to take at maximum a value of V on your throw.

And if you subtract these two bounded probabilities you take the probability to have exactly a value of V on the throw.

Here you can see a java applet with this and more details as some graphs and tables.

I leave here a general formula for the mechanic of "reroll and sum" for any type of dice, any number or whatever, its very simple:

Where mNR is the average value of the group of events when no reroll happens (if it reroll with 6 in a D6 then mNR is the average from 1 to 5, i.e., 3), and mR is the average value of the events that reroll (if you reroll with a 6 in a D6 the average value is 6).

pNR is the probability of all group (layer) where no reroll happen, and pR when reroll (see that pNR+pR=1).

j just indicates the layer that is evaluating, the only layer with no reroll is when j=0, j=1 is to evaluate the first reroll and so on.

ej is the contributed value of each layer. I dont know (by now) if the infinite series have a explicit form... and it doesnt converges in all cases (when pR>=0.5)

EDIT: I did! :p The series converges completely no matter what because any probability is a number between 0 and 1.

And doing some maths over infinite geometric series the result is

So for the case that start this topic about average value from rolling a D12 dice and reroll and sum when 12:

  • mR=12
  • mNR=6
  • pR=1/12 → X=12/11+6=7,1

LOL

apertotes
Offline
Joined: 08/04/2014
kos wrote:Once you get more

kos wrote:
Once you get more than 3 dice, it really heavily stacks the results around 10 and 11. That is, for any number of dice greater than 3, around 40% of your results will be 10 or 11 (no matter how many extra dice you add). The effect of adding more dice is that the number of results in the <=9 category decreases while the >=13 category increases, but the 10-11 category stays relatively stable.

Well, that sits perfectly with my intentions, which is that increasing the attack value of the unit would not create a huge swing in the results (as would do a simple sum of all dice rolled), but more a kind of security that you would hit your objective. For example, if you need an 8 to hit, rolling an 8 would be as good as rolling a 23. And rolling more dice would slowly increase your chance to succeed. But if you need a 25 to hit, well, you better have a very high attack value, or your chances will be very poor. But never 0, which is what I was looking for. Higher attack values have it easier, but even lower values could get lucky once in a while.

kos wrote:
Although I didn't model the 1's cancellation rule, I expect that the result would be an even greater concentration in the range 10-11. It wouldn't surprise me if the range 10-11 ended up with 75% of more of the results.

Yes, that "absurd level" rule will surely decrease the number of valid 12s, which will reduce immensely the probability of rolling higher than 12. Well, that is one of the intended consequences. Rolling higher than 12 should be a rare achievement. Indeed, my intuition tells me that with this absurd rule the probabilities of rolling a valid 12 is the same (or very similar) no matter how many dice you roll, which seems appropriate with the idea behind re-rolling 12s, which is a very lucky shot. And luck is not really affected by skill, is it?

The other intended consequence for the 1s cancelling high numbers is to offer the possibility of a complete disaster, regardless of the number of dice rolled.

apertotes
Offline
Joined: 08/04/2014
Masacroso

Masacroso wrote:
[Here](http://www.geogebratube.org/student/m146489) you can see a java applet with this and more details as some graphs and tables.

damm, I can never see the full table. Although this one can be seen more than the others you linked, I still can't see the right part of it.

But I have a question, it looks that P(x>v) + P(x < v) is much higher than 1. For example, for D=12, n=1, V=5, P(x>5)=66.67% and P(x < V)=91.67%. That looks strange, right?

In any case, is there anyway to get an expected value from there?

Masacroso wrote:
I leave here a general formula for the mechanic of "reroll and sum" for any type of dice, any number or whatever, its very simple:

...

So for the case that start this topic about average value from rolling a D12 dice and reroll and sum when 12:

* mR=12
* mNR=6
* pR=1/12 → **X=12/11+6=7,1**

LOL

That is awesome! This is always for rolling 1 die, right?

Masacroso
Offline
Joined: 05/05/2014
apertotes wrote:Masacroso

apertotes wrote:
Masacroso wrote:
Here you can see a java applet with this and more details as some graphs and tables.

damm, I can never see the full table. Although this one can be seen more than the others you linked, I still can't see the right part of it.

But I have a question, it looks that P(x>v) + P(x < v) is much higher than 1. For example, for D=12, n=1, V=5, P(x>5)=66.67% and P(x < V)=91.67%. That looks strange, right?

In any case, is there anyway to get an expected value from there?

Damn... I dont know how these applets of java really work (its an auto-export from the geogebra client, after you can "tweak" online but... anyway).

Mmmm... maybe something is wrong, I must check this... something maybe wrong.

Quote:
Masacroso wrote:
I leave here a general formula for the mechanic of "reroll and sum" for any type of dice, any number or whatever, its very simple:

...

So for the case that start this topic about average value from rolling a D12 dice and reroll and sum when 12:

  • mR=12
  • mNR=6
  • pR=1/12 → X=12/11+6=7,1

LOL

That is awesome! This is always for rolling 1 die, right?

Yes. I leave the general formula to know any roll on any number of design of dice.

The best of this is that the formula for the average of ONE homogeneous dice is this

and because this we can know, exactly, the ratio of the "boost" from a normal throw of a dice, i.e., the average of roll-and-sum between the standard average for a dice that is (D+1)/2

So you are "boosting" the average value in a fraction of D-1. So the boost is smaller when you have a dice with more sides.

P.S.: I updated the first "applet" about this.

Syndicate content


forum | by Dr. Radut