User:Hpesoj00/7 Card Probabilities

Derivation of frequencies for 7 card hands
The following computations show how the above frequencies were determined. To understand these derivations, the reader should be familiar with the basic properties of the binomial coefficients and their interpretation as the number of ways of choosing elements from a given set. See also: sample space and event (probability theory).


 * Straight flush &mdash; Each straight flush is uniquely determined by its highest ranking card; these ranks go from 5 (A-2-3-4-5) up to A (T-J-Q-K-A) in each of the 4 suits. For any particular suit where the straight flush is ace-high, the extra 2 cards may be chosen from the remaining 47 cards. In the 9 remaining cases when the straight flush is not ace-high, the extra 2 cards may be chosen from the remaining 47 cards, minus the card in that suit directly above the high-card (which would change the rank of the hand). Thus, the total number of straight flushes is:


 * $${4 \choose 1}\left[{47 \choose 2} + {9 \choose 1}{46 \choose 2}\right] = 41,584$$


 * Four of a kind &mdash; Any 1 of the 13 ranks can form the four of a kind. The extra 3 cards may be chosen from the remaining 48 cards. Thus, the total number of four of a kinds is:


 * $${13 \choose 1}{48 \choose 3} = 224,848$$


 * Full house &mdash; With 7 cards, a full house may be constructed in 1 of 3 ways:


 * 1 triple, 1 pair and 2 kickers
 * The triple may be 1 of 13 ranks, and by definition 3 of the 4 of that rank are chosen. The pair may be 1 of the remaining 12 ranks, and (again, by definition) 2 of the 4 of that rank are chosen. The ranks of the 2 kickers are chosen from the remaining 11 ranks, and 1 of the 4 of each rank are chosen.  Thus, the total number of full houses in this form is:


 * $${13 \choose 1}{4 \choose 3}{12 \choose 1}{4 \choose 2}{11 \choose 2}{4 \choose 1}^2 = 3,294,720$$


 * 1 triple and 2 pairs
 * The triple is chosen the same way as before, the ranks of the two pairs are chosen from the remaining 12 ranks, and the 2 of the 4 of each rank are chosen as usual. Thus, the total number of full houses in this form is:


 * $${13 \choose 1}{4 \choose 3}{12 \choose 2}{4 \choose 2}^2 = 123,552$$


 * 2 triples and 1 kicker
 * The ranks of both triples are chosen from the 13, then the rank of the kicker is chosen from the remaining 11 ranks. Thus, the total number of full houses in this form is:


 * $${13 \choose 2}{4 \choose 3}^2{11 \choose 1}{4 \choose 1} = 9,152$$


 * Thus, the total number of full houses is:


 * $$3,294,720 + 123,552 + 9,152 = 3,473,184\,$$


 * Flush &mdash; A flush may be formed with either 5, 6 or 7 cards in any of the 4 suits. The flush cards are chosen from the 13 in that suit, and the extra cards (if any) are chosen from the other 3 suits.  The number of straight flushes must then be subtracted from the total.  Thus, the total number of flushes is:


 * $${4 \choose 1}\left[{13 \choose 5}{39 \choose 2} + {13 \choose 6}{39 \choose 1} + {13 \choose 7}\right] - 41,584 = 4,047,644$$


 * Straight &mdash; Significantly more complications arise when working out the frequencies for a 7 card straight due to the possibility of a straight and a flush (though not necessarily a straight flush) being formed simultaniously, and the fact that pairs and triples of cards can appear. Therefore, the calculations must be broken down into several separate sections:


 * 7 distinct ranks


 * In this type of straight, all 7 cards are of unique ranks (ie. no pairs occur). First, ignoring suits, the total number of possible sets (combinations) that form a straight with 7 distinct ranks is found.  As with straight flushes, a straight is defined by its high card.  With an ace-high straight, the ranks of the 2 extra cards may be chosen from any of the remaining 8 ranks, while with the 9 other possible straights, any of the ranks but the rank directly above the high card may be chosen.  Thus, the total number of sets of ranks is:


 * $${8 \choose 2} + {9 \choose 1}{7 \choose 2} = 217$$


 * Next, the total number of possible sets of suits, for any of the sets of ranks, is found. Given that each card is of a distinct rank, the total number of sets of suits is:


 * $${4 \choose 1}^7 = 16,384\,$$


 * However, the instances where a flush is formed must be subtracted from the total; there are 3 ways of achieving this: There is 1 case per suit where all 7 are of the same suit. If 6 of the 7 are in the same suit, then the remaining card is chosen from the remaining 3 suits.  If 5 of the 7 in the same suit, then 2 independent choices are made for each of the extra cards.  Thus, the total number of cases where a flush is formed with 7 distinct ranks is:


 * $${4 \choose 1}\left[1 + {7 \choose 6}{3 \choose 1} + {7 \choose 5}{3 \choose 1}^2\right] = 844$$


 * Thus, the total number of sets of suits which produce a straight, but not a flush is:


 * $$16,384 - 844 = 15,541\,$$


 * And as each set of suits occurs for each set of ranks, the total number of straights with 7 distinct ranks is:


 * $$217 \cdot 15,541 = 3,372,180\,$$


 * 6 distinct ranks


 * A straight can also be formed with only 6 distinct ranks (ie. the hand contains 1 pair). In this case, one of the extra cards will have the same rank as one of the cards forming the straight, therefore only one extra rank need be chosen.  Thus, the total number of sets of ranks is:


 * $${8 \choose 1} + {9 \choose 1}{7 \choose 1} = 71$$


 * The way to proceed now is to calculate the total number of ways to form a pair, and then calculate the total number of ways to form a straight, but not a flush (given that the pair has already been chosen). The pair can be 1 of the 6 previously chosen ranks, and 2 of the 4 of that rank form the pair.  Thus, the total number of ways for form a pair is:


 * $${6 \choose 1}{4 \choose 2} = 36$$


 * The total number of sets of suits for the remaining 5 cards can be calculated in the same way as for 7 cards:


 * $${4 \choose 1}^5 = 1,024\,$$


 * As with 7 distinct ranks, the instances where a flush is formed must be subtracted from the total. The remaining 5 cards can be chosen in two different manners in order to form a flush: either they are all of the same suit, or 4 of them are in the same suit as either of the two paired cards.  If all 5 are in the same suit, 1 of the 4 suits is chosen.  If 4 of the 5 are in the same suit, 1 of the 2 suits forming the pair is chosen, and the suit of the extra card is chosen from the remaining 3 suits.  Thus the total number of ways to form a flush is:


 * $${4 \choose 1} + {5 \choose 4}{2 \choose 1}{3 \choose 1} = 34$$


 * Thus, the total number of sets of suits which produce a straight, but not a flush is:


 * $$1,024 - 34 = 990\,$$


 * Thus the total number of straights with 6 distinct ranks equals the total number of sets of ranks, multiplied by the total number of ways to form the pair, multiplied by the total number of ways to form a straight:


 * $$71 \cdot 36 \cdot 990 = 2,530,440\,$$


 * 5 distinct ranks with a triple


 * There are two ways to form a straight with 5 distinct ranks. The first is using 3 cards of the same rank, and 4 of separate ranks.  There are only 10 sets of ranks in this case, as there are no extra ranks to be chosen.  The triple can be 1 of the 5 ranks, and 3 of the 4 of that rank make up the triple.  Thus, the number of ways to choose the triple is:


 * $${5 \choose 1}{4 \choose 3} = 20$$


 * The total number of sets of suits for the remaining 4 cards is $$4^4$$ and the only ways to form a flush are if all 4 cards are of the same suit as 1 of the 3 suits forming the triple. Thus, the total number of straights form a straight, but not a flush is:


 * $${4 \choose 1}^4 - {3 \choose 1} = 253\,$$


 * Thus the total number of straights with 5 distinct ranks and a triple is:


 * $$10 \cdot 20 \cdot 253 = 50,600\,$$


 * 5 distinct ranks with 2 pairs


 * The second way to form a straight with 5 distinct ranks is to have 2 pairs and 3 other cards of separate ranks. As before, there are 10 different sets of ranks, however, calculating the number of ways that a flush is formed is complicated, due to the fact that the two pairs can consist of either 2,3 or 4 suits.  Firstly, the ranks for the two pairs are chosen from the 5 available.  Thus, the number of ways to choose the ranks for the two pairs is:


 * $${5 \choose 2} = 10$$


 * Then the cards are chosen for each of the pairs. Thus, the number of ways to choose the suits for the pairs is:


 * $${4 \choose 2}^2 = 36$$


 * 6 of these ways, the pairs consist of 2 suits, 24 of these ways the pairs consist of 3 suits, and the remaining 6 of these ways they consist of 4 suits. Note that the total number of sets of suits for the remaining 3 cards is $$4^3$$.  When the pairs consist of 2 suits, a flush will be formed when the remaining 3 cards are all in either of those two suits.  There are 2 ways of this happening which must be subtracted from the total.  When there are 3 suits, a flush will be formed when the remaining 3 cards are all in the suit of the 2 cards of matching suit in the pairs.  There is 1 way of this happening.  When there are 4 suits there are no ways of making a flush.  Thus, the total number of sets of suits that do not form a flush is:


 * $$6 \cdot \left[64 - {2 \choose 1}\right] + 24 \cdot (64 - 1) + 6 \cdot 64 = 2,268\,$$


 * Thus, the total number of straights with 5 distinct ranks and 2 pairs is:


 * $$10 \cdot 10 \cdot 2,268 = 226,800\,$$


 * Thus, the total number of straights is:


 * $$3,372,180 + 2,530,440 + 50,600 + 226,800 = 6,180,020\,$$


 * Three of a kind &mdash; A three of a kind must consist of 5 of the 13 ranks, but the 10 combinations that form straights must be subtracted, giving the total number of sets of ranks as:


 * $${13 \choose 5} - 10 = 1,277$$


 * The rank of the triple is chosen from the 5 available, and 3 of the 4 of that rank are chosen. Thus, the total number of ways of choosing the triple is:


 * $${5 \choose 1}{4 \choose 3} = 20$$


 * There are $$4^4$$ ways to choose the suits of the remaining 4 cards, minus the ways in which all 4 match one of the 3 suits in the triple (making a flush):


 * $${4 \choose 1}^4 - {3 \choose 1} = 253$$


 * Thus, the total number of three of a kinds is:


 * $$1,277 \cdot 20 \cdot 253 = 6,461,620\,$$


 * Two pair &mdash; A two pair can be formed in 2 ways:


 * 3 pairs with 1 kicker


 * The 4 ranks are chosen, then 3 of the 4 are chosen for the 3 pairs, and 2 of the 4 of each rank are chosen for each pair. The kicker is then chosen from the 4 cards in the remaining rank.  Thus, the total number of 3 pairs with 1 kicker is:


 * $${13 \choose 4}{4 \choose 3}{4 \choose 2}^3{4 \choose 1} = 2,471,040$$


 * 2 pairs with 3 kickers


 * A two pair hand must consist of 5 of the 13 ranks, but the 10 combinations that form straights must be subtracted. 2 of the ranks are chosen for the pairs and as with the calculations for straights with 5 ranks and two pairs, there are 2,268 sets of suits that do not form flushes.  Thus, the total number of 2 pairs with 3 kickers is:


 * $$\left[{13 \choose 5} - 10\right]{5 \choose 2} \cdot 2,268 = 28,962,360$$


 * Thus, the total number of two pairs is:


 * $$2,471,040 + 28,962,360 = 31,433,400\,$$


 * Pair &mdash; A pair hand must consist of 6 of the 13 ranks, but the combinations that form straights must be subtracted. There are 9 ways to form a 6 card straight (6- to ace-high).  With 5 card straights, when the straight is either 5- or ace-high, the remaining card may be selected from any of the 8 other ranks, minus the rank at the open end of the straight (6 and 9 respectively).  In any of the other 8 situations, the remaining card may be selected from any of the other 8 ranks, minus the two ranks at either end of the straight.  Thus, the total number of sets of ranks that do not form straights is:


 * $${13 \choose 6} - 9 - \left[2 \cdot {7 \choose 1} + 8 \cdot {6 \choose 1}\right] = 1,645$$


 * There are $$4^5$$ ways of choosing the ranks of the kickers, and as with the calculations for straights with 6 distinct suits, there are 34 sets of suits that form flushes, therefore the total number of sets of suits that do not form flushes is:


 * $${4 \choose 1}^5 - 34 = 990$$


 * Thus, the total number of pair hands is:


 * $$1645 \cdot 36 \cdot 990 = 58,627,800$$


 * No pair &mdash; The 7 ranks are chosen, but the combinations that form straights must be subtracted. There are 8 ways to form a 7 card straight (7- to ace-high).  With 6 card straights, as with 5 card straights in the pair hand calculations, any of the remaining ranks minus 1 may be chosen for the highest and lowest straight (6 ranks), while in the other cases, any remaining rank minus 2 may be chosen (5 ranks).  With 5 card straights, the calculations are the same as with pairs, but 2 cards must be chosen rather than 1.  Thus, the total number of sets of ranks that do not form straights is:


 * $${13 \choose 6} - 8 - \left[2 \cdot {6 \choose 1} + 7 \cdot {5 \choose 1}\right] - \left[2 \cdot {7 \choose 2} + 8 \cdot {6 \choose 2}\right] = 1,499$$


 * There are $$4^7$$ ways of choosing the suits of the cards, and as with the calculations for straights with 7 distinct suits, there are 844 sets of suits that form flushes, therefore the total number of sets of suits that do not form flushes is:


 * $${4 \choose 1}^7 - 844 = 15,540$$


 * Thus, the total number of no pair hands is:


 * $$1,499 \cdot 15,540 = 23,294,460\,$$