PDA

View Full Version : Some game statistics math



Yakk
2006-12-23, 03:41 PM
E is "Expected value". Otherwise known as "average".
V is "Variance". It measure how spread out your results are.

1.96*sqrt(V) is the statistical 95% confidence interval. In general, such a confidence interval only really works after you add up a reasonable number of random events (such as 3d6).

E(1dX) = (1+X)/2
V(1dX) = (1+X)(1-X)/12

V(1d1) = 0 (aka, +1)
V(1d2) = 3/12 = 1/4
V(1d3) = 8/12 = 2/3
V(1d4) = 15/12 = 1 & 1/4
V(1d6) = 35/12 =~ 2.9
V(1d8) = 63/12 = 5 & 1/4
V(1d10) = 99/12 = 8 & 1/4
V(1d12) = 143/12 =~ 11.9
V(1d20) = 399/12 = 33 & 1/4
V(1d100) = 9999/12 = 833 & 1/4

Both E and V are linear when you add multiple dice together. Ie:
V(2d6) = V(1d6)*2
and V(1d4+1d6-1d8) = V(1d4) + V(1d6) + V(1d8)

When you multiply dice by a constant K, E goes up by K, while V goes up by K^2.

Ie:
V(1d6 * 2) = 4 * V(1d6) > V(2d6)
E(1d6 * 2) = 2 * E(1d6) = E(2d6)

If you have a situation like "roll 1d20. On a 20, event A happens, otherwise event B happens"
E = 1/20 * E(A) + 19/20 * E(B)
V = 1/20 * V(A) + 19/20 * V(B) - 2 E(A)*E(B)*1/20 * 19/20

If the chances are different, the 1/20 and 19/20 fractions change.

So, for hit-or-miss, where B is miss, E(B) = 0 and V(B) = 0. So
E = hit_chance * E(hit)
V = hit_chance * V(hit)

For crits... well it gets more complicated. :)

magic8BALL
2006-12-25, 08:12 PM
sure, and this post on year 10 maths proves..?

Put somthing decent up there:

on 2d6 (greatsword) it is:
1/6 likely to score average of 7.
1/36 likely to score max of 12.
1/36 likely to score min of 2.

vs

on 1d12 (greataxe) it is:
1/12 likely to score max of 12.
1/12 likely to score min of 1.
THERE IS NO AVERAGE, AS EACH OUTCOME IS JUST AS LIKELY AS EACH OTHER ON ANY SINGLE DICE ROLL EVER!!!

If you have a number of dice, ydx:
the average outcome = (y/2)*(x+1)
max value = y*x
min value = y
there are also x^2 possible outcomes, with the average hapening x times, the max and min one time each.

so between 6d10 and 10d6:
6d10 rolls higher more often.
6d10 rolls lower mor often.
contradiction? No.

Its just 6d10 is more ramdom, lots of small dice is not "higher on average", it's "more likely to roll average".

Of cause, nothing beats rolling a single dice, and seeing two digets come up for damage...

danielf
2006-12-25, 08:29 PM
don't forget the Murphy's law :)

Yakk
2006-12-26, 12:40 AM
sure, and this post on year 10 maths proves..?

Put somthing decent up there:

on 2d6 (greatsword) it is:
1/6 likely to score average of 7.
1/36 likely to score max of 12.
1/36 likely to score min of 2.

That is what the variance describes.

V(2d6) = 2*V(1d6) = 70/12
V(1d12) = 143/12

Notice that the Variance on 2d6 is much smaller than the Variance on 1d12. This reflects the greater tendency towards the central when you roll 2d6 than when you roll 1d12.


vs

on 1d12 (greataxe) it is:
1/12 likely to score max of 12.
1/12 likely to score min of 1.
THERE IS NO AVERAGE, AS EACH OUTCOME IS JUST AS LIKELY AS EACH OTHER ON ANY SINGLE DICE ROLL EVER!!!

There is an average -- a mean. There is no mode. There is a median as well, which happens to equal the mean.


so between 6d10 and 10d6:
6d10 rolls higher more often.
6d10 rolls lower mor often.
contradiction? No.


6d10 has a Variance of 594/12.
10d6 has a Variance of 350/12.

This means 10d6 will tend towards the mean (average) more than 6d10 will, because it has a smaller Variance. Variance is a measure of how tightly the random results tend to cluster around the mean.

If you have a large enough set of random variables, you can use the central limit theorem and quickly calculate a decent approximation to the distribution of results from a series of die rolls.

That is why I thought this might be interesting. :) I'm going to toss out some simple uses of it in a bit. But for now, it is the midnight of Christmas, and I'm going to go snug in my bed! :)