Formula for calculating probability on customized dice.

107 Views Asked by At

Given the following: Player may choose from among the following:

1-10 White dice [0,0,0,1,1,2]
0-40 Blue dice [0,0,1,1,1,2]
0-10 Red dice [0,1,1,1,1,2]

and rolls them. What is the formula to calculate the probability that xWhite + yBlue + zRed ≥ D where D is an arbitrary whole number, i.e. 8.

I know this can be brute forced for each combination, but is there a simple formula to do this?

2

There are 2 best solutions below

0
On

For reasonably large numbers of dice you can use the normal approximation. Compute the mean and variance for each kind of die. For example, a blue die has a mean of $\frac 16(0+0+1+1+1+2)=\frac 56$ and a variance of $\frac 16(0^2+0^2+1^2+1^2+2^2)-(\frac 56)^2=\frac {17}{36}.$ The sum will be (approximately) normally distributed with mean the sum of the means and variance the sum of the variances. Compute how many standard deviations high or low you are compared to the mean and use a z-score table. I would guess $10$ or $12$ dice would get you reasonably close, but am just guessing. For smaller numbers you can just do it in a spreadsheet, computing the probability of each sum for a pair of dice, then adding in another, and so on.

0
On

Worked it out using Generating functions.

These dice can be expressed as:

(1/2 + x/3 + x^2/6)^W (1/3 + x/2 + x^2/6)^B (1/6 + (2 x)/3 + x^2/6)^R

where W, B, and R are the quantities of each dice.

Expand out into polynomials, then sum up the coefficients starting with the Dth Term (D being the target value). Set that to 1-result and you have your probability of D or higher.