Re: Probabilities, random numbers and dice throws

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



A particular ordered roll of dice occurs with probability 1/z^y, multiply that by the number of ordered rolls, c, that can give a particular sum. Assuming that the faces are numbered 1,2,...,z
sum c
<y 0
y 1
y+1 y=COMBIN(y,1)
y+2 y(y+1)/2=COMBIN(y,1)+COMBIN(y,2)
y+3 y(y+1)(y+2)/6
=COMBIN(y,1)+MULTINOMIAL(1,1,y-2)+MULTINOMIAL(1,1,1,y-3)/3!
...
The logic for y+3 is that
- one die could have 4, with the rest all 1's
- one die could have 3, another could have 2, with the rest all 1's
- three dice could have 2, with the rest all 1's


In the last case, MULTINOMIAL(1,1,1,y-3) is the number of ways to choose locations that do not contain 1, but since all of those locations contain the same value, MULTINOMIAL will overcount by a factor of 3!

You have to be careful to not overcount cases where multiple dice contain the same value. You also have to be careful for y+k where k>=z, since it is no longer possible to have y-1 dice all with 1's and the rest of the sum on a single die.

For 1<k<z,
  sum(c[i],i=1..y+k) = Product(y+i,i=1..k)/i!
which gives individual c's by subtraction, but this will overcount for k>=z.

You can take advantage of symmetry, since
  Pr(sum=y*z-k) = Pr(sum=y+k)
for k>=0

Jerry

Galamdring wrote:

Greetings,

I have been trying to make a worksheet in excel 2003 to calculate
probabilities associated with dice throws... I am setting it up so that
i can define the number of dice i want to roll and also the number of
sides they have... I found that rand between is a good way to simulate
it...

My problem is with probabilities. Is there a function or a way to
automatically calculate the probability of having a result of x as the
sum of y dice with z sides each? The prob function requires you to have
an array with results and probabilities... It is too cumbersome to make
by hand for... say... 40 eight sided dice!

Thanks in advance :)

.



Relevant Pages

  • No result is likely - Part IV (conclusion)
    ... "When do the dice know that it's time to give the player the win so ... To sum up: ... to be able to calculate the probabilities of different outcomes, ...
    (rec.gambling.craps)
  • Re: Chances of (random(0,n) + random(0,n) <= m)
    ... what is the chance of the sum being less than or equal to m? ... the sum of two such picks is n, ... You can get some insight into this by working out the probabilities ... The individual dice are each 1-6 in equal ...
    (sci.math)
  • Re: Dice setting
    ... effect of different degrees of efficacy at altering the probabilities. ... can keep the dice "on axis". ... on the comeout roll?" ...
    (rec.gambling.craps)
  • Re: OT: Agnoticism (WAS: Making money from Java)
    ... >> rolling a 3 if 1/6, but person B might know that the dice is rigged, that ... >> the probability of rolling a 3 is actually 2/3. ... >> different religions might have different probabilities of turning out to ...
    (comp.lang.cobol)
  • Re: Streaks, Trends, & Qualified Shooters.
    ... >> never know what the dice will offer, all you can do is decide how much ... >of rolls. ... Contrast Timmy's statement with ACDOC. ... ACDOC alleges that long-term probabilities are essentially irrelevant ...
    (rec.gambling.craps)