PDA

View Full Version : Dice Math Question



Craft (Cheese)
2013-06-29, 08:08 AM
Let's define a die type called a dC. A dC is like a d6 that we interpret with the following rules:

On a 1, add 0 to the total of the roll.
From 2 to 5, add 1 to the total.
On a 6, add 1 to the total, then roll another dC (this applies recursively if you roll more 6's).

(Essentially, a dC works like a World of Darkness roll, except it's a d6 instead of a d10 and the target number is 2 or higher.)

The expected value of NdC is N.

Where I'm at a loss: How do I go about calculating the standard deviation and skewness of a distribution of dCs?

Delvin Darkwood
2013-06-29, 08:52 AM
I certainly lack the statistical knowledge to help you here. But, i believe anydice (http://www.anydice.com) certainly can. Its calculates dice probabilities, you can insert your own dice functions and such, and it has support for exploding dice.

Craft (Cheese)
2013-06-29, 08:59 AM
I certainly lack the statistical knowledge to help you here. But, i believe anydice (http://www.anydice.com) certainly can. Its calculates dice probabilities, you can insert your own dice functions and such, and it has support for exploding dice.

Its exploding dice calculator can only handle finite recursion depths: If you want to do an infinite series then it can't handle the convergences for you.

Thanks for the suggestion anyway, though!

Tarqiup Inua
2013-06-29, 09:10 AM
(mind that part of the calculation was done using this (http://www.wolframalpha.com/input/?i=%28sum+of+%28n%5E2%29%2F%286%5En%29%29+for+n+go ing+from+1+to+infinity))

Alright... wikipedia article (http://en.wikipedia.org/wiki/Standard_deviation#Basic_examples) for those, who are not sure, what is standard deviation...

We can adjust this formula a bit for our infinitely more devious case (heh, heh)

Lets take a look at the numerator - in our case it will be (0-1)^2 + (1-1)^2 + (1-1)^2 + (1-1)^2 + (1-1)^2 + 1/6*((1-1)^2) + (1-2)^2 + (1-2)^2 + (1-2)^2 + (1-2)^2 + 1/6*((1-2)^2 + (1-3)^2) + (1-3)^2) + (1-3)^2)...etc. (those are squared differences between average value and value corresponding to the throw)

Which can be rewritten by adding together the squares of same numbers:
1 + (25/6)*0 + (25/36)*1 + (25/216)*4 + (25/1296)*9... etc.

Which can be further rewritten:
1 + (25/6)*(sum of (n^2/6^n) for n going from 0 to infinity)
...
1 + (25/6)*(42/125)
...
so the numerator is 1 + 7/5 = 2.4

So the standard deviation is actually sqrt(2.4/6) = sqrt(0.4) = 0.63 or something...

There could still be an error, yeah

Jay R
2013-06-29, 09:47 AM
First, the distribution is
0, with probability 1/6
1, with probability 25/36
2, with probability 25/216
3, with probability 25/1296
etc.

The variance is the expected value of the deviations from the mean squared. I calculated it in Excel to be 0.4, which makes the standard deviation 0.632456

Var = (1*1/6) + 0*25/36 + 1*25/216 + 4*25/1296 + ...

The skewness is the expected value of the deviations cubed, divided by sigma cubed. That came to 0.9487.

Craft (Cheese)
2013-06-29, 04:52 PM
Thanks guys, though I'm still not sure how to expand this to pools. How would you go about calculating the properties of 2dC, or 3dC, or 5dC?

meschlum
2013-06-30, 04:59 AM
Each of your dC is independent, so the standard deviation of the whole is the square root of the sum of squares.

Since StDev^2 = 0.4, rolling n dC gives you StDev(n dC) = sqrt(0.4 * n).

Skewness is Skew(n dC) = Skew(1 dC) / sqrt(n).

Simple!

Craft (Cheese)
2013-06-30, 10:15 AM
Each of your dC is independent, so the standard deviation of the whole is the square root of the sum of squares.

Since StDev^2 = 0.4, rolling n dC gives you StDev(n dC) = sqrt(0.4 * n).

Skewness is Skew(n dC) = Skew(1 dC) / sqrt(n).

Simple!

Ooh, I didn't know these tricks. Thanks!