Q: 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?


A: 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}$.

A: 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$).
