• The VOIDRUNNER'S CODEX is LIVE! Explore new worlds, fight oppressive empires, fend off fearsome aliens, and wield deadly psionics with this comprehensive boxed set expansion for 5E and A5E!

5D6 drop the lowest two (math ?)

Nathan

First Post
Re: Re: Re: Re: Analytical solution

dcollins said:


Ah, one more thing, Nathan:
Should that first summation be "the sum over l = 1..d" ?
Ah, yeah, of course. I have been obviously to sleepy recently...

Have you understood how to derive the summation formula for the 1 + 2 + ... + n?

Nathan
 

log in or register to remove this ad

dcollins

Explorer
Yes, thanks... I've known that for [cough] longer than I care to admit, just didn't associate it with the name "Gaussian formula".

I'm still investigating how that's helpful at that point... but more importantly, hoping to verify your formula numerically. (And even more more importantly, hoping to generate a probability mass function at some point, i.e., P(x=X)=? where X is some specific final result of the roll.)
 
Last edited:

dcollins

Explorer
Next set of questions:

- I guess the formula is invalid for k=0 (the case where you're not dropping any low dice -- l and r and the second summation are undefined)?

- On the first series of summations, where l = 1, and r = 0, how is it not undefined to have the third term (l-1)^r = 0^0?
 
Last edited:

LazarusLong42

First Post
dcollins said:
Of course, what I was responding to was your original comment was that it was "easier to program", not that it's "faster to execute". What you're saying now may in fact be true for sizable numbers of dice (like 20d6).

But again, what you specify above is an easy problem -- I believe there's a formula for that directly implied by standard probability theory. The hard part is "drop k dice", for which fundamental techniques exist that every programmer knows, whereas to date I've never seen a concise mathematical formula which solves the problem.

On the first: yeah, I got hung up for a moment on "easier to program" versus "easier to get a result for." :)

What's specified (20d6) is, to be certain, a relatively easy problem, but the formula implied by probability theory still involves a summation. This is because the die rolls don't create an actual normal distribution; they create a binomial distribution. The formula standard formula for a single type of die is described here. That's the best standard probability theory does.

I'm still working on the dropping problem, though; combining the standard formula linked with Nathan's work isn't going to be easy. :)
 

dcollins

Explorer
Let's take a trivial situation where we're rolling 2d1 and dropping 1 die. Clearly every roll is 1, so the average has to be 1. Define "choose" aCb = (a over b). Unfortunately, the proposed formula gives us (assuming 0^0 defined to be 1):

n=2, d=1, k=1.
AVG = 1/2 * sum (l=1) sum (r=0) sum (u=1, 2) [stuff]
= 1/2 * ([2C0 * 2C1 * 0^0 * (0 + 1*(1-1))] + [2C0 * 2C2 * 0^0 * (1 + 0*(1-1))]
= 1/2 * ([1*2*1*0] + [1*1*1*1])
= 1/2 * (0 + 1)
= 1/2

This is the same result given by a short .c program I've written to verify this. The same program gives degenerate results such as AVG(2d6 drop 1) = 483 and AVG(5d6 drop 2) = 31,533. Source file linked below (as .txt).

Comments about this analysis?
 

Attachments

  • diceprob.txt
    2.5 KB · Views: 119
Last edited:

LazarusLong42

First Post
<blinks>

I hadn't even noticed the 0^0 that crept in there. 0^0 is not only not 1--it's completely undefined. So... that means back to the drawing board.
 

sithramir

First Post
I took a 400 level statistics course and know a function in my calculator that solves this problem quit easily. I "attempted" to look at your guy's math and it made my head hurt. ;)
 

Nathan

First Post
dcollins said:
Yes, thanks... I've known that for [cough] longer than I care to admit, just didn't associate it with the name "Gaussian formula".

I'm still investigating how that's helpful at that point... but more importantly, hoping to verify your formula numerically. (And even more more importantly, hoping to generate a probability mass function at some point, i.e., P(x=X)=? where X is some specific final result of the roll.)
I have associated the formula with Gauß as there is an anecdote about him: when he was a 9-year-old pupil in school, the teacher was a little bit lazy and wanted to give his pupils an exercise which to solve would have taken some time for them. He asked them to add the first 100 positive integers.

Everyone started to add on number after the other. Except Gauß. He added:
1+100 + 2+99 + 3+98 + ... 50+55
= 101*50 = 5050.

However, I don't know if it is canon to name this formula by Gauß.

About the probability mass function:

Maybe the partition function P(n) will come into play if one tries an analytic solution.

The partition function P(n) is defined by:

P(n) = number of ways to write n as a sum of weakly increasing positive integers.

For example P(2) = 2, as 2 = 1 + 1 and 2 = 2.

Problem here: our dice rolls don't come up sorted.
 

Nathan

First Post
dcollins said:
Next set of questions:

- I guess the formula is invalid for k=0 (the case where you're not dropping any low dice -- l and r and the second summation are undefined)?

- On the first series of summations, where l = 1, and r = 0, how is it not undefined to have the third term (l-1)^r = 0^0?
The formula doesn't make sense for k = 0, that is right. If you want a formula that makes sense for this case too, let l be the lowest die that won't be dropped. This is always well-defined.

To define 0^0 = 1 makes algebraically perfectly sense. And it should be defined this way as the multiplicator we need is in fact 1.

The problem with 0^0 occurs in calculus. 0^x is only continuous in 0 if you define 0^0 = 0, x^0 is only continuous in 0 if you define 0^0 = 1. Still, the "right definition" is 0^0 = 1 in this case.

Why is this right? Because it makes sense in any ring R with a unit.
 

Nathan

First Post
dcollins said:
Let's take a trivial situation where we're rolling 2d1 and dropping 1 die. Clearly every roll is 1, so the average has to be 1. Define "choose" aCb = (a over b). Unfortunately, the proposed formula gives us (assuming 0^0 defined to be 1):

n=2, d=1, k=1.
AVG = 1/2 * sum (l=1) sum (r=0) sum (u=1, 2) [stuff]
= 1/2 * ([2C0 * 2C1 * 0^0 * (0 + 1*(1-1))] + [2C0 * 2C2 * 0^0 * (1 + 0*(1-1))]
= 1/2 * ([1*2*1*0] + [1*1*1*1])
= 1/2 * (0 + 1)
= 1/2

This is the same result given by a short .c program I've written to verify this. The same program gives degenerate results such as AVG(2d6 drop 1) = 483 and AVG(5d6 drop 2) = 31,533. Source file linked below (as .txt).

Comments about this analysis?
Aaargh!!! I really have made every typing mistake one could have made posting the deduction!

The denominator has to be d^n, not n^d, of course...
 

Voidrunner's Codex

Remove ads

Top