The Surprising Mathematics of Poker

In the game of Texas Hold ‘Em, each player’s hand at showdown is composed of the best five cards out of seven: their initial two cards plus five community cards (cards shared by all of the other players).  You probably already know that AA (“pocket Aces”) is the best hand to start with, but what is the worst?  Many people say 7-2 offsuit, since it’s the lowest hand that, unlike 3-2 offsuit, has no potential to make a straight.  However, if you were offered a choice between the two hands in a heads-up situation, you’d pick 2-7, since it’s ahead (has the highest card) before any additional cards are dealt.  Poker calculators, like this one, show that 7-2 has a 55.87% chance of beating 3-2 if all five community cards are dealt out (with an 18.15% chance of a tie).  These probabilities are calculated by dealing out all possible future sets of 5-cards and tracking the results.

Now suppose I offered you this challenge: We can play heads-up poker (no-limit Texas Hold ‘Em), each selecting our own hand from one of three possible starting hands, and you get to pick your cards first.  I’ll even tell you my strategy ahead of time: it will be to go all-in, as soon as possible, every hand.  The three hands to choose from are:

(1) A pair of 2s, (2) Jack-Ten suited, or (3) Ace-King offsuit

Which hand would you pick?

At first, AK looks good, since it’s considered one of the top starting hands in general.  However, even a pair as low as 22 wins 52.75% of the time vs AK, since it’s already a pair and the chances that an ace or a king shows up when the next five cards are dealt out is less than 50/50.  So, do you pick 22 as your starting hand?  If so, I would select Jack-Ten suited, which, thanks to possible flushes and straights, actually DOES have a better than 50/50 chance of improving to the winning hand (53.28% chance of winning vs. 22).  So, Jack-Ten suited must be the best hand?  Not so fast: AK has a 58.61% chance of beating Jack-Ten suited.  This is a non-transitive game!  Simply by choosing first, you will be at a disadvantage.

Here’s another surprising poker scenario that actually occurred during a tournament I played on a cruise.  I was very short on chips and was in the big blind (a forced bet, like an ante), which required me to put a third of my chips into the pot before even looking at my cards.  Everyone folded around to the guy next to me, who went all-in.  I looked down at my hand and it was one of the absolute worst: 8-2 offsuit.  Easy fold right?

Believe it or not, I should call and here’s why:  I had 1200 in chips before the hand and 400 of them went into the pot because of the blind bet.  That means that I had to decide whether or not to call 800 for a chance to double-up to 2400 (when an opponent goes all-in for more chips than you have in your stack, it’s the same as if he only bet the amount you have left).  When you look at it that way, it becomes clear than any chances of winning over 33% will make me a profit in the long run.  Suppose someone were offering $1 lottery tickets that win 40% of the time and had a prize of $3?  You’d buy as many tickets as you could get your hands on, even though the odds are against winning.  It’s the expected profit of $0.20 per ticket ($3 prize * 40% chance = $1.20 on average) that compels you to “gamble” in this case.

It turns out that if you assume my opponent was going all-in with a random hand here, I actually have about a 34% chance of winning.  When I called, he kicked himself for not realized that I was so short-stacked that he didn’t have any fold equity (value in bluffing).  I caught him with a measly 4-3, but he ended up winning and busting me out anyway.

This is an example of being “pot committed”, which means that it was profitable to call even though I was almost certain to have the worst hand.  There are times when this concept can be used to your advantage.  Suppose you have $90 at a table where the blinds are $5/$10.  Someone raises to $30 and the action gets to you and you decide to go all-in with AK.  If everyone else folds and the action gets back to the original raiser, he has to decide whether to call $60 for a chance at a $195 pot (small blind of $5 + big blind of $10 + his original raise of $30 + your all-in of $90 + another $60 if he decides to call).  He only needs a $60 / $195 = 30.8% of winning in order to break-even.  Suppose he had a 2-3 offsuit and you showed him your AK.  He’d still have over a 34% chance of winning and should therefore call!  Congratulations, you just got someone to call your all-in with a worse hand than yours, which is good for you.

The very fact that you were low on chips gave you an exploitable opportunity.  Since anyone who raises should go through the same mathematical reasoning as above and come to the conclusion that they have to call you, all you need to do is figure out when you have a better hand and collect your money.  It may be impossible to know that for any particular hand, but you can ensure that your all-in is expected to be profitable.  Online poker allows you to download the “hand history” from the games you play in.  If there’s any data wonk living within you, you would realize that digging through those files would give you a good sample of the range of hands that people normally raise with.  All you need after that is the handy poker calculator above and the patience to identify which potential hands would beat that range on average.  This is precisely the kind of analysis I did to come up with a very profitable “short-stack” strategy for online poker.

It turns out that in the situation above, AQ, AK, and all pairs 7 or higher are profitable for your all-in move.  Surprisingly, the range of profitable all-in hands increases to include a pair of sixes at the $10/$20 big blind level, since the original raisers get more creative and have a wider range of hands that they would get stuck calling with.  The moral to the story is that while many players focus on “tells” and “feel”, math geeks can and do find profitable situations by simply crunching the numbers.  Bad luck will always occasionally strike, but, as a Swedish proverb states, “luck doesn’t give, it only lends.”

By the way, for those interested in how my man vs. machine match against PokerSnowie turned out, see the end of my man vs. machine blog entry here.

catdealfaster

Author: Jay Cordes

Jay Cordes is a data scientist and co-author of "The Phantom Pattern Problem" and the award-winning book "The 9 Pitfalls of Data Science" with Gary Smith. He earned a degree in Mathematics from Pomona College and more recently received a Master of Information and Data Science (MIDS) degree from UC Berkeley. Jay hopes to improve the public's ability to distinguish truth from nonsense and to guide future data scientists away from the common pitfalls he saw in the corporate world. Check out his website at jaycordes.com or email him at jjcordes (at) ca.rr.com.