17 Dec 2001 I haven't written about things mathematical in a while, so I think I will talk about a little probability "paradox" that arises in poker. I've talked about the value of bluffing in poker to maximize expected return, so now I will look at particular probabilities themselves. Now, I always forget the ordering of hands in poker, and when I do, I just calculate the probabilities of getting each hand in 5-card stud; I remember calculating for 7-card stud, and even best-chance for 5-card draw, and they all result in the same ordering of hands. Logically, the least likely poker hands have the highest precedence. To begin with, some basic facts: -using 52-card deck -4 suits (hearts, clubs, diamonds, spades) -13 face values per suit (2 - 10, Jack, Queen, King, Ace) I'm going to ignore small details like royal flush vs. non-royal straight flush. That's not of interest for this demonstration. I'm not going to prove the following, because I don't really want to get into the basics of combinatorics here, but the number of ways to choose k things from a set of n things (and order doesn't matter) is n_C_k ("n choose k") which is n!/(k! (n-k)!) First of all, there are 52_C_5 = 2,598,960 different 5-card poker hands. This will be the denominator of all the probabilities we are interested in, because each individual hand is equally likely of being dealt (unless one is playing against Maverick). So, here are the possible hands: Four of a kind (4 cards of same face value, 1 card not matching) Three of a kind (3 cards of same face value, 2 cards not matching any others) Two pair (2 cards with same face value, 2 cards with same face value different from the first 2, and 1 card not matching the other 4 in face value) One pair (2 cards with same face value, 3 cards not matching any others in face value) Full House (3 cards matching in face value, 2 cards matching in face value but not matching first 3) Straight flush (5 cards with same suit, and face values in consecutive order) Flush (5 cards with same suit, but not consecutive face values) Straight (5 cards with consecutive face values, but not all same suit) High Card (the leftover category... none of the above) So let's calculate some probability here! Four of a kind: First of all you have to choose the face value of the four matching cards. There are 13 possible face values. Then, given the face value, there's only one way to get those 4 with the same face value. Finally, there are 48 remaining cards to choose 1 among. So here's the calculation of the number of ways to get four of a kind: 13_C_1 * 4_C_4 * 48_C_1 = 13*1*48 = 624 Probability = 624/2598960 = .00024 Very unlikely - .02% - chance of getting this hand. Three of a kind: First of all, choose the face value of the three matching cards, and then out of the four cards with that face value, choose 3. Finally, one must choose two =other= face values for the remaining two cards, and for each of those face values, there are 4 cards to choose 1 from. number of ways to get three of a kind: 13_C_1*4_C_3*12_C_2*4_C_1*4_C_1 = 13*4*66*4*4 = 54912 Probability = 54912/2598960 = .0211 Not bad, one hundred times more likely than getting 4-of-a-kind. Two pair: First we have to choose the face values of the two pairs, then for each pair, we have to choose 2 cards from the 4 with those face values. Finally, there are 44 cards left over not matching in face value to the two pairs, and we need one of those cards. number of ways to get two pairs: 13_C_2*4_C_2*4_C_2*44_C_1 = 78*6*6*44 = 123552 Probability = 123552/2598960 = .0475 So this is about as twice as likely as getting three-of-a-kind. One pair: First we choose the suit of the pair, then we get 2 of the four cards with that face value. Then, for the three remaining cards, we have to choose three different face values for these cards out of the 12 face values remaining. Finally, for each of the remaining face values, one has to pick 1 card out of the 4 cards with those face values. number of ways to get one pair: 13_C_1*4_C_2*12_C_3*4_C_1*4_C_1*4_C_1 = 13*6*220*4*4*4=1098240 probability = 1098240/2598960 = 0.4226 Wowza! This is getting into the "reasonable probability" range, as in, you expect to see this hand crop up often enough you during poker games, as opposed to its less likelier cousins... Full house: First, we have to choose the face value for the three-of-a-kind, then pick 3 of the 4 cards with that face value. Then, we choose the face value for the pair, and pick two of the four cards with that face value. number of ways to get a full house: 13_C_1*4_C_3*12_C_1*4_C_2 = 13*4*12*6 = 3744 probability = 3744/2598960 = .00144 More likely that a four-of-a-kind, but less likely than three-of-a-kind (as one would expect). Straight flush: Now, I am going to just go with the convention that Ace can be low or high (but not both), so the possible consecutive orderings start with: A,2,3,4,5 and go up to: 10,J,Q,K,A. So there are 10 possible consecutive runs. As well, one needs to choose the suit of the run. number of ways to get straight flush: 10*4_C_1 = 10*4 = 40 Proability = 40 / 2598960 = .0000153 This is even unlikelier than 4-of-a-kind, so this will have higher precedence. Flush: First one has to pick the suit, and then pick 5 cards from that suit. Then one must subtract all the straight flushes, since those will be counted in this method. number of ways to get a flush: 4_C_1*13_C_5 - 40 = 4*1287 - 40 = 5108 probability =5108/2598960 = .001965 More likely than full house, but less likely than three-of-a-kind. Straight: First, one picks one of the ten consecutive runs, and then, for each card in the run, there are 4 possible suits. Of course, one must subtract off the number of straight flushes, which are counted in this method. number of ways to get a straight: 10*4^5 - 40 = 10200 probability = 10200/2598960 = .003925 More likely than flush, less likely than three-of-a-kind. High card: This is the leftover one, so to get the number of ways, simply add up all the others and subtract from the total number of poker hands: number of ways to get high card: 2598960 - (10200 + 5108 + 40 + 3744 + 1098240 + 123552 + 54912+624) = 1302540 probability = 1302540/2598960 = 0.5012 So the probability is a little greater than 1/2 that one will get "nothing". Now we have the ordering of hands: (highest to lowest precedence) Straight Flush Four of a kind Full House Flush Straight Three of a Kind Two pair One pair High card Ok, it's a little easier to just check online to see what the ordering of hands are, and one can tell that, yes indeed, one has this ordering of hands (with five-of-a-kind being highest precedence in a game with wild cards.) What's that about wild cards? Well, many people don't like the fact that over half the time one doesn't even get one pair. So, to make "more interesting" hands more likely, they change some of the existing cards to wild cards, or throw in extra cards (jokers) to act as wild cards. Wild cards generally can take on any suit and any face value. The ranking of hands remains the same, except for that extra 5-of-a-kind. Let's throw in a single joker as a wild card, and let's see how that affects probability of hands. Now there are two ways to make any kind of hand - a "natural" way (no wild cards -- the numbers we got from above) and the "unnatural" way (with the wild card - the extra we have to calculate now). First we have to update our denominator: Number of poker hands: 53_C_5 = 2869685 So, let's recalculate the probabilities. This is going to be a little messy, but since I've added the joker, rather than turned one of the regular cards into a wild card, it's not as messy as it could be. Five-of-a-kind: You must get the wild card to get this hand, plus a "natural" four-of-a-kind. ways of getting 5-of-a-kind: 13_C_1*4_C_4*1 = 13 probability = 13/2869685 = .00000453 Four-of-a-kind: One can get a 4-of-a-kind in a natural way (and not getting the joker), or by having three-of-a-kind, the joker, and one other card. ways of getting 4-of-a-kind: 624 + 13_C_1*4_C_3*1*48_C_1 = 624 + 13*4*48 = 624 + 2496 = 3120 probability = 3120/2869685 = .001087 The probability for 4-of-a-kind has bumped way up due to this wild card! Full House: One can get it naturally, or by having two pair and the joker (you can't get it with three-of-a-kind and the joker, because that would count as four-of-a-kind, since it's ranked higher!) ways of getting full house: 3744 + 13_C_2*4_C_2*4_C_2*1 = 3744 + 78*6*6 = 2808 + 3744 = 6552 probability = 6552/2869685 = .002283 Three-of-a-kind: One can get it naturally, or by having one pair and the joker. ways of getting three-of-a-kind: 54912 + 13_C_1*4_C_2*1*12_C_2*4_C_1*4_C_1 = 54912 + 13*6*66*4*4 =137280 probability = 137280/2869685 = .04784 Two pair: One can get two pair naturally, and that's it, because if you have one pair and a joker, due to hand precedence, it would count as a three-of-a-kind. ways to get two pair: 123552 probability = 123552/2869685 = .043054 Hey! Wait a sec! I have two pair being less likely to occur than three-of-a-kind with one wild card, and three-of-a-kind has higher precedence! Well, that just won't do. Why don't we change the precedence for this game, so that two pair has higher precedence over three-of-a-kind? In that case, one can get three-of-a-kind only "naturally" (because if you had one pair and a joker, you would pick the higher precedence two pair hand): that's 54912 ways, and then to get two pair... hey, you would have at =least= 123552 ways to get two pair via the natural way! And that, my friends, is the trouble with wild cards. If you let even one wild card in the game, you will always get a contradiction between hand precedence and hand probability. The fact is, one wants to get the highest hand possible, so one will always, when getting a wild card, fit it to make the best hand possible. Moreover, the more wild cards there are in the game, the more and more likely flush hands are, which are pretty high-ranked hands. I will leave it to the reader as an exercise to see what happens to the probabilities when =two= jokers are thrown into the mix. So how do casinos deal with wild cards? Generally, they reduce the payout for hands, and don't worry about the precedence. If you're playing video poker, then hand precedence only counts re: payout. And since they horribly underpay you for your results, they're going to make money off of you, wild cards or no wild cards. But that's a subject for tomorrow.

Prev | Year | Next |