multiple dice rolls where each dice has a different number of sides.

cathalpaint

New Member
Hi all,
I would appreciate any and all help given.
Abstract of the problem:
How can I calculate the probability of any given number turning up after 2 or more dice rolls, where first dice calculates the probability of what dice gets thrown on the 2nd roll. There is a 1/6 chance that the 2nd dice roll will be a (d=dice) d4, d6, d8, d10, d12 or a d20.

My goal is to write an equation to use in a program called Processing (based on Java but more aimed at visual artists.) The code would create an abstract composition based on probability. I'd like to use the system I'm performing manually.

I have a system for creating abstract paintings that uses dice. All variables are calculated using multiple dice rolls. (If something can vary then I roll the dice to calculate it.)
I have six types of dice d4, d6, d8, d10, d12, d20. I roll a d6 to select the next dice to roll. 1=d4, 2=d6 3=d8 etc.. and roll that dice to get my final value. Now I get that the probability of any of the dice I roll turning up is 1/6, and that the subsequent probabilities are 1/4, 1/6 etc.. for the 2nd dice roll where I get lost is what is the probability for any given digit on any dice turning up.
i.e. what would the probability of rolling a 2 on the second dice roll be.

I would like to know how to calculate this in steps and how I would give the probability of each digit turning up a value between 0 and 1.

Thanks for taking the time to read this. If you can help or would like more clarification then please let me know.

updated @ 1457:

I think I've worked it out but I did so using a table of results, as 1/60 or .017? is that right? I still can't calculate it as an equation like (forgive the crass nature of the following) :

dX=1/X=n - where X is the number of sides of the first dice and n the % chance
n = 1/T = N -where T is the total number of sides of the dice being rolled and N = the % of final number
is it then n*N or n+N or some other letter like I've not even considered

Last edited:

BGM

TS Contributor
All dices are fair? And the result of first toss only affect the choice of dice, but not the result of the toss after the dice is chosen? (independent)

If yes, by law of total probability, conditional on the result of the first toss, we have the following pmf:

$$\Pr\{X = x\} =$$

$$\frac {1} {6} \times \left(\frac {1} {4} + \frac {1} {6} + \frac {1} {8} + \frac {1} {10} + \frac {1} {12} + \frac {1} {20} \right) = \frac {31} {240} ~~ x = 1, 2, 3, 4$$

$$\frac {1} {6} \times \left(\frac {1} {6} + \frac {1} {8} + \frac {1} {10} + \frac {1} {12} + \frac {1} {20} \right) = \frac {7} {80} ~~ x = 5, 6$$

$$\frac {1} {6} \times \left(\frac {1} {8} + \frac {1} {10} + \frac {1} {12} + \frac {1} {20} \right) = \frac {43} {720} ~~ x = 7, 8$$

$$\frac {1} {6} \times \left(\frac {1} {10} + \frac {1} {12} + \frac {1} {20} \right) = \frac {7} {180} ~~ x = 9, 10$$

$$\frac {1} {6} \times \left(\frac {1} {12} + \frac {1} {20} \right) = \frac {1} {45} ~~ x = 11, 12$$

$$\frac {1} {6} \times \frac {1} {20} = \frac {1} {120} ~~ x = 13, \ldots, 20$$