# Probability of getting two pair in poker

I was looking at this website http://www.cwu.edu/~glasbys/POKER.HTM and I read the explanation for how to calculate the probability of getting a full house. To me, the logic basically looked like you figure out the number of possible ranks and multiply by the number of ways to choose the cards from that given rank.

In other words, for a full house $P=$ $$\frac{{13\choose1}{4\choose3}{12\choose1}{4\choose2}}{52\choose5}$$

Following this logic, I tried to calculate the probability of getting two pair. My (incorrect) logic was that there are 13 possible ranks for the first pair and $4\choose2$ ways to choose two cards from that rank, 12 possible ranks for the second pair and $4\choose2$ ways to choose two cards from that rank, and 11 possible ranks for last card and $4\choose1$ ways to choose a card from that rank.

So I tried $P=$ $$\frac{{13\choose1}{4\choose2}{12\choose1}{4\choose2}{11\choose1}{4\choose1}}{52\choose5}$$

Obviously my solution was incorrect. I read explanation and the correct answer is $P=$ $$\frac{{13\choose2}{4\choose2}{4\choose2}{11\choose1}{4\choose1}}{52\choose5}$$

I'm still a bit fuzzy on where I went wrong though. Can anyone help me understand this problem a little better? Thank you very much for your help.

You have to choose the two card values you want as your pairs simultaneously. Remember--multiplying the numbers ${13\choose1}{4\choose2}{12\choose1}{4\choose2}{11\choose1}{4\choose1}$ assumes an $order$, i.e. you are counting, say, QQKK2 as different from KKQQ2.

This is why you have to do ${13\choose2}{4\choose2}{4\choose2}{11\choose1}{4\choose1}$. It makes the counting not sensitive to which pair you choose first.

• I think the part that is tripping me up is why my solution for the two pair solution assumes an order, but the full house solution does not. In other words, why doesn't the full house solution count say, QQQKK differently from KKQQQ?
– Curt
Jan 14, 2014 at 6:05
• Because the formula given above for the full house doesn't count things of the form KKQQQ. The ${4\choose3}$ comes before the ${4\choose2}$! The formula used assumes an order of "triple first then pair." You could just as easily switch the order and get the exact same answer. Jan 14, 2014 at 6:09
• It doesn't count it differently, but one is a three of a kind, the other is a pair. Kings over aces (KKKAA) is different than aces over kings (AAAKK). See my answer.
– John
Jan 14, 2014 at 6:11
• This comment from @John is the right answer. The symmetry of the pairs makes necessary to divide by two to avoid counting AAKK and then KKAA (note that ${13\choose 2} = \frac{1}{2} {13\choose 1}{12\choose 1}$) Oct 15, 2018 at 11:14
• @Anjan It's necessary to pick the values the come in pairs separately, because in your answer, you are not distinguishing between KK22Q, KK2QQ, and K22QQ. You could multiply your answer by $3\choose2$ to choose which two of the three card values will be paired, and that will also give the right answer. Jun 22, 2020 at 17:01

First choose the two (different) values of the cards that will be pairs: $13 \choose 2$.

For each of these values, pick two suits from the four suits available: ${4 \choose 2}{4 \choose 2}$.

Then, since this is only two pair and not more, choose the value of the other card, and its suit: ${11 \choose 1}{4 \choose 1}$.

Finally, divide by the total number of combinations of all hands: $52 \choose 5$. And there it is:

$$P = \frac{{13\choose2}{4\choose2}{4\choose2}{11\choose1}{4\choose1}}{52\choose5}$$

The difference between this solution and that for the full house is that there is more "symmetry" for the two pair: both pairs are groups of two. With the full house, one is a group of three, and the other is a group of two. Aces over kings is distinct from kings over aces.

Here, you choose the card for the three of a kind, then pick the three suits: ${13 \choose 1}{4 \choose 3}$. Then, you choose the card for the pair, and pick the two suits: ${12 \choose 1}{4 \choose 2}$.

