How can I calculate the probability of getting a sum of 33 with 10 dice?

  • Thread starter Thread starter ShawnD
  • Start date Start date
  • Tags Tags
    Dice Probability
AI Thread Summary
To calculate the probability of rolling a sum of 33 with 10 six-sided dice, one must consider the total number of combinations that yield this sum. The probability for any specific combination is (1/6)^10, which should be multiplied by the number of ways to achieve a sum of 33. Using a computer program can efficiently explore all 6^10 possible outcomes, which is feasible on modern hardware. The discussion also highlights the distinction between permutations and combinations, noting that one method will yield the correct count of outcomes while the other will not. Ultimately, a straightforward approach or a more sophisticated mathematical function can be employed to derive the probabilities.
ShawnD
Science Advisor
Messages
715
Reaction score
2
I'm trying to figure out how to calculate probabilities with dice. Suppose I had 10 dice, each with 6 sides, and I added the value of each die. How can I calculate the probability of getting an added sum of 33, or any other number? I know how to calculate the probability of getting that 33 through one specific set of rolls, but there are many many ways of getting a 33.

Another thing, is there a difference between using permutations and combinations in this case?


I plan on writing a computer program to calculate all of this, so any ideas that would take a crazy amount of processing power are still good ideas.
 
Last edited:
Mathematics news on Phys.org
Well the probability of getting any particular combination of numbers with 10 dice is (1/6)^10, so you then need to multiply that by the number of times it is possible to get the sum of 33.

I would draw out a tree diagram, not bothering to fill out branches where I have dropped too low to get to 33 or gone over 33. Though there is a probably easier way, however I don't see that as too much as a problem converting it into a program.
 
Another thing, is there a difference between using permutations and combinations in this case?

There is always a difference. One will be correct, and the other will not.

I plan on writing a computer program to calculate all of this, so any ideas that would take a crazy amount of processing power are still good ideas.

Well, you could always try runnign 10^{32} trials in a Monte Carlo method, but I doubt that your computer would last that long. There are certainly methods that use a reasonable amount of calculation.

What method you end up using will depend on your sophistication, and your need for precision.

In practice you can simply have the computer run through all possible cases, and you'll get your answer. After all, there are only 10 dice, so there are only 6^{10} possibilities. A naive computer program should be able to go through all of them in less than a minute on a modern computer.
 
Well, I don't know a thing about terminology (or formalism!) in combinatorics, but here's a thought:

Consider the function:
F(x)=(x+x^{2}+x^{3}+x^{4}+x^{5}+x^{6})^{m}=(\frac{x-x^{7}}{1-x})^{m}

Clearly, in the first expression, the coefficient in front of power "p" equals the number of ways by which we may sum 1-6 up to p, let's say M(p).

But, equally, we have, by Taylor's theorem:
M(p)=\frac{f^{p}(0)}{p!}

Hence, the probability of getting "p" is:
Prob(p)=\frac{M(p)}{\sum_{i=m}^{6m}M(i)}

A computer will love to derive the second expression for F(x) the requisite number of times and evaluate the derivatives at x=0..
 
arildno, what's "m"? The number of dice?
 
Last edited:
Yes, m is the number of dice
 
Well if it's going to be that hard, I'll just say screw it, draw a bell curve, then call it quits.

Thanks for the input though :wink:
 
ShawnD said:
Well if it's going to be that hard, I'll just say screw it, draw a bell curve, then call it quits.

Thanks for the input though :wink:

A naive computer program is quite easy:

Code:
#include<stdio.h>

#define NUM_DICE 10
#define NUM_FACES 6
#define DESIRED_VALUE 33

void main() {
   int dice[NUM_DICE];
   int i,j;
   int count=0;
   int total=0;

   for(i=0;i<NUM_DICE;i++) {
      dice[i]=0;
   }
   while(dice[NUM_DICE-1]<NUMFACES) {
       dice[0]++;
       for(i=0,j=NUM_DICE;i<NUM_DICE-1;i++) {
            if(i==NUM_DICE-1 and dice[i]>=NUM_FACES) {
               j+=NUM_DICE*(NUM_FACES-1);
               break;
            }
            if(dice[i] >= NUM_FACES) {
               dice[i+1]++;
               dice[i]=0;
            }
            j+=dice[i];
       }
      total++;
      if(DESIRED_NUMBER==j)
         count++;
   }
   printf ("There odds of getting a sum of DESRIED_NUMBER are %d in %d\n",count,total)
   exit 0;
}

There are also faster methods.
 
Back
Top