Roll a 1 on at least half of dice rolled with different numbers of sides

tchntm43

New member
Joined
Jan 8, 2020
Messages
36
Suppose I have one each of d4, d6, d8, d10, d12, and d20 (these are all commonly used dice in games).

It is easy to determine each of their individual probabilities of rolling a 1:
d4: 0.250
d6: 0.167
d8: 0.125
d10: 0.100
d12: 0.083
d20: 0.050

How do I determine the probability of rolling at least 3 ones when rolling all six dice?

I've thought about viewing it as probability of exactly 3 plus probability of exactly 4 etc... Even then, I'm not sure how to approach it when the probabilities aren't the same.

This problem was created as a simplified version of a much larger problem with several hundred distinct probabilities where I need to find the probability of at least half. I'm hoping to find a process that can be converted into something I can run with code.
 
Thought about it some more... Maybe it's best to start with simpler question... probability of exactly 3 ones. This is still much harder than evaluating if the probabilities were different.

It should be:
d4*d6*d8 + d4*d6*d10 + d4*d6*d12 + d4*d6*d20 + d4*d8*d10... up to d10*d12*d20.

And then for exactly 4:
d4*d6*d8*d10... ...d8*d10*d12*d20

and then the same process for exactly 5 and exactly 6 (the last one being very easy).

And then add these together to get the probability of at least 3 ones.

This could be really awful if there are hundreds of these probabilities, though.
 
I think I might have a very calculating-intensive solution. Using code, it has 3 nested for loops.
Outermost loop iterates over the number of "probability of exactly x trials true"
Middle loop iterates over the summation part of the example above (d4*d6*d8 + d4*d6*d10, for example)
innermost loop iterates over the multiplication part of the example above (d4*d6*d8, for example)

So using some pseudo code, this is what I came up with for a way to calculate the probability that at least half of all discrete probabilities are true:
Code:
n = number of discrete probabilities
array[n] is assigned to the set of discrete probabilities (noting that it starts with array[0] and ends with array[n-1]
total = 0
For(z = round_down(n/2) to n)
{
  For(y = 0 to (n-(z+1)))
  {
    temp_mult_total = 1
    For(x = y to (y+(z-1)))
    {
      temp_mult_total *= array[x]
    }
    total += temp_mult_total
  }
}

This may prove, in execution, to be unworkable with n = hundreds, possibly causing the system to hang. I will find out.
 
Wow, no that does not work at all, haha. Ran a test with probabilities 26%, 100%, and 73%, got over 120% for 2 to 3 being true. The code worked the individual pieces as expected but my concept is wrong.

What it did in execution was evaluate (0.26*1) + (0.26 * 0.73) + (1*0.73) + (0.26*1*0.73).

I see now. For the first three, I have to multiply by the probability of not getting the result for the one that is omitted. It should be:
(0.26*1*0.23) + (0.26*0*0.73) + (0.74*1*0.73) + (0.26*1*0.73)
This equals: 0.7976, which seems reasonable.

I just need to rethink how the code works now.
 
Last edited:
Suppose I have one each of d4, d6, d8, d10, d12, and d20 (these are all commonly used dice in games).
How do I determine the probability of rolling at least 3 ones when rolling all six dice?
Can you determine the probability of rolling only ones and twos when rolling all six dice?
 
Can you determine the probability of rolling only ones and twos when rolling all six dice?
Yes, I think so. The individual probabilities are all doubled from the ones I listed in the first post:

d4: 0.500
d6: 0.333
d8: 0.250
d10: 0.200
d12: 0.167
d20: 0.100

Since you're asking about the probability of only getting those, then it's just multiplied:
0.500 * 0.333 * 0.250 * 0.200 * 0.167 * 0.100 = 0.000139

I wrote a fairly long function in VBA code in Excel that works as long as there aren't more than about 20 probabilities in the set. More than that and Excel goes "not responding" for increasing lengths of time. This doesn't surprise me. The actual data set I am working with is 100 probabilities and I need at least 50. Calculating for merely *exactly* 50 produces a number of combinations that is 29 digits long.
 
I think your original idea of a loop was best.

Use the Monte Carlo Method. It won’t give you an exact answer, but should give you a reasonable answer.
 
In googling about "binomial distribution with different probabilities" I found one result that indicated that my general procedure is valid but unusable for larger sets of probabilities (larger apparently meaning >20 in the case of Excel). So, confirmation that my logic was sound and that my conclusion about the problematic nature of my solution was also true.

For larger sets of probabilities, it says to look into Normal Approximation as a solution. However, it says it only works if the individual probabilities aren't close to 0 or 1, and my set includes many that are close to 0 or 1 (it's not really clear what "close" constitutes, though). I'm not really sure what to do in that case. I think the first thing I need to do is learn how to do normal approximation with this set of data. I am familiar with Excel's NORMDIST function but I have no idea how to apply this data to it (if it's even the right function to use). And then I'm going to need to learn how what to do when some of the probabilities are close to 1 or 0. I may try to hire someone to teach me, I think it's more than I reasonably ask of someone on a message board.
 
Top