Similar questions:

Chance of 7 of a kind with 10 dice

Probability of getting exactly $k$ of a kind in $n$ rolls of $m$-sided dice, where $k\leq n/2$

Probability was never my thing, so please bear with me.

I've reviewed the threads above to the best of my ability, but I still wonder how to go about finding a match of 3 from 7 dice.

At least three match, but no more (two sets of three is okay, a set of three and a set of four is not):

(a) : $ \frac{6 \binom{7}{3} 5^4}{6^7} $

In the other discussions, this wasn't desired since it would allow for a second triple to occur, or even a quadruple. Odds of a quadruple with the remaining 4 dice:

(b) : $(1/5)^4 $

Then, the probability that from rolling 7 dice that there is at least three that match, and no more than three, would be:

(c) : $ \frac{6 \binom{7}{3} * 5^4}{6^7}- (1/5)^4 $

Exactly two sets of three:

(d) : $ \frac{6 \binom{7}{3} \binom{4}{3} \binom{1}{1}}{ 6^7} $

Maybe? My thought process was that if $\binom{7}{3}$ will give me a set of three, then with the remaining 4, I could pick 3 yielding $\binom{4}{3}$ with 1 leftover. I realize this is probably wrong. Why? What would be the proper way to go about this?

Exactly one set of three:

Then to find the probability that there is one and only one set of three from 7 dice, we could take the probability of one or more sets of three (c) and subtract the probability of exactly two sets (d), for:

$ \frac{6 \binom{7}{3} 5^4}{ 6^7} - (1/5)^4 - \frac{6 \binom{7}{3} \binom{4}{3} \binom{1}{1} }{ 6^7} $

(e) : $ \left(\frac{6 \binom{7}{3}}{ 6^7}\right) \left( 5^4 - \binom{4}{3} \binom{1}{1} \right) - (1/5)^4 $

Is this at all on the right path?

Thank you!

PS. Sorry about the syntax, but I couldn't figure out how to make the standard nCr() symbol with MathJaX.

  • $\begingroup$ "n choose r" can be typeset as a binomial coefficient with \binom{n}{r}. $\endgroup$ – Arturo Magidin Feb 22 '11 at 19:21
  • $\begingroup$ (b) is already wrong: The odds of a quadruple with the remaining 4 dice which is different from the triple you already have is $\binom{5}{1}/6^4 = \frac{5}{6^4}$, not $\frac{1}{5^4}$. Choose what number they will all be (one out of five possibilities), out of all possible rolls (of which there are $6^4$). $\endgroup$ – Arturo Magidin Feb 22 '11 at 20:24
  • $\begingroup$ Instead of computing probabilities at each step, it's easier to simply count the total number of good outcomes; the probability at the end will simply be the quotient of the total number of good outcomes, divided by the total number of possible outcomes. $\endgroup$ – Arturo Magidin Feb 22 '11 at 20:25
  • $\begingroup$ Cool, cool. Thanks for the answers. As prefaced, probability is not my thing, and I'm even worse with counting (see a correlation?) so it's going to take me a bit to read and decipher your responses. $\endgroup$ – emragins Feb 22 '11 at 22:19
  • $\begingroup$ These kinds of probability are all about counting. The probability is always of the form (number of good outcomes)/(number of total possible outcomes), so it comes down to counting the total number of good outcomes, and the total number of possible outcomes. $\endgroup$ – Arturo Magidin Feb 23 '11 at 1:11

You are on the right track with $6^7 = 279936$ as the denominator. To find how many cases have three but no more matching, I would start by looking at the four partitions of 7 into up to 6 parts where the largest is 3: 3+3+1, 3+2+2, 3+2+1+1, 3+1+1+1+1. You can then work out each systematically, taking account both the numbers that appear and the order they appear in.

I think the first (which has two sets of three) is $$\frac{6!}{2!\;1!\;3!} \times \frac{7!}{3!\;3!\;1!} = 8400$$ which is ten times what you have in (c). The others (just one three-of-a-kind) are $$\frac{6!}{1!\;2!\;3!} \times \frac{7!}{3!\;2!\;2!} + \frac{6!}{1!\;1!\;2!\;2!} \times \frac{7!}{3!\;2!\;1!\;1!} + \frac{6!}{1!\;4!\;1!} \times \frac{7!}{3!\;1!\;1!\;1!\;1!} = 113400$$.

So I get about 0.405 for the probability of exactly one three-of-a-kind (but no four or more) and about 0.435 for the probability of the one or more threes-of-a-kind (but no four or more)

  • $\begingroup$ I get 8400 as well for the two sets of three. I'm not entirely sure how you are associating the multinomial coefficients to the partitions, though... (not that you're wrong, I'm just not used to them). $\endgroup$ – Arturo Magidin Feb 22 '11 at 21:02
  • 1
    $\begingroup$ @Arturo Magidin: To take the 3+3+1(+0+0+0) example, first you have to choose from six numbers, two to appear 3 times, one to appear 1 time, and three to appear 0 times; that has $6!/(2!1!3!)$ possibilities. Then with your identified two 3-of-a-kind and one 1-of-a-kind, you have to order the seven; that has $7!/(3!3!1!)$ possibilities. $\endgroup$ – Henry Feb 22 '11 at 21:14
  • $\begingroup$ Ah, okay. That makes sense. And since now we seem to agree, either all is well in the world or some casino mogul in Vegas is eagerly anticipating our next visit... $\endgroup$ – Arturo Magidin Feb 22 '11 at 21:18
  • $\begingroup$ For the most part, this makes some sense to me. However I'm looking for a way to solve this more programmatically so working through the options systematically isn't the best solution for me. $\endgroup$ – emragins Feb 22 '11 at 22:22
  • $\begingroup$ @emragins: ???? I would have thought that working through the options systematically is precisely the "programmatical" way of working through the problem. What is it you mean by "programmatically"? $\endgroup$ – Arturo Magidin Feb 23 '11 at 1:12

