# Probability question: am I calculating these odds right?

**URL:** <https://boards.straightdope.com/t/probability-question-am-i-calculating-these-odds-right/524794>\
**Category:** Factual Questions\
**Created:** [January 13, 2010, 4:50pm UTC](https://boards.straightdope.com/t/probability-question-am-i-calculating-these-odds-right/524794 "2010-01-13T16:50:54Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![erislover](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@erislover](https://boards.straightdope.com/u/erislover)\
**Post date:** [January 13, 2010, 4:50pm UTC](https://boards.straightdope.com/t/probability-question-am-i-calculating-these-odds-right/524794/1 "2010-01-13T16:50:54Z")

</div>

I have a game I am trying to analyze. It is based on the simultaneous rolling of three dice. I wrestled with the logic in my head a number of times before settling on this method:

**Generate a list of all 3-permutations of (1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6). Filter this list based on whatever criterion (sums to 9, is a run, etc). Then divide the length of the filtered list by the number of 3-permutations.**

I then played the game according to this logic (generating expected values for bets and playing all those bets that have a positive expected value), and it seems sound, though I admit my sample size was rather small (about 50 plays). But something in the back of my head says these odds have not been calculated correctly.

My first inclination was to use combinations, because it didn’t really matter if the dice came up 1 2 3 or 2 1 3, it was still a run. But really the question was not the number of combinations, but the number of times some combination would appear, which led me to the “filter the permutations” route. Have I gone wrong?

---

<div class="post-metadata">

**Author:** ![CookingWithGas](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/cookingwithgas/32/485_2.png) [@CookingWithGas](https://boards.straightdope.com/u/CookingWithGas)\
**Post date:** [January 13, 2010, 4:57pm UTC](https://boards.straightdope.com/t/probability-question-am-i-calculating-these-odds-right/524794/2 "2010-01-13T16:57:53Z")

</div>

I am a little fuzzy on your question but it sounds like you are wondering if, when generating all possible dice rolls, you should take into account the order of the dice. That is, should you consider 123 and 213 to be the same roll.

The answer is no. You must consider all possibilities, taking into account the order of the dice, even if the order isn’t important to how your game works. You would enumerate all possible throws as

111  
112  
113  
114  
115  
116  
121  
122  
123

etc.

This because, for example, there are 6 ways to roll a 1, a 2, and a 3 if you don’t care about order, but there is only one way to roll three 1’s. So 123 has to be represented as 6 times more frequent than 111.

---

<div class="post-metadata">

**Author:** ![erislover](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@erislover](https://boards.straightdope.com/u/erislover)\
**Post date:** [January 13, 2010, 5:07pm UTC](https://boards.straightdope.com/t/probability-question-am-i-calculating-these-odds-right/524794/3 "2010-01-13T17:07:39Z")

</div>

> [@CookingWithGas](#):
>
> I am a little fuzzy on your question but it sounds like you are wondering if, when generating all possible dice rolls, you should take into account the order of the dice. That is, should you consider 123 and 213 to be the same roll.
> 
> The answer is no. You must consider all possibilities, taking into account the order of the dice, even if the order isn’t important to how your game works.

That’s an answer to half of my question: permutations are correct.

The second half is, is this the right way to “permute three dice”:  
3-permute (1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6)

This seems wrong to me for some reason, but I am really at a loss to explain my misgivings, or prove myself correct and remove them.

---

<div class="post-metadata">

**Author:** ![Chessic\_Sense](https://avatars.discourse-cdn.com/v4/letter/c/7c8e57/32.png) [@Chessic\_Sense](https://boards.straightdope.com/u/Chessic_Sense)\
**Post date:** [January 13, 2010, 5:39pm UTC](https://boards.straightdope.com/t/probability-question-am-i-calculating-these-odds-right/524794/4 "2010-01-13T17:39:16Z")

</div>

I really don’t understand what you mean by “permute 3 dice” and “3-permute”. Look: How many ways are there to make the first choice? How many for the second? How many for the third? Just multiply those three numbers and you’ll have your number of permutations.

---

<div class="post-metadata">

**Author:** ![ZenBeam](https://avatars.discourse-cdn.com/v4/letter/z/3ab097/32.png) [@ZenBeam](https://boards.straightdope.com/u/ZenBeam)\
**Post date:** [January 13, 2010, 5:53pm UTC](https://boards.straightdope.com/t/probability-question-am-i-calculating-these-odds-right/524794/5 "2010-01-13T17:53:17Z")

</div>

> [@erislover](#):
>
> **Generate a list of all 3-permutations of (1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6). Filter this list based on whatever criterion (sums to 9, is a run, etc). Then divide the length of the filtered list by the number of 3-permutations.**

I don’t know what you mean by this either. Is the “number of 3-permutations” you came up with 216? If not, you’re doing something wrong.

---

<div class="post-metadata">

**Author:** ![KarlGauss](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/karlgauss/32/3713_2.png) [@KarlGauss](https://boards.straightdope.com/u/KarlGauss)\
**Post date:** [January 13, 2010, 5:59pm UTC](https://boards.straightdope.com/t/probability-question-am-i-calculating-these-odds-right/524794/6 "2010-01-13T17:59:54Z")

</div>

I think you’re right.

If I’m understanding you, there are 6 X6 X 6 = 216 permutations possible.

Now, as an example, what is the chance of rolling a ‘3’. Well that can only occur one way (1 and 1 and 1 showing), so the chance is 1/216.

For rolling, say, a four, you can have 112, 121, or 211. So, 3/216.

Makes sense to me.

---

<div class="post-metadata">

**Author:** ![CookingWithGas](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/cookingwithgas/32/485_2.png) [@CookingWithGas](https://boards.straightdope.com/u/CookingWithGas)\
**Post date:** [January 13, 2010, 6:02pm UTC](https://boards.straightdope.com/t/probability-question-am-i-calculating-these-odds-right/524794/7 "2010-01-13T18:02:04Z")

</div>

> [@erislover](#):
>
> That’s an answer to half of my question: permutations are correct.
> 
> The second half is, is this the right way to “permute three dice”:  
> 3-permute (1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6)
> 
> This seems wrong to me for some reason, but I am really at a loss to explain my misgivings, or prove myself correct and remove them.

I think you are asking whether listing all of the possible ways to choose three numbers from the set of {1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6} will give you the possible ways that the dice can come up. The answer is no. There are 18_17_16 ways to choose three numbers from that set\*, and that yields 4,896 possible results. But this is wrong, because if you choose, say the first three elements of this set, you have selected a result that represents three numbers thrown on one die, and no numbers from the other two dice.

You can easily enumerate all the possibilities by the process I started in my post above. There are 6_6_6 = 216 possibilities.

* * *

_There are 18 numbers you can choose for the first number. That leaves 17 for the second and 16 for the third, or 18_17\*16 different ways to choose all three.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [January 13, 2010, 6:29pm UTC](https://boards.straightdope.com/t/probability-question-am-i-calculating-these-odds-right/524794/8 "2010-01-13T18:29:50Z")

</div>

The sample space here is just the set all triples of the form (x, y, z) where each of x, y and z is in the set {1, 2, 3, 4, 5, 6}. Since you’re assuming each die is fair, all triples are equally likely, and so the probability of getting a triple with any particular property is just the number of triples with that property divided by the total number of triples.

---

<div class="post-metadata">

**Author:** ![nivlac](https://avatars.discourse-cdn.com/v4/letter/n/3bc359/32.png) [@nivlac](https://boards.straightdope.com/u/nivlac)\
**Post date:** [January 13, 2010, 6:37pm UTC](https://boards.straightdope.com/t/probability-question-am-i-calculating-these-odds-right/524794/9 "2010-01-13T18:37:07Z")

</div>

To the **OP** : Your terminology is somewhat muddled, but if I get the gist of what you’re trying to do, it’s the following … you roll three dice and you want to know the probability that some event A will result, e.g., the three dice add up to some number, the three dice are all odd, etc. The way to do this is to first count all the possible outcomes that are possible when you toss the three dice. The answer to that is 6x6x6=216. That is the **denominator** of your probability. The **numerator** will be the number of ways in which the three dice will result in the desired event A. To get that number you can either list all the possible ways in which A can occur and then count them, or you can use some other enumeration approach such as permutations or combinations. For events involving sums where the ordering of the dice are irrelevant you just count the combinations. Put the numerator over the denominator and you have your probability.

---

<div class="post-metadata">

**Author:** ![erislover](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@erislover](https://boards.straightdope.com/u/erislover)\
**Post date:** [January 13, 2010, 7:40pm UTC](https://boards.straightdope.com/t/probability-question-am-i-calculating-these-odds-right/524794/10 "2010-01-13T19:40:48Z")

</div>

Sorry about the terminology, guys. I would say “5 choose 3” to represent the number of _combinations_ of 3 items from a group of 5 items. But I don’t know what to call the equivalent operation for permutations (e.g. 5 P 3), so I just said “3-permutations”, which made sense in my head.

In any case, as **CookingWithGas** suspected, I am doing it wrong. Instead I should just be counting in faux base-6 to enumerate the permutations (where e.g my symbols are 1-6 instead of 0-5). This is very easy to implement. Thank you.

---

<div class="post-metadata">

**Author:** ![CookingWithGas](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/cookingwithgas/32/485_2.png) [@CookingWithGas](https://boards.straightdope.com/u/CookingWithGas)\
**Post date:** [January 13, 2010, 9:59pm UTC](https://boards.straightdope.com/t/probability-question-am-i-calculating-these-odds-right/524794/11 "2010-01-13T21:59:23Z")

</div>

> [@KarlGauss](#):
>
> If I’m understanding you, there are 6 X6 X 6 = 216 permutations possible.

> [@erislover](#):
>
> Sorry about the terminology, guys.

Just to clarify the terminology, **erislover** is not using permutations; there are 216 _combinations_. The original proposal also used combinations, not permutations.

Let’s say you have a bag of black and white marbles, and there are 2 of each color. You want to know all the _combinations_ of 3 marbles you can select (without replacement–that is, you draw three marbles out at a time). There are only two combinations:

BBW  
BWW

With combinations, the order isn’t considered. BBW is the same combination as BWB.

If you want to determine how many _permutations_ you can have, you have to consider order, and there are 6 permutations:

BBW  
BWB  
WBB  
WWB  
WBW  
BWW

In **erislover’s** case, we are dealing with probabilities of the throw of three dice, each with 6 possible faces. We are identifying _combinations_ because we are listing all the possible ways to select one number from each die, rather than _permutations_, where you would be taking a given set of numbers and seeing how many different ways you can rearrange them.

**erislover’s** initial strategy of selecting from the set of all possible rolls from all three dice also used _combinations_ (not permutations!) of three numbers selected from a set of 18. The reason it is combinations is that each number appears in the set 3 times, and it matters which 2 you selected if you select a 2. (Well, using the term “set” here is playing fast and loose because elements in a set must be distinct, IIRC. You can think of this as a bag of numbered balls.)

Another way of thinking about this that will yield the same answer is that you have a bag of 6 numbered balls, and you can choose 3 _with replacement_. (You pick a ball, you put it back before picking another one.) What are all the possible ways to draw 3 balls, when the order matters? That is permutations, because order matters. I think that may be what **erislover** was thinking of when he described using permutation, but describing it as picking from a set of 18 didn’t match the description.

---

<div class="post-metadata">

**Author:** ![Thudlow\_Boink](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thudlow_boink/32/320_2.png) [@Thudlow\_Boink](https://boards.straightdope.com/u/Thudlow_Boink)\
**Post date:** [January 13, 2010, 10:47pm UTC](https://boards.straightdope.com/t/probability-question-am-i-calculating-these-odds-right/524794/12 "2010-01-13T22:47:12Z")

</div>

> [@CookingWithGas](#):
>
> Let’s say you have a bag of black and white marbles, and there are 2 of each color. You want to know all the _combinations_ of 3 marbles you can select (without replacement–that is, you draw three marbles out at a time). There are only two combinations:
> 
> BBW  
> BWW

Wait a minute—I would have said that these are the combinations of **colors** that are possible, not the combinations of **marbles**.

The combinations of marbles that are possible are

B[sub]1[/sub]B[sub]2[/sub]W[sub]1[/sub]  
B[sub]1[/sub]B[sub]2[/sub]W[sub]2[/sub]  
B[sub]1[/sub]W[sub]1[/sub]W[sub]2[/sub]  
B[sub]2[/sub]W[sub]1[/sub]W[sub]2[/sub]

This can be an important distinction! If you draw two, rather than three, of the marbles, there are 4 combinations of marbles that are possible, but only 3 combinations of colors (one of which is twice as likely as either of the others).

---

<div class="post-metadata">

**Author:** ![CookingWithGas](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/cookingwithgas/32/485_2.png) [@CookingWithGas](https://boards.straightdope.com/u/CookingWithGas)\
**Post date:** [January 13, 2010, 11:41pm UTC](https://boards.straightdope.com/t/probability-question-am-i-calculating-these-odds-right/524794/13 "2010-01-13T23:41:29Z")

</div>

> [@Thudlow\_Boink](#):
>
> Wait a minute—I would have said that these are the combinations of **colors** that are possible, not the combinations of **marbles**.

You are correct. I was inadequately precise. :o

---

<div class="post-metadata">

**Author:** ![erislover](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@erislover](https://boards.straightdope.com/u/erislover)\
**Post date:** [January 15, 2010, 3:16pm UTC](https://boards.straightdope.com/t/probability-question-am-i-calculating-these-odds-right/524794/14 "2010-01-15T15:16:26Z")

</div>

> [@CookingWithGas](#):
>
> Just to clarify the terminology, **erislover** is not using permutations; there are 216 _combinations_. The original proposal also used combinations, not permutations.

It did not. I was indeed generating all permutations of the list (1 2 3 4 5 6…), this was just not the correct way of doing it!

> [@](#):
>
> **erislover’s** initial strategy of selecting from the set of all possible rolls from all three dice also used _combinations_ (not permutations!) of three numbers selected from a set of 18.

No, it was definitely permutations.

---

<div class="post-metadata">

**Author:** ![CookingWithGas](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/cookingwithgas/32/485_2.png) [@CookingWithGas](https://boards.straightdope.com/u/CookingWithGas)\
**Post date:** [January 15, 2010, 3:42pm UTC](https://boards.straightdope.com/t/probability-question-am-i-calculating-these-odds-right/524794/15 "2010-01-15T15:42:36Z")

</div>

> [@erislover](#):
>
> It did not. I was indeed generating all permutations of the list (1 2 3 4 5 6…), this was just not the correct way of doing it!
> 
> No, it was definitely permutations.

My mistake, you are correct. And in fact, the formula that I applied your selection from a set of 16 numbers to get a total of 4,896 was the formula for permutations.
