Talk:Poker probability

message: For posterity, below is a Python program that calculates the number of each kind of poker hand.  It is roughly the same logic used in the article.  (This code was written independently of the article.)  --Doradus 07:42, Apr 13, 2005 (UTC)
    def choose( n, r ):
        if r > 0:
            return n * choose( n-1, r-1 ) / r
        else:
            return 1
    
    rf    = 4
        # 4 suits, all cards determined
    sf    = 4 * 9
        # 4 suits * 9 high cards (5 to K); all others determined
    four  = 13 * 48
        # 13 values for the quadruple, and any of the other 48 as a kicker
    fh    = choose(4,3)*13 * choose(4,2)*12
        # Any three of any value, and any two of a different value
    fl    = choose(13,5)*4 -sf-rf
        # Any 5 from any of the 4 suits, but not a straight flush
    st    = 4*10 * 4**4 -sf-rf
        # 4 suits * 10 high cards (5 to A), and the other 4 can be any suit, but exclude straight flush
    three = choose(4,3)*13 * choose(12,2)*4**2
        # Any three of any value, and any two of different values of any suit
    twop  = choose(4,2)*13 * choose(4,2)*12 * 44 / 2
        # Any two of any two values, and any kicker of a different value
        # Divide by two, otherwise each hand will be counted twice (eg. 8866K and 6688K)
    pair  = choose(4,2)*13 * choose(12,3) * 4**3
        # Any two of any value, and any three of different values, of any suit
    dud   = choose(13,5) * 4**5 -fl-st-sf-rf
        # Any five different values, any suits, except flushes or straights
    
    total = rf+sf+four+fh+fl+st+three+twop+pair+dud
    
    print "    Royal flush:", rf
    print " Straight flush:", sf
    print " Four of a kind:", four
    print "     Full house:", fh
    print "          Flush:", fl
    print "       Straight:", st
    print "Three of a kind:", three
    print "       Two pair:", twop
    print "           Pair:", pair
    print "        No pair:", dud
    print "          Total: %d (should be %d)" % ( total, choose(52,5) )
Output is this:
        Royal flush: 4
     Straight flush: 36
     Four of a kind: 624
         Full house: 3744
              Flush: 5108
           Straight: 10200
    Three of a kind: 54912
           Two pair: 123552
               Pair: 1098240
            No pair: 1302540
              Total: 2598960 (should be 2598960)
: Straight flush line should be "sf = 4 * 9 - rf", otherwise that 4 is removed twice from the flushes count. The result stays the same either way.
: I'm also getting fewer straights (9180) by enumerating all possible hands and then classifying them. 80.111.220.24 (talk) 20:09, 19 July 2015 (UTC)
thread_title: Computing combinations

message: Does anyone other than myself and Revolver have an opinion on the wording of the hand combination calculations?  Here is a diff that contains the two contenders.  --Doradus 18:03, Jun 8, 2005 (UTC)
: The Royal "we" is standard in mathematics.  I wouldn't bother to eliminate it, but it has already been changed and looks OK as it is now (without "we").  Bubba73 (talk), 06:42, 30 November 2005 (UTC)
replies: text:  Correction, not the "Royal we" but pluralis auctoris (inclusion of readers or listeners).  Bubba73 (talk), 00:31, 1 December 2005 (UTC)
thread_title:  Procedural wording, part deux 