Carrying around the $6^7$ is just complicating your life. Instead, just count how many distinct rolls have exactly one triple; the end probability will be that count, divided by the total number of possible rolls (namely, $6^7$).

There is also the issue of distinguishable and non-distinguishable dice. But let's assume you roll a single dice in sequence and write down the results.

Proceeding along the lines you have, and hoping I'm not making a mistake:

  1. At least 3-of-a-kind of x, with the other four dice being anything except x. This one you compute correctly: pick what is x (six possibilities), then pick which three dice fall come up x ($\binom{7}{3}$ ways), then choose any of five possible outcomes for each of the remaining four dice, $5^4$. So you have $\binom{6}{1}\binom{7}{3}5^4$.

    Edit. However, this overcounts! (Thanks to Henry for spotting it) If a roll has two different three-of-a-kind, then I count that roll twice; once when I'm counting the lower three-of-a-kind, and again when I'm counting the higher one. So we need to subtract those rolls that have two three-of-a-kinds. We select the two ranks by using $\binom{6}{2}$, then select the dice that show the lower rank with $\binom{7}{3}$, and then select the dice, out of the remaining $4$, that have the higher rank three-of-a-kind with $\binom{4}{3}$. Then the remaining die can be any of the remaining $4$ ranks; so we overcounted by $\binom{6}{2}\binom{7}{3}\binom{4}{3}4$. So the real number of rolls that have at least one three-of-a-kind is $$\binom{6}{1}\binom{7}{3}5^4 - \binom{6}{2}\binom{7}{3}\binom{4}{3}4.$$

  2. Discard the case in which we get 3-of-a-kind of x, but the other four dice are equal to y, with x$\neq$ y. There are $\binom{6}{1}$ ways of picking x, and then you need to pick what the other $4$ are; there are $\binom{5}{1}$ ways of doing it; then pick the three dice that will come up x, $\binom{7}{3}$ ways. So you have $\binom{6}{1}\binom{5}{1}\binom{7}{3}$ outcomes that you don't want.

  3. Discard the case in which you get two sets of 3-of-a-kind. We already figured out, when we computed the overcount, that there are $$4\binom{6}{2}\binom{7}{3}\binom{4}{3}$$ rolls with two 3-of-a-kind. So we must subtract this total again.

So: the total number of rolls in which the largest number of dice that come up the same is $3$, and there is one and only one set that does this, is: $$\binom{6}{1}\binom{7}{3}5^4 - \binom{6}{1}\binom{7}{3}\binom{5}{1} - 2\times\left(\binom{6}{2}\binom{7}{3}\binom{4}{3}4\right) = 113400.$$

Given that there are $6^7$ sequential rolls possible, you get a probability of $$\frac{\mbox{number of rolls with exactly one three-of-a-kind, no 4-of-a-kind}}{6^7} = \frac{113400}{6^7} \approx 0.4050925926.$$

  • $\begingroup$ I think with this approach you may need to subtract the two sets of three-of-a-kind value of 8400 twice, once for the inclusion-exclusion principle, and once because you do not want to count it in your total. $\endgroup$ – Henry Feb 22 '11 at 21:00
  • $\begingroup$ @Henry: good eye; thanks! Alternatively, as I count the number of rolls, I will encounter 8400 that have two three-of-a-kinds. But sometimes I'm focusing on the lower-ranked triple, sometimes on the upper-ranked triple, so I'm encountering them twice, need to throw them out twice. The phenomenon doesn't show up in the other count because the 4-of-a-kind distinguishes itself. $\endgroup$ – Arturo Magidin Feb 22 '11 at 21:13
  • $\begingroup$ I am bit confused by #2. I understand nCr(6, 1) ways to pick x initially, and then I understand nCr(5, 1) ways to pick a leftover number for the case where the remaining 4 dice all match. I can also understand that nCr(7, 3) gives the number of ways to get three dice that will match. What I don't get is a) why they need to all be multiplied and b) why this would give the quantity of outcomes (in the form xxxyyyy) that I don't want. Could you please elaborate on this? Thank you. $\endgroup$ – emragins Feb 22 '11 at 22:28
  • $\begingroup$ @emragins: If there are $k$ ways for $A$ to happen, and $\ell$ ways for $B$ to happen, then the number of ways for both $A$ and $B$ to happen is $k\ell$. So, there are $\binom{6}{1}$ ways of choosing the 3-of-a-kind rank; there are $\binom{5}{1}$ ways of choosing the 4-of-a-kind-rank; and there are $\binom{7}{3}$ ways of choosing which dice show the 3-of-a-kind. ALL of these must happen, so the number of way for all to happen is obtained by multiplying them out. This gives one of the things you don't want, because you don't want to count the 3-of-a-kind/4-of-a-kind roll. $\endgroup$ – Arturo Magidin Feb 23 '11 at 1:06
  • $\begingroup$ @emragins: I understood from what you posted that you wanted to count the number of ways/probability that rolling 7 dice will produce exactly one 3 of a kind, and nothing better (so, no roll like 3334444, which has both a 3-of-a-kind and a 4-of-a-kind; and no roll like 4442221, which has two 3-of-a-kind; but that you were okay with something like 55522116, because the "best" you have there is a 3-of-a-kind (in addition to two pairs). That's what I was counting. If it is not the case that this is what you wanted to count, then please explain better what you want to count. $\endgroup$ – Arturo Magidin Feb 23 '11 at 1:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.