• Is this result for Texas Hold'em (where a player uses the best five-card poker hand out of seven cards)? Nov 15, 2015 at 21:02
• I did a manual count of this using a computer script to run through all subsets of {1,2,3,...,52} associating cards with congruence classes mod 13. It gave me the result 147992 which is different from your answer of 123552. I've checked the script and am pretty sure it's right: It correctly counts all possible hands of cards, 52C5, and it correctly tests any hand for whether it contains two pair. Apr 1, 2017 at 4:40
• @Addem Sorry I missed this for over a year. Your answer has a prime factorization of $2^3 \cdot 13 \cdot 1423$. I can't resolve the discrepancy between your answer and mine, but at the same time your answer seems a bit removed from a combinatorial counting argument.
– John
Aug 31, 2018 at 18:09

Another way is for the first to choose three values out of 13: $${13 \choose 3}$$, then choose 2 values out of 3 for pair: $${3 \choose 2}$$, for each pair choose 2 suits out of 4: $${4 \choose 2}$$ - twice, and finally choose one suit for the 5-th card, which is not in any of pairs: $${4 \choose 1}$$.

Resulting formula: $${13 \choose 3}*{3 \choose 2}*{4 \choose 2}*{4 \choose 2}*{4 \choose 1}=123552$$

No difference with previous answers because of $${13 \choose 3}*{3 \choose 2} = {13 \choose 2}*{11 \choose 1}$$

I find permutation more intuitive to follow for this kind of problems. For people like me:

We have five slots to fill: - - - - - . The first slot can take all 52 cards. The second slot can take only three cards so that they can make a pair. Similarly, the third and fourth slots can take 48 and 3 cards, respectively. The last and final slot can take any of remaining 44 cars. Therefore:

52 * 3 * 48 * 3 * 44 = 988416. Please note, this is order dependent. In other words, this is the count of x x y y z. However, we should count all the possibilities (i.e., z x y x y). Therefore, we multiply 988416 with 5! and divide by 2! (order between two xs) * 2! (order between two ys) and 2! (order between the pair of xs and ys). The total count is 14826240.

This is the numerator. The denominator is 52*51*50*49*48 = 311875200. The probability is 0.0475390156062425.

Note that if you want to count how many different hands can be dealt, then you have to divide 14826240 by 5! to compute the combination.

• I came up with this method on my own while trying to do a problem for Combinatorics, you're the only person I found online talking about this method so thanks for that! But I don't understand the part where you divide by 2!*2!*2!, I feel like it has to do with the implicit separation of the cards into different cases, but I just don't really follow it. Would you mean explaining a bit more? And when I think about the combination equivalent I get even more confused. The pattern is x x y y z, but the two x's and two y's are distinct cards in the pack. Jan 13, 2021 at 7:12
• When we multiply with 5! we consider all the possible permutations. However, there are some permutations we already considered. If we dont discard them we just over-count the permutations. So the first 2! discards the already considered permutations between the first two cards. The second 2! discards the already considered permutations between the third and fourth cards. The third 2! discards already considered permutations between the first and second pair. Jan 15, 2021 at 20:50
• Ah, that helps. Thanks! Jan 19, 2021 at 1:57

When making a tree, you have 13 choices for the first kind, 6 ways to get it, 12 for the second kind, 6 ways to do that, and 44 cards that are not the first two kinds:

13x6x12x6x44

The problem with this reasoning is that you will have 10s and 4s on one branch and on another you will have 4s and then 10s--the SAME hand. In other words, you have doubled your hands.

So logic says, divide 13x12 by 2 to take away all the double answers that will show up on your tree.

So....it is

(13x12/2)x6x6x44

yielding 123552.

For the probability, you need to still divide that by: 52C5

But this verifies WHY your second answer is correct and the first one is wrong:

13C2 x 4C2 X4C2 x 44C1 / 52C5

Riffing off prony's answer, which I think is a little confusing. Here are the possibilities for each card:

• Card 1: 52 cards
• Card 2: 3, since it must match the suite of Card 1
• Card 3: 48, since we can't match the suite of Card 1
• Card 4: 3, since we can't match the suite of Card 3
• Card 5: 44, since we can't match the suite of the other cards

This will give us all orderings of the form XXYYZ. We then notice two issues that we are double counting:

1. Cards 1 and 2 can be interchanged (XX). (2!)
2. Cards 3 and 4 can be interchanged (YY). (2!)
3. Cards 1 and 2 can collectively be interchanged with Cards 3 and 4 (XX with YY). (2!)

So we have distinct, unordered $$(52 \times 3 \times 48 \times 3 \times 44)/(2! 2! 2!)$$ ways. Dividing this by the number of combinations $${52 \choose 5}$$ yields our answer.