message: How about adding a table for the best 5-card hand within 7 cards (like the popular Texas Hold'em and 7-Card Stud)?  The percentages/odds are a little different.  Notably, no-pair is less frequent than 1- or 2-pair.  Here are my calculations for the number of each kind of hand:
*Straight Flush: 41,584
*4-of-a-kind: 224,848
*Full House: 3,473,184
*Flush: 4,047,644
*Straight: 6,180,020
*3-of-a-kind: 6,461,620
*2-pair: 31,433,400
*1-pair: 58,627,800
*no-pair: 23,294,460
*total: 133,784,560
Spiffy sperry 22:07, 26 September 2005 (UTC)
thread_title: Seven-card hands

message: Shouldn't total probability be 1 : 1?  --Hector 14:49, 25 July 2006 (UTC)
replies: text: That's a matter of terminology: "probability" is expressed as a single real number from 0 to 1, often expressed as a fraction, where the numerator is total choices. Thus, a one-out-of-four chance has a probability of 1/4, or 0.25 (or 25%).  But "odds" are expressed as a ratio of positive to negative outcomes, so a one-out-of-four chance is expressed as odds of 3:1 (read "three to one against").  Thus, a probability of 1.0 (certainty) is 0:1 odds. 1:1 odds represents 0.50 probability ("even money").  Odds are useful because they reflect the fair payout on a bet: if you were to bet $1 on something with a 0.25 probability, the fair payoff would be $3.  --LDC 15:52, 25 July 2006 (UTC)
thread_title:  1:1 

message: To explain my reversion of three edits by 169.226.156.69:
#: in standard poker variants, it is actually more likely that ace is both high and low.  Although you are correct that the odds are different when ace cannot be either high or low, the odds should reflect the most common usage.  It would be acceptable to ALSO include the odds for when ace is only high or low.
#: The odds updated in the table should not be based on ace only being low.  In addition, if the ace is only low, then the odds of a flush and no-pair (high card) hand would also have to be adjusted.  (The odds of these hands increase by an offsetting amount for the decrease in straight flushes and straights.)
#: The table does not separate out the royal flush from the straight flush.  A royal flush is a straight flush and is included in the odds for a straight flush.
—Doug Bell talk 22:24, 3 December 2006 (UTC)
thread_title:  Reverted edits by [[User:169.226.156.69|169.226.156.69]] 

message: What is my failure if I calculate the number of possibilities for a flush this way?:
:{4 \choose 1} {13 \choose 5} {47 \choose 2} = 5,564,988
(If I take the 2 kickers of the 47 cards, I have also the 5, 6 and 7-card flush possibility)
87.181.53.244 11:29, 29 December 2006 (UTC)
replies: text: The failure is that you are counting 6 and 7 card flushes multiple times.  This happens because the same cards can be selected in both the \begin{matrix} {13 \choose 5} \end{matrix} and \begin{matrix} {47 \choose 2} \end{matrix} terms.  For example, choosing ♥; 2, 4, 5, 9, J; 6♥, Q♣ for the terms and choosing ♥; 2, 4, 6, 9, J; 5♥, Q♣ both produce the same hand.  When calculating combinations, you have to structure the equation such that the terms are exclusive. —Doug Bell talk 19:13, 20 January 2007 (UTC)

text: I should also have mentioned that you are also counting straight flushes, four-of-a-kind, and full houses in your equation.  The higher ranked hands have to be eliminated. —Doug Bell talk 19:53, 20 January 2007 (UTC)

text: The full correct computation can be found here: http://people.math.sfu.ca/~alspach/comp20/. Thomas Tvileren (talk) 09:37, 30 April 2019 (UTC)
thread_title:  Probability of a flush in 7-card poker 

message: I notice that the computation for four of a kind is given as
:{13 \choose 1} {48 \choose 1} = 624
which is the correct result. However is it not more accurate to say that there are 13 possible rankings and from each rank 4 are chosen from each suit; making the computation:
:{13 \choose 1} {4 \choose 4} {48 \choose 1} = 624
this is probably a pedant's delight but I make this point because this page is used by persons (such as me) with no real interst in poker but lots of interest in combinatorics.
AWR
:Since I'd also thought that should be changed, I've changed it. —Doug Bell talk 19:15, 20 January 2007 (UTC)
replies: text: {13 \choose 2} {4 \choose 4} {4 \choose 1} = 312
Getting a four-of-a-kind after all is choosing two different ranks, and out of that, 4 cards of one rank is chosen and 1 card out of the other rank is chosen. AstroNox (talk) 11:47, 20 November 2011 (UTC)
thread_title:  Four of a kind 

message: It has been heard of for poker games to be played on non-standard decks. Would it be acceptable to add a section generalising the probabilities of the hands? —The preceding unsigned comment was added by 220.240.252.135 (talk) 20:59, 3 May 2007 (UTC)
thread_title:  Other Decks 

message: Remember that when expressing odds to do the subtract-one thing: a 1-in-4 probability is 3-to-1 odds, not 4-to-1. Several times now people have "fixed" the straight flush odds in this article to 64974 instead of the correct number of 64973, since it is expressed as odds, not probability. Please stop "fixing" this! --LDC 06:15, 14 August 2007 (UTC)
thread_title:  Expressing Odds 

message: Some parts of the calcs explanations are missing like here: "A three of a kind must consist of 5 of the 13 ranks, but the 10 combinations that form straights must be subtracted."
It doesn't show how the 10 was calculated.  —Preceding unsigned comment added by 189.58.240.130 (talk) 20:35, 9 March 2009 (UTC)
thread_title:  Leak of Explanations 

message: Listed as 72,193.33 : 1, should be 72,192.33 : 1? I haven't checked the rest of them. 22nd May 2009  —Preceding unsigned comment added by 82.39.228.91 (talk) 13:29, 22 May 2009 (UTC)
thread_title:  Straight Flush 

message: I find it funny that in a PROBABILITY article, probabilities aren't expressed in the standard way. If there's an equal chance of something happening and not happening, by far most widespread (and almost the only seriously used) way to write this probability is 1/2, or 0.5. Not 50% or 1:1. The reason is that fractional probabilities lend themselves well to computation (you can directly multiply them, etc).  —Preceding unsigned comment added by 78.0.219.44 (talk) 13:53, 29 July 2009 (UTC)
thread_title:  probability 

message: I alway play poker with joker. I want to know probability. I can't calculate by my self.  —Preceding unsigned comment added by ThoraninC (talk • contribs) 10:14, 26 August 2009 (UTC)
thread_title:  Joker 

message: : (The frequencies given are exact; the probabilities and odds are approximate.)
I think that technical note should immediately follow each table rather than somewhere precede it. For the two 7-card tables only, I have made the change. (Indeed, I am inclined to make it a footnote referenced by a repeated superscript, but it's hard to swim against the tide that footnotes are for notes on sources.)
I think the low-ball tables should include listings for "one pair or better" so that they sum to 100%.
For me the table illustrated with card symbols would be much improved by narrowing the last four columns, decreasing the window size needed to display all five cards in a row. --P64 (talk) 21:38, 20 July 2010 (UTC)
replies: text: Are the four tables consistent in their treatment of "straight" as excluding or including "straight flush", and so on? (I abstain from what should be done in that regard.) In section "Frequency of 7-card poker hands" I tried to make a correction that doesn't impinge on that issue. --P64 (talk) 21:46, 20 July 2010 (UTC)
thread_title:  Technical note and layout for tables 

message: Total 1:1... so I have a 50/50 chance of getting dealt any hand? 212.68.15.66 (talk) 13:30, 26 January 2011 (UTC)
thread_title:  Odds 

message: The number of combinations of two pairs is given as:
{13 \choose 2}{4 \choose 2}^2{11 \choose 1}{4 \choose 1} = 123552
The rationale is: out of 13 ranks, choose two. Of these two chosen ranks, choose two suits out of the four. Of the remaining 11 ranks, choose one, and choose one suit out of the four.
Why aren't the following correct?
{13 \choose 1}{4 \choose 2}{12 \choose 1}{4 \choose 2}{11 \choose 1}{4 \choose 1} = 247104
Rationale: out of 13 ranks, choose one, and choose two suits out of the four. Of the remaining 12 ranks, choose one, and choose two suits out of the four. Of the remaining 11 ranks, choose one, and choose one suit out of the four.
{13 \choose 3}{4 \choose 2}^2{4 \choose 1} = 41184
Rationale: out of 13 ranks, choose three. For two of the ranks chosen, choose two suits out of the four. And for the remaining rank, choose one suit out of the four.
--AstroNox (talk) 11:57, 20 November 2011 (UTC)
replies: text: {13 \choose 2} is not equal to {13 \choose 1}{12 \choose 1}  and the reason is that the last one will double count permutations, while the first will not care about permutations  — Preceding unsigned comment added by 128.39.164.38 (talk) 16:46, 7 December 2014 (UTC)
thread_title:  Two pairs 

message: The term frequency is being used in this article for something that is not a frequency by any normal definition of that term. What it appears to mean in this context is the number of ways of getting a particular hand. If this usage is standard in poker circles then I'd suggest someone add an appropriate definition at the top of the page (and on the poker hands page since the same thing is used there). If it is not standard and is only used in the one book that appears to be cited for it then I would remove it completely from the article as it doesn't appear to add any useful information over the probabilities (which actually contain more information than the frequency).  — Preceding unsigned comment added by 110.20.55.225 (talk) 09:34, 2 October 2014 (UTC)
thread_title:  Frequency as a term 

message: There is boiler plate attached to the top of this article, objecting to lack of secondary sources and primary/original research.  What do you think?   Can the same standards be rationally attached to a mathematical article as to other topics?  Now if someone goes and does his own original research on primary sources to establish facts about the Aztec Indians, the readers cannot readily validate his reasearch just by examining what the author wrote.  But math is quite different.  Anyone who knows math can directly examine the mathematical reasoning without going anywhere or personally examining the primary sources of that author.  Moreover, IMHO, essentially mathematics is basically nondisputable though based on axioms (which can be varied -- people may disagree on what is self-evident).  I mean Republicans and Democrats have the same math.  If a mathematical proof can be posted to support the contention that two triangles with Side-Angle-Side equality are congruent triangles, should the Wikipedia policy be to censor the mathematical proof in favor of "Professor Watson, in his book, The Pecularities of Triangles, says so"?  Or should there be a different standard for mathematical articles as opposed to other articles?  (PeacePeace (talk) 23:53, 25 June 2016 (UTC)
replies: text: Where do you draw the line between WP:OR and WP:CALC? While basic probability calculations may be considered routine by some, I would suggest they are not trivial to the average reader of Wikipedia. The section I wrote (ages ago), Derivation of frequencies of 7-card poker hands, cites a source, but the other sections do not. I believe it is reasonable to provide a source if there is any chance that your reasoning (even mathematical reasoning) might be wrong. Consider the article, Poker probability (Texas hold 'em), which, in my opinion, oversteps the line by quite a margin. Hpesoj00 (talk) 19:13, 14 August 2016 (UTC)
thread_title:  Boiler Plate Complaints 

message: "Wild cards are not considered." Why not? There are many variants with one or more jokers around. Using a joker as a wild card affects the relative probability of various poker hands. For example, if I calculated correctly, a flush will be less likely than a full house when use a joker as a fully wild card. That would make a flush the higher hand. This might be useful information for home players. Let's say I'm playing poker and I have a flush. At showdown, another player shows a full house. If this article includes information about how various hands relate to each other with one joker in the game, we could end all discussion. So is this worth considering? Steinbach (talk) 14:20, 4 October 2017 (UTC)
thread_title:  With one or more jokers 

message: I'll give deference to the gambling mathematics community if I'm off base here from their terminology, but when thinking about probabilities, I've worked with continuous distributions. The Probability function (PDF) is the probability for any particular even happening, from least to highest value (i.e. negative to positive real numbers). The cumulative distribution function (CDF) is the integral of the PDF and CDF(X) represents that fraction of results having value X or lower. Thus if p(three-of-a-kind) = 0.0211, the probability of getting any hand of equal or lesser value is 0.9789. We could represent that the probability that another hand has a higher value at 1- 0.9789, or 0.0289.
Can someone clarify--it this a poker statistics terminology, or should we use more standard statistical terminology? Who cares?  — Preceding unsigned comment added by 204.44.137.252 (talk) 15:42, 6 April 2020 (UTC)
thread_title:  Cumulative probabilities 

message: These sections were swapped around with the argument that the 7-card hands were "more relevant" and that some inattentive websites have been confused and quoted the 5-card probabilities as if they referred to 7-card.
Structurally I would have said it made more sense to start with the simpler 5-card calculation, and then to move on to the (as the article text has it) "additional complications" of a 7-card game. The swapped version might be more efficient for readers and web editors looking to quickly read off some numbers, but for an WP:AUDIENCE wanting to understand poker probability, it can be more clearly explained if 5-card comes first. If the 5-card section was sometimes being misread as applying to Texas Hold 'Em, that should be possible to clarify at the start of that section rather than going straight into .
With this swap, all of the introductory text (explaining what "cumulative probability" is, etc) has been left in the now-lower 5-card section, with the 7-card section talking of "a manner similar to that shown for 5-card hands" before this has been mentioned. If 7-card is worth mentioning first, the article needs some rewriting in addition to just swapping two sections around.
I've swapped the sections back and added a sentence to the top of 5-card that explicitly mentions straight and five-card draw poker and the lack of hole cards. Belbury (talk) 09:34, 16 January 2023 (UTC)
thread_title:  Explain 5- or 7-card hands first?