Poker probability
In poker, the probability of each type of 5-card hand can be computed by calculating the proportion of hands of that type among all possible hands. History. Probability and gambling have been ideas since long before the invention of poker. The development of probability theory in the late 1400s was attributed to gambling; when playing a game with high stakes, players wanted to know what the chance of winning would be. In 1494, Fra Luca Paccioli released his work which was the first written text on probability. Motivated by Paccioli's work, Girolamo Cardano (1501-1576) made  further developments in probability theory. His work from 1550, titled "Liber de Ludo Aleae", discussed the concepts of probability and how they were directly related to gambling. However, his work did not receive any immediate recognition since it was not published until after his death. Blaise Pascal (1623-1662) also contributed to probability theory. His friend, Chevalier de Méré, was an avid gambler with the goal to become wealthy from it. De Méré tried a new mathematical approach to a gambling game but did not get the desired results. Determined to know why his strategy was unsuccessful, he consulted with  Pascal. Pascal's work on this problem began an important correspondence between him and fellow mathematician Pierre de Fermat (1601-1665). Communicating through letters, the two continued to exchange their ideas and thoughts. These interactions led to the conception of basic probability theory. To this day, many gamblers still rely on the basic concepts of probability theory in order to make informed decisions while gambling. Frequency of 5-card poker hands. The following chart enumerates the (absolute) frequency of each hand, given all combinations of 5 cards randomly drawn from a full deck of 52 without replacement. Wild cards are  not considered. In this chart: The "nCr" function on most scientific calculators can be used to calculate hand frequencies; entering with and , for example, yields formula_1 as above. The royal flush is a case of the straight flush. It can be formed 4 ways (one for each suit), giving it a probability of 0.000154% and odds of 649,739 : 1. When ace-low straights and ace-low straight flushes are not counted, the probabilities of each are reduced: straights and straight flushes each become 9/10 as common as they otherwise would be. The 4 missed straight flushes become flushes and the  1,020 missed straights become no pair. Note that since suits have no relative value in poker, two hands can be considered identical if one hand can be transformed into the other by swapping suits. For example, the hand 3♣ 7♣ 8♣ Q♠ A♠ is identical to 3♦ 7♦ 8♦ Q♥ A♥ because replacing all of the clubs in the first hand with diamonds and all of the spades with hearts produces the second hand. So eliminating identical hands that ignore relative suit values, there are only 134,459 distinct hands. The  number of distinct poker hands is even smaller. For example, 3♣ 7♣ 8♣ Q♠ A♠ and 3♦ 7♣ 8♦ Q♥ A♥ are not identical hands when just ignoring suit assignments because one hand has three suits, while the other hand has only two—that difference could affect the relative value of each hand when there are more cards to come. However, even though the hands are not identical from that perspective, they still form equivalent poker hands because each hand is an A-Q-8-7-3 high card hand. There  are 7,462 distinct poker hands. Frequency of 7-card poker hands. In some popular variations of poker such as Texas hold 'em, a player uses the best five-card poker hand out of seven cards. The frequencies are calculated in a manner similar to that shown for 5-card hands, except additional complications arise due to the extra two cards in the 7-card poker hand. The total number of distinct 7-card hands is formula_3. It is notable that the probability of a no-pair hand is "lower" than the probability of a one-pair or two-pair hand . The Ace-high straight flush or royal flush is slightly more frequent (4324) than the lower straight flushes (4140 each) because the remaining two cards can have any value; a King-high straight flush, for example, cannot have the Ace of its suit in the hand (as that would make it ace-high instead). Since suits have no relative value in poker, two hands can be considered identical if one hand can be transformed into the other by swapping suits. Eliminating identical hands that ignore relative suit values leaves 6,009,159 distinct 7-card hands. The number of distinct 5 -card poker hands that are possible from 7 cards is 4,824. Perhaps surprisingly, this is fewer than the number of 5-card poker hands from 5 cards, as some 5-card hands are impossible with 7 cards (e.g. 7-high and 8-high). Frequency of 5-card lowball poker hands. Some variants of poker, called lowball, use a low hand to determine the winning hand. In most variants of lowball, the ace is counted as the lowest card and straights and flushes don't count against a low hand, so the lowest hand is the five-high hand A-2-3 -4-5, also called a "wheel". The probability is calculated based on formula_1, the total number of 5-card combinations. (The frequencies given are exact; the probabilities and odds are approximate.) As can be seen from the table, just over half the time a player gets a hand that has no pairs, threes- or fours-of-a-kind. (50.7%) If aces are not low, simply rotate the hand descriptions so that 6-high replaces 5-high for the best hand and ace-high replaces king-high as the worst hand. Some players do not ignore straights and flushes when computing  the low hand in lowball. In this case, the lowest hand is A-2-3-4-6 with at least two suits. Probabilities are adjusted in the above table such that "5-high" is not listed", "6-high" has one distinct hand, and "King-high" having 330 distinct hands, respectively. The Total line also needs adjusting. Frequency of 7-card lowball poker hands. In some variants of poker a player uses the best five-card low hand selected from seven cards. In most variants of lowball, the ace is counted as the lowest card and straights and flushes don't count  against a low hand, so the lowest hand is the five-high hand A-2-3-4-5, also called a "wheel". The probability is calculated based on formula_3, the total number of 7-card combinations. The table does not extend to include five-card hands with at least one pair. Its "Total" represents the 95.4% of the time that a player can select a 5-card low hand without any pair. If aces are not low, simply rotate the hand descriptions so that 6-high replaces 5-high for the best hand and ace-high replaces king-high as the  worst hand. Some players do not ignore straights and flushes when computing the low hand in lowball. In this case, the lowest hand is A-2-3-4-6 with at least two suits. Probabilities are adjusted in the above table such that "5-high" is not listed, "6-high" has 781,824 distinct hands, and "King-high" has 21,457,920 distinct hands, respectively. The Total line also needs adjusting.