How to calculate a fullhouse after dealing 5 cards?

In case you are not familiar with a fullhouse, it is when you have XXXYY (three of a kind + a pair).

I am not that good calculating odds, but after time I manage to write all the possible combinations:

However, I can't translate it to real odds, my questions:

• How can I translate it to odds?
• (Since my approach is time consuming, and will be impossible to apply on larger problems) what other alternatives do I have?
-
after some months, I found this imgur.com/DCzCqKI It easily explained what I wanted to do – ajax333221 Apr 27 '14 at 19:26

There are $\binom{52}{5}$ ways to choose $5$ cards from $52$. All these ways are equally likely. Now we will count the number of "full house" hands.

For a full house, there are $\binom{13}{1}$ ways to choose the kind we have three of. For each of these ways, the actual cards can be chosen in $\binom{4}{3}$ ways. For each way of getting so far, there are $\binom{12}{1}$ ways to choose the kind we have two of, and for each there are $\binom{4}{2}$ ways to choose the actual cards. So our probability is $$\frac{\binom{13}{1}\binom{4}{3}\binom{12}{1}\binom{4}{2}}{\binom{52}{5}}.$$

Remark: We have used binomial coefficients systematically, even when a simpler expression was available. For example, there are clearly $13$ ways to choose the kind we have three of.

To calculate the binomial coefficient $\binom{n}{k}$, a reasonably efficient procedure, a not too bad way, when $k$ is not large, is to use $$\binom{n}{k}=\frac{n(n-1)(n-2)\cdots(n-k+1)}{k!}.$$ For $\binom{52}{5}$ the numerator is $(52)(51)(50)(49)(48)$ and the denominator is $(5)(4)(3)(2)(1)$.

A similar procedure can be used to find the probabilities of the other standard poker hands. The only place where a mistake is fairly common is the probability of two pairs.

For example, to count the number of one pair hands, do this. The kind we have a pair of can be chosen in $\binom{13}{1}$ ways, and for each of these ways the actual cards can be chosen in $\binom{3}{2}$ ways. Now the three kinds we have one each of can be chosen in $\binom{12}{3}$ ways, and the actual cards can be chosen in $\binom{4}{1}\binom{4}{1}\binom{4}{1}$ ways, for a total of $\binom{13}{1}\binom{4}{2}\binom{12}{3} \binom{4}{1}\binom{4}{1}\binom{4}{1}$.

-
could you elaborate, because each value doesn't seem obvious – Squirtle Sep 8 '12 at 15:01
The binomial coefficient $\binom{n}{k}$ is by definition the number of ways to choose $k$ objects from $n$ distinct objects. It is also sometimes called $C_k^n$, $C(n,k)$, and other names. The computation is mechanical, you can look up the formulas in say Wikipedia. – André Nicolas Sep 8 '12 at 15:08
Note that to optain the odds as requested, you have to take the probability $p$ calculated above and compute $\frac p{1-p}$. – Hagen von Eitzen Sep 8 '12 at 15:13
At Andre, I think everything you wrote is correct except 13 choose 1, because there is probability 1 you choose A card, butwe really don't care which. So I think what you did is the probability for some given full house and not any full house, right,? That's what I wanted you to expand on anyway.... – Squirtle Sep 8 '12 at 16:23
@dustanalysis: We do care. The $\binom{52}{5}$ counts all five card hands, so we must for the numerator count all five card hands that are called "full house." – André Nicolas Sep 8 '12 at 16:30

The tree you have drawn has each state where a random choice occurs as an internal node, each edge weighted by the probability of descending from one state to another, and each final outcome as a leaf. To find the probability of a particular final outcome, you would take the product of the probabilities along the path from the root to that leaf. For instance, the probability of [XYZ] (one of many "bad" outcomes) is $\frac{52}{52}\times\frac{48}{51}\times\frac{44}{50}$. To find the probability of a class of outcome, you would sum these products over all the leaf nodes of that class (e.g., all those labeled "good").

You're right to point out that this isn't the most efficient way to get the result. The key is that if you don't care about the order in which the cards come, you don't have to calculate the probability of each ordered event separately. Instead, you can count the number of "good" hands and divide by the total number of hands (all of which are equally likely) to arrive at the probability you want. In this case, the number of good hands is just $13\times 4 \times 12 \times 6=3744$ (the # ranks for the three-of-a-kind, times the # of ways to choose three suits for the three-of-a-kind, times the # of remaining ranks for the pair, times the # of ways to choose two suits for the pair). The total number of hands is ${{52}\choose{5}}=2598960.$ So the probability of a full house is $$\frac{3744}{2598960} = 0.001440576...$$ Which method you should use depends on your application, though. For calculating the probability that two cards form a pair, say, the tree method (second card matches the first with probability $3/51=1/17$) is simpler than the counting method (number of pairs is $13\times 6=78$, divided by number of two-card hands ${52\choose{2}}=1326$, gives $78/1326=1/17$).

-