Showing posts with label math. Show all posts
Showing posts with label math. Show all posts

Sunday, April 25, 2021

What are the odds?

 Yesterday Poker News published this article about a remarkable hand at the final table of an event in the Lone Star Poker Series. It was all-in pre-flop, Troy Clogston's JsJh against short-stacked Don Iyengar's AdJc. Nothing remarkable about that, or about the way the board fell. What was remarkable was Clogston calling every card of the board before seeing it. Read the article and watch the embedded video there for the details of how it played out. 

Last night I was telling Nina about this. She asked what the probability was. Offhand, I guessed one in a million. This was an actual quick estimate on my part, not just thoughtlessly spouting the cliched "one in a million." Nina thought that was low by an order of magnitude--more like one in ten million. 

So I decided to do the math and see. As I write these words, I still haven't done the calculation, so I don't know the answer. By the time I finish this post, I will. 

We start with the flop. Clogston called for 8-9-10 rainbow. (I don't actually hear "rainbow" in the video, because the announcer talks over it, but I'm assuming it's there, as the text of the article says.) The flop not only comes 8s9h10c, but in that exact order. Now, I don't think the order matters, because surely everybody would give him credit for the call even if the order had been different. So let's ignore the left-to-right order. With 48 unknown cards, and none of the known cards being of the three ranks in question, what is the probability of this guess? 

There are 17,296 different ways of drawing three cards from a deck of 48. (You can find a combination/permutation calculator here.) There are 24 different ways of assembling 8-9-10 rainbow. (Each of four 8s can be matched with each of three 9s and each of two 10s, and 4 x 3 x 2 = 24.) So 24 of the possible 17,296 combinations would fulfill the first guess. Probability: 24/17,296 = 0.001388. This equals about 1 in 720. 

Now we're to the turn. We have 45 unseen cards remaining. So guessing one is the straightforward probability of 1/45, or 0.02222. 

On the river, it's 1/44, or 0.02273. 

For Clogston to get all three components of his guess correctly, we have to multiply those three probabilities: 0.001388 x 0.02222 x 0.02273 = 0.0000007010. This equals 1 in 1,426,000. 

So under the conditions as specified here, my guess was the closer one--and not too far off, for taking only a few seconds to think about it. 

However, perhaps you disagree with my decision about the order of the flop. If you want to make the challenge harder by saying that you would only accept Clogston's guess as correct if he got the order of the 8, 9, and 10 correct, it adds extra difficulty. 

Out of 48 cards, the first card must be an 8; probability 4/48, or 0.08333. The second card must be one of three nines that doesn't match the suit of the 8; probability 3/47, or 0.06383. The third card must be one of the two tens that doesn't match either of the previous suits; probability 2/46, or 0.04348. All three of those must be true simultaneously, so again we have to multiply the independent probabilities together. 0.08333 x 0.06383 x 0.04348 = 0.0002313. This equals about 1 in 4324. (A faster way to get the same result is to realize that you have the same 24 winning ways to make 8-9-10 rainbow, but now we're talking about permutations instead of combination, and a permutation calculator says that there are 103,776 unique orders of three cards that can be drawn from a deck of 48 cards. 24/103,776 works out to 1/4324 exactly.) 

If you now multiply that by the turn and river probabilities calculated previously (they are unchanged for this), you get 0.0000001168, or about 1 in 8,560,000. That is much closer to Nina's guess than to mine. 

So who won our little guessing game? As the classic poker answer goes, "It depends." 

Monday, May 09, 2016

PokerNews article #112

This is the first half of a two-part article on how to do poker probability problems using combinations of cards, with the difficult math done by something called a combinations calculator.

I spent far longer writing this one than most of my PN contributions, and I'm really pleased with the result. If you follow along and do the work with me, rather than just blast through it as fast as your eyeballs can scan the words, you'll go from knowing nothing about this kind of calculation to being able to pose and answer complex poker-math problems on your own.

I owe a giant thanks to five blog readers who responded to my plea in the previous post, and took considerable time and effort to proofread my first draft. Between them, they found six mistakes, ranging from trivial to huge. Without their help in advance, I would now have to spend the next few days being embarrassed and submitting corrections as PokerNews readers pointed out my mistakes. But due to their careful scrutiny, I'm now pretty confident that everything is right.

And thanks also to "TBC" Tony, whose report of the unusual poker-room promotion in Shreveport is what got me thinking about tackling this subject for PokerNews. The calculation of how often that promotion is expected to hit is the last and most complex example I work through in the article, at the end of Part Two, next week.

http://www.pokernews.com/strategy/how-to-take-your-poker-math-beyond-counting-outs-1-24726.htm

Sunday, October 19, 2014

Probability puzzle

This has nothing to do with poker directly, but this week's Sunday Puzzle on NPR is an interesting exercise of your probability-thinking muscles.

Next week's challenge: The following challenge is based on a puzzle from a Martin Gardner book, that may not be well-known. Out of a regular grade school classroom, two students are chosen at random. Both happen to have blue eyes. If the odds are exactly 50-50 that two randomly chosen students in the class will have blue eyes: How many students are in the class?
I got the answer, but it was really difficult. I ended up having to set up a spreadsheet to automatically calculate the number of ways to select two children from a classroom of n students. This allowed me to play with both the number of students and the number of those that have blue eyes, until I found the combination that worked. 

Maybe there's a simpler, more intuitive way of getting at the answer, instead of using brute force the way I did--but if so, it escaped me. I predict that they will have very, very few correct answers submitted. 

Sunday, January 19, 2014

Rare hand


At first glance, this appears to be two pretty ordinary fouled hands in a game of open-face Chinese poker.

But look again. There's something peculiar about the hand on the right. Go ahead--take a closer look. I'll wait.




Do you see it? She got 13 cards with no pair--a 13-card straight!

If you dealt out 13 cards from a well-shuffled deck, what is the probability that you'd get that result? I don't know, but let's figure it out.

The first card can obviously be anything. To state the trivially obvious, the probability of getting a non-pairing first card is 1.00, or 100%. The second card can be anything except a pair to the first. So with 51 cards left in the deck, 3 kill our hopes for the Big Straight, and 48 keep it going. The probability of a card that doesn't pair the first one, then, is 48/51, or 0.941, or 94.1%.

The third card must not pair either of the first two. There are 50 cards left in the deck, of which 6 will create a pair and 44 will not. So the probability of getting a non-pairing card is 44/50, or 0.880, or 88.0%.

We continue this pattern. When we're ready to deal the 13th card, there are 40 cards left in the deck, of which just 4 will complete our lovely 13-card straight, while 36 will pair one of the first 12 cards now on the board. The probability of hitting one of our "outs" is therefore 4/40, or 0.100, or 10.0%.

Because every one of the 13 events we've described must occur in order to end up with the 13-card-no-pair hand, we multiply all of the individual probabilities together: 1.00 x 0.941 x 0.880 ... x 0.100. The final product, if I didn't screw up the calculation, is 0.000106, or 0.0106%. To put it in the conceptually easiest terms, this will occur about 1 in 9460 hands. If I've ever seen this happen before in an OFC game, I didn't notice it.

You may be tempted to think that knowing 13 other cards along the way (i.e., the ones dealt to me in the picture above) changes this probability, but it doesn't. It would change our ongoing estimate, card by card, as to whether this hand will play out as a 13-card straight. But the question I've really asked is how often the deck will have been arranged by a random shuffle so the 13 cards destined to go to player X will contain no pairs. When asked that way, it makes no difference what happens to the other 39 cards, whether they are seen or unseen. The answer does change if instead we ask the probability of a shuffled deck yielding a 13-card straight to somebody when two (or three, or four) players are dealt in, but it makes my head hurt to think about how to calculate that, so I'll leave it to somebody else.



Saturday, February 02, 2013

Tighten up or loosen up against an ultra-loose table?

My friend Rob did a blog post the other day that was ostensibly about an over-the-top wild woman at the table. But along the way, he said this:

I was paying more attention to Natalee’s comments and her outrageous behavior than the poker, but I was following enough about the poker to quickly figure out how to play in this situation. With Natalee being so loose-aggressive and so many players going on tilt because of her presence—playing even crazier and more aggressive than they ordinarily would—I knew that the only way to play was to be extremely tight. I’m a tight player anyway, but now I became uber-tight. I wasn’t going to play any speculative hands, any borderline hands. No, I was going to wait for a true premium hand to play. That’s the only way to play at a table full of maniacs and that’s what this table was.
This is a common reaction, but it's wrong in terms of maximizing profit. I submitted a comment to that effect. I first appealed to authority. In one of the very first blog posts I ever wrote (November 6, 2006), I said this:
Q-10 offsuit is a hand I would ordinarily either toss or try to play very cheaply, with a high willingness to throw it away unless I get a lot of help from the community cards, or a good bluffing situation arises. And against a loose-aggressive player, my usual reaction has been to re-tighten my already fairly tight game. Recently, however, I've read two things that are making me re-think that strategy. I include them here for the possible benefit of readers, though I didn't want to interrupt the story above.  
First, I finished Barry Greenstein's superb book, "Ace on the River." On p. 204, he has a table of "opponent's tactics," the "typical incorrect adjustment" that we mediocre players make, and the "Better adjustment" that he recommends. The first entry in the table is "Extremely loose play." The incorrect adjustment is listed as "Wait for a good hand." The better reaction is given as "Loosen your standards and reraise frequently." Seems like cogent advice, though it takes more nerve than I've usually been willing to bring to bear. I'm trying to change that, a little at a time.  
Second, just a few days after reading that, I read a column in Card Player magazine by Matt Lessinger, who I think is one of their best writers. He wrote,
Overaggressive Ozzie sits down in the same game, and in six of his first 10 hands, he raises to $20 preflop. Five times, he wins the blinds uncontested. One time, someone calls him and the hand goes to the river, at which point Ozzie produces Q-8 and wins with a pair of eights. I don't have to be Phil Ivey to put two and two together, and conclude that he probably did not have premium hands when he made his other raises. Therefore, I'm going to wait for something good and try to pick him off.  
But am I going to wait for pocket aces or kings? I could, but why would I want to play so timidly? In a cash game, I want to take advantage of all favorable opportunities that come along. Here, I have an opponent who is making oversized preflop raises with substandard values. If I pick up a hand such as 9-9, or even A-J, and think I can get heads up with Ozzie, I'm probably going to play it, because it figures to be the best hand against his typical raising values. And I'm certainly not going to be deterred by the fact that he is raising to $20 rather than a more normal raise to $6 or $8.  
You can read the rest of my comment in the comments section of Rob's blog post, linked above.

If you do, you might go on to read that some others piped up doubting and/or flatly disagreeing with me, including Rob himself. So late last night I whipped out an even longer reply (again, see the comments thread). I did a quick semi-quantitative illustration of the effects of tightening up versus loosening up one's starting hand standards when playing against a table of opponents who play basically any two cards and who are willing to commit lots of money without much of a hand. My conclusion:
Here's the Reader's Digest version: You want to expand your starting hand range enough that your profits go up by winning more pots, but not so much that your average starting hand range is the same as theirs. As long as you're reasonably judicious about it, the increased frequency of wins will more than compensate for the smaller profit per hand. Against a bunch of people who are playing any two cards, you can expand your range quite a bit and still on average have the strongest starting hand, which translates into the highest probability of winning the pot, assuming that you don't play worse than they do post-flop. 
Again I stress that this is not the kind of question on which reasonable people can have opposite but equally valid opinions, like whether strawberries are better than raspberries. The math (the real math, not just the back-of-the-envelope version I'm doing here) clearly favors widening your starting hand range. It does necessarily bring higher variance, but if the question is just long-term average profits, there's no serious question about the direction of the correct adjustment. Unlike most poker questions, here there is a factually, objectively right answer: Loosening up is more profitable, tightening up is less profitable. Those who disagree are simply wrong. 
When I woke up this morning, I was thinking about this some more, and wondered if I could make the math a level or two more rigorous than I did in that comment, without spending all day on it. (I have an apartment full of stuff to pack up, you know, and I'm planning to leave in less than a week.) I thought of a way to use PokerStove to do it.

With PokerStove you can enter your hand range as either specific cards, or use the slider to change the percentage of starting hands you'll play. It assumes that if you're playing, say, 20% of hands, it's the best 20%, which is a well-defined set.

Here are the assumptions I used: I'm playing at a 10-handed table. The hold'em is played by everybody looking at their two down cards, then deciding to play or not. To play, you put in your whole stack of exactly $100, after which the dealer puts out the five board cards and pushes the pot to the winner. After each hand, everybody either removes their profit from the table or reloads, so that everybody has exactly $100 to play each hand. (Obviously this is unrealistic, but it simplifies and clarifies the math.) There is no rake (yay!) and we can get out 40 hands per hour. My nine opponents are all willing to play any two cards. I, however, am being selective. I want to maximize my profit per hour. Note that pots are $900 when I don't play, $1000 when I do play.

Here's a spreadsheet showing the results of a variety of strategies:



(Right-click on the image to see it full size.)

Column D is simply the percentage of hands played times 40 hands per hour. Column E shows how much I'm putting into the middle of the table per hour, calculated as the value from Column D times $100. Pot size is always $1000, because the hands I don't play cost me nothing and profit me nothing. Column H is the product of the pot size, my equity, and the number of hands per hour I'm playing. Finally, Column I show my profit, which is Column H minus my investment from Column E.

In the top row, you see what happens if I play nothing but A-A. My equity (i.e., the percentage of the average pot that I can expect to win) is very high (31.1%), but my profit sucks because I'm playing so few hands.

At the opposite extreme, consider the bottom row. There I'm using the same strategy as my goofy opponents, playing every single hand I'm dealt. Unsurprisingly, my profit is zero. The ten of us are just exchanging chips across the table, with nobody having any advantage. (Good thing there's no rake, or we'd all lose everything to the house over time.)

Clearly the sweet spot for maximizing profit is somewhere in between those two extremes.

For the few lines below the A-A line, I added specific starting hands, down to any two Broadway cards. The trend is perfectly clear: I lose equity in each pot I'm contesting because I'm adding sequentially weaker starting hands to my repertoire. However, this is more than compensated for by the greater number of pots I'm playing, so my profit per hour rises dramatically.

For those not familiar with PokerStove, here's how the hand-selection tool looks like, in this case set for any two Broadway cards:



And here is what the equity calculation page looks like:



After that, I just used the PokerStove slider to select higher fractions of all possible starting hands, in 5% increments, then calculated the outcomes.

At first, going looser continues to increase hourly profit. After a while, though, as you can see, the profit trend reverses. The marginal loss in equity as I add weaker and weaker hands to my starting lineup is not compensated for by the fact that I'm making myself eligible to win more pots.

The point of maximal profit isn't entirely clear because the trend isn't perfectly linear. (It might be if I were to let PokerStove run longer for each calculation and therefore got more precise equity values. But it takes a long time to settle on these values when the software has to account for nine opponents' completely random hands.) Nevertheless, you can see that it's going to be somewhere in the range of playing the best 35-45% of starting hands I'm dealt. If you want to see what that range includes, fire up PokerStove, click on the "Player 1" box, and play with the slider. It will highlight what specific cards you're selecting. (You can find a nice tutorial on how to use PokerStove here.)

Translating the math from this over-simplified version of hold'em to the real thing requires assuming that I don't make more mistakes than my opponents do. I have to be able to read them at least as well as they read me, fold second-best hands at least as well as they do, size my bets to maximize profits when I have the best hand at least as well as they do, etc. But if that isn't a valid assumption, then I simply shouldn't be playing at this table. I shouldn't play anywhere that I don't have an edge in skill over most of my opponents.

The upshot is, as I said, that the math unequivocally supports being looser than one's usual default strategy. It would be foolhardy to try to play 35-45% of starting hands against a typical table. You'll get eaten alive. But that is demonstrably the correct strategy adjustment to make in the extreme scenario I've constructed. No real-world table will be quite that wild, but the point still stands that loosening up at least moderately is the way to go. Tightening up means that you leave lots and lots of money on the table that should have been yours.

Monday, November 19, 2012

Quiz

Steve Zolotow presents an interesting little quiz in his column for Card Player magazine (November 14, 2012, issue; vol. 25, #23, page 50). He asks the reader to estimate what percentage of the time 10s-9s will win against the following hands, assuming all-in before the flop:

1. Ac-Ad
2. Ac-Kc
3. Ac-5c
4. 5c-5d
5. 7c-6c
6. 9c-8c
7. Top 20 percent range
8. Top 40 percent range
9. Top 60 percent range
10. All hands--100 percent range

If this piques your curiosity as it did mine, take a couple of minutes to jot down your answers, before scrolling down.

















Here are the answers Zolotow gives, as percentages, followed in parentheses by the estimates I had written down:

1. 22.8 (20)
2. 38.7 (40)
3. 45.9 (45)
4. 52.4 (50)
5. 62.8 (65)
6. 69.3 (75)
7. 35.4 (30)
8. 41.6 (35)
9. 46.5 (40)
10. 54.0 (45)

Clearly I did a lot better putting in estimates against specific starting hands than I did against ranges. I have a bazillion times more experience with the former than with the latter. For the former, my guesses were all good enough that they would produce the right answer in a go/no-go situation at the table nearly every time. For the latter, though I wasn't outrageously off, I still missed by enough to cause an erroneous decision in some significant spots.

And, frankly, estimating hand strength against an opponent's range is a more important skill than estimating it against a specific hand. It's something I ought to work on.

How about you?

Wednesday, August 22, 2012

Count the outs

Playing a tournament online just now, I had this mildly interesting situation come up:


I had Ac-Kh. He had 9d-9s. The flop was Qd-Qh-10h, and the turn was 3h.

Today's quiz: How many outs did I have on the river to win? Submit your answers in the comments. First one to get it right (must include list of the cards that win for me, or other comparable explanation of your answer) wins...my eternal, undying admiration.

Caution: It's tricky (else I wouldn't be posting it, right?).



Addendum, August 23, 2012

Here's how the hand ended:




Thursday, August 09, 2012

"Average" tournament chips

A few years ago I wrote about my observation that having an "average" stack in a poker tournament puts one ahead of more than half of the field, which, on first blush, is a counterintuitive proposition. See here and here for the full explanation, along with examples taken from chip counts at the World Series of Poker to illustrate the point.


I have continued to notice this phenomenon while playing online poker ever since writing those two posts. The tournament lobbies make it trivially easy to see where one stands relative to the current average and, at the same time, figure out where one's chip stack ranks relative to all of the other players.

Every time I have checked, without a single exception, has confirmed the rule that I discovered long ago: The mean chip stack size is always greater than the median chip stack size. If you have an average (mean) stack, you are ahead of more people than you are behind. If you are at the median (i.e., there are just as many players with bigger stacks than yours as there are players with smaller stacks than yours; this is usually impossible to know in a live tournament, but easy online), then you have a below-average stack.

Here are two recent examples that demonstrate the point:


In the shot above, you can see that I exactly define the median; 50 players have more chips than I do, and 50 have fewer. But my stack, at 3535 chips, is significantly below the average, shown as 3979.




Conversely, in this shot you can see that I have a chip stack that is almost exactly at the current tournament average, but I am ahead of more than half of the field. (The difference is small because it's such a small field.)

The point is this: When you see that you have a stack that is at or near the current average for the tournament, it doesn't imply what you would tend to think. It means that you are ahead of most of the field.

Wednesday, July 11, 2012

Probability of a bigger pair

Ed Miller's column in the June 27 issue of Card Player magazine is about bet-sizing tells. He walks the reader through a hand that he played while holding Q-Q, showing how opponents' bet sizes helped him deduce what hands he was up against. I have no quibbles with his reasoning. In fact, it's a highly worthwhile piece, and the sort of insight that makes me never want to miss his columns.


I do, however, have a quibble with an incidental point tossed in along the way. In explaining why he elected to just call rather than reraise when faced with an opening raise from a nit under the gun, he says:
[T]here are still five unknown hands behind me. There's about a one percent chance each player has either A-A or K-K, making about a five percent chance in total that one of the two hands I'm most afraid of is lurking behind me.
(Note: this is just one of the reasons he cites for not reraising, not the only one.)

At first I wondered why he was making a distinction between the players who have already acted and those yet to act. After all, A-A or K-K is an ugly problem for Q-Q no matter where on the table it is being held. But I think I see what he means. If he were in the big blind, and thus last to act on the raise, and nobody had reraised yet, then he could quite confidently assume that nobody was holding A-A or K-K, unless it is the UTG nit.

Or put it another way: Before there is any action, there is a fixed probability that any other player has been dealt a pocket pair higher than Q-Q. But people so reliably raise and reraise with A-A or K-K that when they fail to do so, we can safely revise downward that estimated probability.

What is the a priori probability that somebody at a ten-handed table has been dealt A-A or K-K when I'm holding Q-Q? It turns out to be a ferociously complicated mathematical problem, one that I could never solve on my own. Fortunately, though, somebody a lot smarter than me has already worked it out, and you can see both the process and the result here:


The table containing the solution is at the bottom of the page. The answer for Q-Q is 0.0841. That is, if I see Q-Q in my hand, and I have nine opponents, about 8.4% of the time one of them will be holding a pair bigger than mine. That does indeed work out to a round estimate of about a 1% probability that any particular one of them has the goods. And that's a useful rule of thumb. Before there is any action (action constituting additional information to throw into our estimation math), each player in a full ring game has about a 1% chance of having been dealt a pair higher than my queens.

If I'm in the big blind and nobody has raised, then probably nobody has a bigger pair, unless they're trying the ol' limp/reraise thing. Also, if I open-raise from under the gun with my Q-Q and get only callers with no reraise, I can go to the flop reasonably confident that nobody has A-A or K-K. But really, that fact has everything to do with what we know from experience about how people play, and little to do with the math. The conclusion would be equally true if the a priori probability of somebody holding a bigger pair were 80%, or 0.8%, rather than the actual 8%.

But I think there's a problem with how Ed applies the math to the situation he describes. Once a nitty player has opened for a raise from under the gun, we no longer have the baseline 8% chance that somebody at the table has A-A or K-K. The probability now has to be estimated to be vastly greater than that. Exactly how much greater depends, obviously, on exactly how nitty this particular nit is. If he is the extreme case and will only raise UTG with exactly A-A or K-K, then our previous 8% probability goes to 100%. Of course, it's not often you'll have a player with a range that narrowly definable, so it usually won't go up all the way to 100%. But it's surely a damn sight higher than 8%.

If the nit does, in fact, have A-A or K-K, then the probability that any other player at the table also has A-A or K-K is much lower than the roughly 1% apiece that we would otherwise be using as our rule of thumb. Using the next column in Alspach's table, we see that the a priori probability that two players have been dealt pocket pairs bigger than my queens is only about 0.2%--a negligible quantity. The implication is this: The fact that a nit put in an UTG raise means that the probability of a bigger pocket pair being out there is much greater than the baseline 8% (as just discussed), but also that nearly all of that probability resides in the nit, not in the players who will be acting behind me.

It is thus no longer true that each player behind us still has a 1% chance of holding aces or kings. Our estimate of the probability that any one of them has A-A or K-K must be greatly reduced from its baseline ~1% by the fact of having observed that UTG raise from the nit. Put most simply: As the probability that the UTG nit has aces or kings goes up, the probability that anybody else at the table has aces or kings goes down.

Now, this is where it gets a little weird and mind-bendy. Because two things are simultaneously true: (A) The probability that any player is dealt A-A is independent of whether any player is dealt K-K.* (B) Alspach's calculation of a 0.2% probability of two players having A-A or K-K is no longer valid once we actually know that one player has one of those hands. The 0.2% is valid only when we have no information except for having seen our own Q-Q.

This is analogous to questions such as the probability of a roulette wheel hitting 00 twice in a row. It is 1/38 x 1/38 = 0.026 x 0.026 = 0.0007. But if we spin and the ball falls in that 00 slot the first time, now the probability of seeing 00 twice in a row greatly increases, to 0.026. Of course, the probability that the second spin will be 00 has not changed one smidgen by virtue of the result of the first spin, yet the probability of seeing two 00s in a row has changed.

So it is with the A-A and K-K. If we know that the UTG player surely or almost surely has A-A or K-K, we have to throw out the window the Alspach table numbers. They no longer apply. The 8% probability (that exactly one player has A-A or K-K when I have Q-Q) is no longer valid because we have strong reason to believe that this specific shuffle of the deck did, in fact, result in one of those 8% events. And the 0.2% probability (that two players have each been dealt A-A or K-K when I have Q-Q) is no longer valid both for that reason, and for the reason that once the UTG nit is known to have A-A or K-K, two of those eight cards are no longer available to be given to other players.

The knowledge (or at least high suspicion) that UTG nit has one of the two premium pairs is akin to opening the sealed box in which Schrodinger's poor cat has been confined. It is now known to be either alive or dead, not in some hybrid or probabilistically indeterminate state.

Mind you, I don't claim to have worked out the math so as to be able to tell you exactly what the new, revised probability is that each of the five players yet to act has a pair bigger than Q-Q, in addition to the one that we presume is hiding under the nit's card protector, but it is definitely not well estimated by the 1% rule of thumb. It must be substantially lower than that. Exactly how much lower depends entirely on the degree of confidence with which we can assign A-A or K-K to the open-raising nit.



*Note: I realize that that is not quite true, because as soon as two aces are in a player's hand and no longer in the deck from which the dealer is pitching cards, the concentration of kings in the deck rises slightly by virtue of card subtraction, so the probability of K-K goes up slightly. But it's a tiny difference.

Monday, June 04, 2012

Worst bad-beat stories

My friend Memphis MOJO writes about having recently been told of one of those incredibly rare bad beats that was not just runner-runner, but "perfect-perfect"; i.e., the player behind on the flop had to catch two exact cards on the turn and river in order to win. Mojo ends his post asking whether there are worse bad-beat stories than that.


Well, it kind of depends on how you classify degrees of badness. But for my money, I would nominate two.

First is the one that I related having heard about here (under the second bold sub-heading). See also the comments for a bit of possible further confirmation that the story is a true one.

Second is a story told many times by T.J. Cloutier. The only place I've seen it in print is in a really interesting but relatively little-known book, The Best Hand I Ever Played: 52 Winning Poker Lessons from the World's Greatest Players, by Steve Rosenbloom, published in 2005. Here's the story, from page 30:
It was against Al Krux, a cash game at the Bicycle Club about ten years ago. No Limit Hold'em. He hadn't won a pot all day. He had, like, $445 left or something and he moved all in. The guy two to his left was getting a massage. He lifted his head up and looked at it and decided not to call and threw it away. The massage girl saw the hand too.

It got around to me on the button. I had two 10's and I said, hell, I'll call him because this is his last money and he might not have too much. So I call. Now, the dealer didn't see that I made the call and she dropped the deck on the muck. That means she had to reshuffle all the cards.

The flop came K-10-4. I had two 10's. I flopped three 10's. He had two kings, so he had flopped three kings. The fourth card was a 10, so I had four 10's and I beat him in this pot.

But that's not the kicker. The kicker is, you remember the guy who was looking at his hand and getting a massage? He had the other two 10's and had thrown them away. He told us he had thrown two 10's away, and the massage girl said, "This guy threw away two 10's." So that meant the dealer had to make a mistake and drop the deck and reshuffle those 10's back in for Al to lose this hand to me. It's the worst beat in the history of poker.

Needless to say, I never won another hand that night, but I beat him out of his last $445. Story of a lifetime.
This one isn't technically a bad beat, I suppose, because both hands had pretty good equity when all the chips went in pre-flop. But Daniel Negreanu after the flop calling for two running perfect cards to make a straight flush, and getting both of them, is pretty damn unbelievable. This was in the first year of the NBC Heads-Up Championship:




As for my personal experience, I think that this hand was, in mathematical terms, the worst beat I've ever taken. The worst I can remember ever inflicting on an opponent was this hand, in which I put all my chips in on the flop as a 62:1 underdog, and caught a miraculous runner-runner combination to win. Almost as bad was when I went runner-runner full house to beat two opponents, both of whom had flopped flushes.

I have hit a one-outer on the river exactly one time, and sort of expect that it will never happen again. See story here.

I have been on the bad side of quads over quads one time, as told here.

In one remarkable session at the Sahara I folded what would have been quads for one high-hand jackpot, and would have made a straight flush for a second jackpot if my opponent had not folded. See story here.

Those are the best I can come up with, Mojo. What do you think?

Wednesday, April 11, 2012

I can do basic probability calculations

In my RSS feed reading today was a pointer to a site that administers a brief quiz of your ability to quantify probabilities:


I took it and got this gratifying summary of my results:
Congratulations on completing your statistical and risk literacy test!

Your numeracy score is better than about 75-100% of all college educated individuals. Roughly, this means that out of every 100 people who take the test, you will do better than about 90% (90 people) of all other people. This is the highest score one can receive on this test.

Technically, relative to the general population, you are among the most statistically literate in the world.
Based on your score, you are not very likely to experience the extreme difficulty most people have when faced with common types of statistical thinking. However, you should still take care and may want to double check your calculations or seek additional advice when it comes to important decisions involving risk and statistics (e.g., some medical decisions, financial investment, taking consumer debt).

In our uncertain and complex world you are likely to find that your higher levels of risk and statistical literacy are very beneficial and important.

Indeed, your levels of numeracy reflect a skill level that very few people ever achieve… one that is the result of considerable practice.
As the saying goes: " Practice makes perfect."

Friday, March 23, 2012

Matching or non-matching suits?

In the March 26, 2012, issue of Poker Player Newspaper, Mike Caro's column has some questions and answers about probability. As one example, he asks the reader to consider the situation in which pocket sixes are pitted against pocket aces. Do the sixes have a better chance of winning if they match the suits of the aces, or if they are of different suits?


Caro knows the reader will expect the answer to be "different suits," because then the each of the sixes has a small chance of making a flush to win, whereas if the suits match, then any flush made with a six is automatically beaten by the higher flush made by the ace of the same suit.

Caro says (page 21) that this intuition is wrong:
And, no, it isn't better to have different suits if you hold sixes. That seems like the logical assumption at first glance, but it's the other way around. If your suits are both different, that's slightly worse than if one suit is duplicated. And one duplicated suit isn't as good as two duplicated suits, from the perspective of [the person] with sixes.

Although it's true that different suits means the sixes will win some hands with flushes that would have been impossible if the suits were the same, there's a second factor. And the second factor overwhelms the first. When your sixes are of the same suit as the aces, the defensive power overwhelms the offensive power. You prevent the aces from making enough winning flushes that you can afford to sacrifice all potential winning flushes of your own.

So, 6c-6d does better against Ac-Ad than 6h-6s does.
I was surprised by this. It is the opposite of what I had always assumed to be the case.

In fact, I was so surprised by it that I decided to do a blog post about it in the form of a quiz, asking readers this: If you have to be stuck on the bad end of a roughly 80/20 chance of winning (which is basically what all overpair/underpair situations come down to), which sixes would you choose to maximize your win percentage?

I fired up PokerStove so that I would have the exact answers available. But when I ran it, I discovered something interesting: Caro is wrong, and the conventional wisdom is correct.

Specifically, when tested against Ac-Ad, I find:

Hand Win % Tie % Equity %

6c-6d 18.66 0.22 18.886

6h-6d 19.36 0.18 19.542

6s-6h 20.05 0.14 20.199

This was run under the "enumerate all" option. Running a Monte Carlo simulation produces very slightly different numbers, depending on how long you let it run, but the pattern is always the same as shown above: The sixes with suits matching the aces do worst, those with different suits do best, and those with one matching and one different are about halfway in between.

I don't suppose PokerStove is infallible, so I did the same comparisons using an online poker odds calculator, this one on the CardPlayer.com web site. It generated numbers identical to those shown above. I also tried it using the calculator at twodimes.net, and again got identical results. This gives me considerable confidence that the numbers above are indeed correct.

So now I'm stuck with the real headscratcher: Why is Caro insisting otherwise? I cannot figure that out. If he had just said in passing that the underpair with matching suits does a little better than those with different suits, I would assume that there had simply been an error inadvertently introduced in the writing/editing process. Lord knows I've made my share of slips such as that. But Caro spends a good portion of the column explaining why the matching suits is better for the smaller pair. It can't be just a glitch along the lines of saying "better" where he meant "worse," or "same suits" where he meant "different suits."

I sent Mr. Caro an email three days ago, quoting his article and the numbers I found when I ran the simulation myself, and asking him to explain why he says that the opposite is true. I have not heard back from him.

I am genuinely baffled by this mystery.

Tuesday, December 13, 2011

Math is hard, II

Just minutes after writing the "Math is hard" post last night, I was leafing through the December issue of Ante Up magazine and spotted a column by Antonio Pinzari titled "Going further with math" (page 59). In it he recounts how he has learned the importance of knowing the basic math of poker, and how he drums it into his students.


Then we come to this paragraph:
Again let's go further with two suited cards preflop. You've overcome the 89 percent and flopped two of the same suit, what are the chances of making the flush by the river? Using the Rule of 4 x 2 (if you don't know what that is I suggest you find out fast) you have about a 35 percent chance of making the flush on the turn and an 18 percent chance if you missed the turn card by making a flush on the river.
I'll give him a pass on the awkward sentence construction, but I will not give him a pass on the bad math--not in a column in which he boasts about how important it is to know the numbers and in which he claims to be teaching this math to his poker students. I sure as hell wouldn't hire as a poker coach somebody who claims to know what he's talking about but obviously doesn't.

There are 13 cards in each suit. If I have two of a suit in my hand and there are two more of them on the flop, that's four, leaving nine unaccounted for. There are 47 unseen cards, so the probability that the turn card the dealer puts on the board will complete my flush is 9/47, or about 19.1%. Not 35%, Mr. Pinzari, O Great and Wise Coach of Poker Math. (The second part of his assertion is closer to correct. If I missed on the turn, the probability of spiking a flush on the river is 9/46, or 19.6%. Why is it slightly higher on the river than on the turn? Because the deck is now a little bit more depleted of cards of the other suits.)

I wonder how Mr. Pinzari thinks it is possible that the chance of a flush card hitting on the turn is twice as high as the chance of it hitting on the river. Is there something magical about that particular spot on the board--the one between the flop and the river--that magnetically attracts cards that will complete a flush?

The similarity between Josie's errors and Mr. Pinzari's is striking. Did she read this article, I wonder, and get misled by it?

Let's go on.
Here is a huge number Lee [Childs, in the October issue] didn't cover: 60 percent of all flops contain two suited cards.
BZZZZZZZZZZ! Wrong again.

This is stated without reference to what cards one is holding, so let's run the numbers that way. I.e., we'll just take three cards at random from a full deck of 52, ignoring what might have been dealt to any players. The easiest way to calculate the probability of getting two of one suit and one of a different suit is actually to sneak up on it the back way. It's easier to work out the probability of getting all one suit and of getting three different suits. Then we subtract those values from 100%, and what is left is the probability of getting two suits, since the only possibilities are one, two, or three suits.

We start with figuring the probability of the flop consisting of all one suit. It doesn't matter what the first card is. Let's say it's a club (or "crub," just for my friend Eric, who absolutely loves it when I use that word). The probability that the second card will also be a club is 12/51, because there are 12 clubs left among 51 cards. If that happens, then the probability that the third card will also be a club is 11/50, because there are 11 clubs left among 50 cards. The combined probability is thus 12/51 x 11/50, or 5.1%.

Now we figure out the probability of getting three different suits. Again, it doesn't matter what the first card is. Let's say it's a club again. What is the probability that the next card is something other than a club? Well, there are 51 cards left in the deck, of which 12 are clubs and 39 are non-clubs, so the probability is 39/51. For the river, we have 50 cards left, of which 12 are clubs, and 12 are whatever the suit of the second card was, leaving 26 that can complete our rainbow flop. Thus the combined probability is 39/51 x 26/50, or 39.8%.

So now we know the probability of a flop containing just one suit (5.1%) and of it containing three different suits (39.8%). The only other way a flop can come is with two suits--two cards from one suit and one card from another. That probability must therefore be 100% - 5.1% - 39.8%, which works out to 55.1%, not 60%, as Mr. Math Genius Pinzari claims.

What if we alter things a bit by assuming that we start with two of a suit in my hand? Again I'll use clubs as my example. We use similar logic, but it's made messier because now we have to do the arithmetic separately for each suit, since the probability of clubs hitting the flop is lower than for the other three suits (there being two fewer of them available in the remaining deck). I just filled a sheet of scrap paper with my numbers, and I'll spare you the details, but I work it out to be a probability of 11.0% to flop exactly two clubs, and 14.7% each to flop exactly two diamonds, hearts, or spades. Combining those last three is 44.1%, for a grand total of 11.0 + 44.1 = 54.1% to flop two of any suit, starting with two suited cards in one's hand. In other words, that assumption still doesn't get us to the 60% that Mr. Pinzari asserts. In fact, it's a little bit lower than our first calculation.

Sorry, Mr. Pinzari, but you get an F for a column in which you boast about knowing poker math while showing that you really don't understand it at all.



Math is hard

Lord knows I've made more than any blogger's share of mathematical mistakes in the course of five years of writing about poker. I kind of doubt, however, that I've ever made as many in one post as my pal Very Josie did earlier today.


Here's her first example:
I’m holding a KQ of spades. The flop comes ace of spades, 10 of hearts and 2 of spades. I have a nut flush draw and an inside straight draw. What are the odds that I hit one of these great hands? Hmmm…First thing to do is to count how many cards are out there that will complete my hand. 4 spades are showing, so there are 9 left that will give me a flush; 9. There are 4 jacks in this deck that will give me a straight; 4. Nine plus four is thirteen. Surely you don’t need to be an accountant to figure that out.
It appears that being an accountant is not enough to get it figured out correctly. The jack of spades is being counted twice here--once as a spade and once as a jack. The number of cards that will complete either a flush or a straight is 12, not 13 (as Josie acknowledged after a commenter pointed this out).
There are 13 cards that will give me a big and most likely winning hand. To determine the odds of hitting one of these cards on the turn you take your 13 outs and multiply that by four. 13 times 4 is 52. I have a 52% chance of hitting my winning hand on the turn. If I do not get my card on the turn, it’s time to calculate the odds of hitting it on the river. You take those same 13 outs and this time multiply them by 2. 13 times 2 is 26. I have a 26% chance of hitting my hand on the river.
No, no, no. The "rule of four" gives you the approximate probability that you will hit one of these cards on either the turn or the river. Look at it this way: Each card constitutes about 2% of the deck, so the probability that the next card the dealer shows is, say, the eight of hearts is about 2%. If there are 12 favorable cards whose position is unknown to us (i.e., they might be in the stub of the deck in the dealer's hand, might have been dealt to an opponent, or might be among the burn cards), there is a roughly 2 x 12 = 24% chance that one of them will appear as the turn card on the board. There is another roughly 24% chance that one of them will appear on the river. Combined, that yields about a 48% chance of hitting one on either the turn or river.

A commenter calling himself "Four Hands" correctly made this same point on Josie's blog:
the Multiply by 4 is to calculate the odds of hitting on the turn _OR_ the river. It important for calculating whether or not to go all-in on the flop, but it not accurate if you're calling for a single card, or comparing pot-odds unless you're going to be all-in.

The odds of hitting on the turn are the _same_ as hitting on the river, well, slightly different because you've seen one card, but close enough that the approximation is usually fine.
To which Josie responding, puzzlingly:
NO 4 HANDS! I think you're saying the odds between the turn card and river are pretty much the same, except for that one measly card. i disagree because after the flop you have two chances to hit your hand, yet after the turn you have 1 chance, which is 50% less chance of hitting your hand.

see what i'm saying?
Josie has confused here two different quantities. One is the probability of hitting one of the desired cards on the turn. The other is the combined probability of doing so on either the turn or river. They are both potentially useful numbers, but they are completely different. If your decision is simply whether to call a bet on the flop in order to see the turn card, then the 2 multiplier is your approximation, because you don't yet know if your opponent will bet again on the turn, nor how much he might bet. On the other hand, if one or both of you will be all in on the flop, then you're getting both the turn and river, and you'll be interested in the combined probability that a desired card will hit either spot. "Four Hands" had it exactly right.

Josie's post said that she is twice as likely to hit one of her outs on the turn as on the river. A moment's reflection should reveal that that is an absurd conclusion.

Her next example:
I have J-J, which is definitely okay. The flop is 4-4-8 rainbow (all different suits). I have an over pair and I’ll come out betting here. The question is, what are the odds of improving my great hand. Any jack or four will give me a full house, and there are two jacks and two fours left. I have 4 outs. Four times four is 16. I have a 16% chance of hitting a full house on the turn and since four times two is eight, I have an 8% chance of hitting that full house on the river.
The problem here is more conceptual than mathematical. When I'm in a situation like this, the probability of improving my two pair to a full house is the last thing on my mind. The far more important question is whether I have a better hand than my opponent right now. If he called me pre-flop with Q-Q or K-K, I'm in deep doo-doo--so deep that even making a full house by another 4 hitting the board won't get me out of it. On the other hand, if he called me with 10-10 or 9-9, he's the one that's deep in the doo-doo. The probability of me catching another jack is so low that it's not worth basing any decisions on. It's true that a 4 improves my hand, but it improves the other guy's hand equally, so it's not really a meaningful consideration. If he already has a 4 or 8-8, I'm toast, and only a jack will change that, not another 4.

Another problem with the language here is the use of the term "out." Outs are defined as cards that will improve a currently losing hand to a winning one. If you're already ahead, it's nonsensical to count your outs, or even to speak of having them; it's the other guy that has to be looking for outs. So when Josie says that she has "4 outs," it means that she either thinks she's behind here or doesn't understand the whole concept of outs. And, again, even if it's the former, the number of outs is actually just two, because the remaining two 4s don't move her from being behind to being ahead. Only the jacks can do that. Having a full house is still a losing proposition if the other guy has a bigger one.

But fundamentally this situation does not pose a mathematical problem. It's a hand-reading problem. I have to figure out whether I'm winning or losing. Most of the time it's a favorable flop for me; I was ahead with the jacks before the flop and remain so after the flop. But once in a while an opponent will have smooth-called pre with a bigger pair, or got very lucky with either 8-8 or a 4 in his hand. My primary tasks are (1) to extract the most value from my opponent if he has a pocket pair smaller than mine (which is just about the only thing he could have with which he might pay me off), or (2) spend as little as possible to determine that my hand is second-best on those occasions that he has 8-8 or a 4.

Josie's final example:
We’re playing with the two and three of hearts. The flop is 4 of spades, 5 of hearts and Q of clubs. Right now I have an open ended straight draw and there are 8 cards in the deck that will give me a straight. After the flop I take the number of cards out there that will help me (8) and multiply that by 4 to get 32. There’s a 32% chance I will hit my straight on the turn.
This is wrong, for the reasons given in the first example. It's closer to 16%. To be exact, there are 47 unseen cards, and 8 of them make the straight, so it's 8/47, or 0.170, or 17.0%.
Alas, the turn is a king of hearts. In addition to my open ended straight draw, I also have a flush draw. Now there are 15 cards in the deck that I want. If one of them hits on the river, I’ll have either a straight or a flush. 15x2=30. I now have a 30% chance to hit one of my hands.
That's about right. It usually works out to actually be about 2% more than the rule of thumb predicts. Here, for example, there are now 46 unseen cards. 15/46 = 0.326, or 32.6%. But the difference between the quick estimate of 30% and the actual value of 32.6% will essentially never matter to a poker decision. Either way, you're next going to translate it into odds (about 2:1) for purposes of determining whether a call is worthwhile.


Thursday, October 20, 2011

Calling all-in first hand with AK

In my recent post about my online SNG results, I included my self-assessments of the games in which I went out unusually early. One of them was having called an open-shove with AK on the very first hand of a tournament. I assessed the loss this way: "Guy went all in 1st hand with Q-9, I called with AK. He caught a 9. Definitely right move."


Commenter "Terry in Victoria" questioned this: "I just disagree on one thing where you called an all in on the first hand with AK. At best its a race for all your chips. Your a much better player than that and why risk them all when you can get your money in a much better times with less risk and more reward."

I'll admit that I had made my assessment on just a general sense that it was the right move, but this comment made me wonder. I decided to explore the question, since this is the kind of thing that math and modern poker software tools allow us to settle with a fair degree of confidence. It's a worthwhile question, because these low-stakes games have a small but steady number of players who shove all-in on the first hand no matter what they have and no matter what the action before them has been. I see it in maybe 15% of the games I play, so it's worth knowing how to respond to it.

First I went to an independent chip model calculator, here. If I lose, my equity obviously drops from 10% of the prize pool to zero. If I win, I go from 1500 chips to 3030 (doubling up plus the 10/20 blinds), which increases my prize-pool equity to 18.6%.

Let's assume that I call every time, and then set x to be the fraction of the time that I have to win in order to make the call profitable over a large number of trials. To simplify the math, I'll assume the prize pool to be $100. Then 18.6x (the amount I win) has to equal 10 (my original equity) to be a break-even call. X then must be 53.8%. I.e., if I win more than 53.8% of the time, it's a +EV move.

Next we have to figure out how A-K offsuit fares against the range of the shover. For that, the oddly named but wonderful PokerStove is the tool of choice. From it I learn that A-Ko is 65.3% to win against a random hand. That is plenty to make this a +EV call.

Now, one can still argue that it's not the best move, not on the basis that the call is -EV per se, but because one will likely be able to find spots to get it all in with even higher equity later. That may be so. I don't know, and I don't think it's a question that can be easily answered objectively. My gut sense, though, is that the call is indeed worthwhile.

Note that this calculation assumes everybody else will fold. A wrinkle is that that may not be so, and the hands with which one is likely to draw a second caller will be heavily populated with aces and kings, making it harder for my A-K to win. But I don't know how to account for that mathematically, so I'm conveniently disregarding it.

After finding the solution (or at least partial solution) to the case where I have A-K and the shover has any two cards, I wondered how much narrower his shoving range could be and the call still be a correct one mathematically. The answer surprised me. If an opponent is open-shoving not with every starting hand, but only with his top 50%, the answer changes only negligibly; I'm still 64.9% to win. If he tightens up and shoves with only the top 33% of his starting hands, I'm still 64% to win. Top 20% of his starting hands still leaves me with 62% winner, and even his top 10% of hands gives me 57%, just barely enough to be +EV.

The break-even point is if we somehow knew that he was only shoving with the top 7.4% of his possible starting-hand range, which means pairs 88 or better, suited aces with 10 or better kicker, unsuited aces with queen or better kicker, suited kings with jack or better kicker, and Q-Js. Maybe there exist players who adopt such a strategy (shoving with that range only), but I kind of doubt it. My impression is that those who open-shove do it with pretty much anything, hoping to get lucky and double up early or lose and start another game where they try the same gambit. These are not the world's most mathematical, analytical players.

An interesting related question is what range of hands I should call with if I know that my crazy opponent is, in fact, shoving on the first hand of the tournament with any two cards. Again my win percentage has to be about 54% to be mathematically correct. (I'm assuming the ideal case, where I'm either last to act and everybody else has already folded, or I somehow know that everybody else will fold behind me.) Top 50% of my starting hand range gives me 57.8% equity against a random hand, which is enough to do the trick. That's a huge swath of hands. I tried tightening it up somewhat: Any pocket pair, any suited or unsuited ace, and any two Broadway cards. That's about 28% of starting hands, and it yields 61.8% win equity, which is plenty.

I'm not sure I'll actually change my game to call that loosely--largely because of the fear of somebody else behind me overcalling with a much narrower range that has me crushed--but it's interesting and worthwhile knowing that the math says it works.


Sunday, September 18, 2011

Thinking about probability

A reader questioned my approach to calculating the probability of getting quads on the board with the first four cards, in a comment on this post. His objection, in short, is that the cards held by the other players eliminate a bunch of ranks from being possible quads on the board. Since all four of some rank must still be left in the dealer's hand after the pitch, whatever cards are held by other players exclude those ranks from being eligible.

I started to write a reply comment, but it was getting too long. Besides, it's an objection that comes up once in a while when I do a probability calculation, so I thought it would be worth making a separate post about it. It's something that gave me headaches the first several times I pondered poker probability questions. It took me a while to see straight about it, so I'm not surprised that others find themselves confused.

Here's my answer:

Of course our calculation would change if we knew what other cards were. But if you're going to go down that road, then you're going to drive yourself crazy.

From the point of view of an omniscient being, there is no "probability" about this situation at all. The cards have been shuffled, the order of the deck is set, and we will either get quads on the board on the turn or we won't. It is predestined to either happen or not happen, so to speak of probability makes no sense. In fact, that is true from our non-omniscient perspective, too. It will either happen or it won't, and that determination was made when the deck was shuffled and cut. Asking how likely it is that quads will hit the board is sort of a confusing question, because it has already been settled whether it will happen. We just don't know the answer yet.

Think of it this way: Instead of asking, "What is the probability of getting quads on the board after ten hold'em hands have been dealt out?", instead ask it this way: "Of all the times that in a ten-handed game I know only my own two down cards (and they are not a pocket pair) how often, on average, will I see quads hit the board with the first four cards?" That is actually the question that I answered.

If you start adding assumptions or information about what other cards we know, then you're changing the question, so of course you'll get a different answer, all the way up to the ultimate case where you know the location of every one of the 52 cards, at which point you can ask whether quads will come, and the answer is either a definite yes or no.

Here's another way to think about it. Suppose that I'm alone in my apartment. I shuffle the deck, deal myself two cards, but leave the other 50 in the deck. I look down and see that I've dealt myself a 5 and a king. I take the next 18 cards and move them from the top of the deck to the bottom, without looking at any. Now, if I deal out the next four cards face up, what is the probability that they will be all of the same rank?

Of course, it doesn't really matter if I move 18 cards from the top of the deck to the bottom of the deck. Nor would it matter if, instead of doing that, I dealt those 18 cards two to each of nine imaginary players around my table. I could even burn them in my fireplace, and it wouldn't change the math. I could actually have nine friends (well, if I had nine friends, which is hard for a misanthrope) each pick up their two cards and look at them, not telling me what they are. None of it matters. The answer to the question remains the same, if the question is asked the way I suggested in the fifth paragraph above. In fact, I could deal myself two cards, throw away all but the last four cards in the deck, and ask about the probability that they will constitute quads. Or I could deal myself two cards, then pick four cards at random from the 50 remaining and ask the same question. It's all exactly the same, in terms of the math. It doesn't matter which four cards we pick, or in what order, and it doesn't matter what happens to any of the other 46 cards, as long as we don't know what they are. As soon as we know what they are, then we have changed the question we're asking, and the math must change accordingly.

(I'm feeling very tempted to go off on a tangent about Herr Schrodinger and his poor cat, but I think I'll refrain.)

This issue comes up with every probability calculation in poker, though we usually don't think about it. If you have four to a flush on the turn and ask the probability of making your flush on the river, you don't really stop to think that that is, in one way of looking at it, a nonsensical question--because the card that is destined to hit the board last is not going to change its spots; it's either one of your suit or it isn't. The more logical way of framing the question is, "Of all the times that I am in this situation, what percentage of them will, over the long haul, result in making my flush?" That way you're not assigning a "probability" to an outcome that has already been determined concretely (though we don't know which it is yet).

It's also akin to asking, in pre-ultrasound days, whether a baby about to be born is a boy or a girl. It's not 50% boy and 50% girl. It's one or the other. Yet we say, loosely, that the probability of it being a boy is 50%, and the probability of it being a girl is 50%. In reality, it's a very different question than asking, before I flip a fair coin, the probability that it will land tails, because it still could go either way. But the baby is either male or female already. We just don't know which. Our use of the word "probability" for both questions really disguises the fact that the situations are actually different. They sort of look the same superficially, but in one case the outcome has been set already and we just don't know what it is, while in the other the outcome still could be either one.

In spite of those two different realities, the math is identical. If it helps, you can phrase the question analogous to how you might ask about the outcome of the coin flip that has not yet occurred. To set the stage, we specify that after the deck is shuffled and cut, we will deal out ten standard two-card hold'em hands, then discard the top card, put out a flop, discard the next card, and put out fourth street. So the first four cards on the board will be the ones that were at positions 22, 23, 24, and 26 in the cut deck. Now here's our pre-shuffle question: "If I thoroughly shuffle this deck of cards, then do a cut at a random point, what is the probability that the resulting order will have four cards of the same rank at positions 22, 23, 24, and 26?" That's not quite the same question for which I did the math previously, because of the extra condition in the prior example that I knew two ranks that would not work--but it's close. And it gets around the mental stumbling block of asking about the "probability" of an event that has already either occurred or not occurred.

If you want to make the pre-shuffle question truly identical to the one I worked through with the first post, then do this: Remove a 10 and a 4 from a standard deck (representing the two hole cards I had when the situation actually came up). Now ask the question I posed in the previous paragraph. Bingo--the math I worked out gives you the answer.

Whew! That was long-winded. But I hope it clarifies why the answer I gave was correct mathematically, even though it quietly skipped over the problem of speaking of the probability that something will occur, when the real answer is simply either "yes" or "no."

Monday, September 12, 2011

Quads on fourth street




I was just playing a SNG on Bodog in which the above hand transpired. A king fell on the river, nobody had an ace, and we chopped the pot four ways.

I have seen a board like this on rare occasions before, but this time it occurred to me to wonder how frequently it will occur. Let's find out.

There are 50 unknown cards before the flop is put out. There are 19,600 different flops that can be made from those 50 cards. Obviously, in order to get quads on the board by fourth street, all three flop cards must be of the same rank. Furthermore, we won't be able to get quads on the board on fourth street if the trips on the board on the flop are 10s or 4s, as I have the last one of each in my hand. That means that there are 11 ranks eligible. For each of those, there are four different combinations of three cards that can constitute our all-one-rank flop, making a total of 44 possible flops that meet our criteria. That means that the probability of getting such a flop is 44/19,600, or about 0.0022, or about 1 in 445.

Now that we have an eligible flop, there is only one card left in the deck that will complete our quads. 47 unknown cards remain, so there is a 1 in 47 chance of getting the one we want; probability is 0.021.

The combined probability of an eligible flop and the perfect turn is, therefore, 0.0022 x 0.021, or 4.78 x 10^-5, or 1 out of 20,936. (The answer would be slightly different if I had a pocket pair, but let's not worry about that.)

That's rare enough to get your attention.

(Now the much harder math problem is this: What are the odds that I managed to get all of that right on the first try?)



Thursday, August 25, 2011

Flopping an ace

Tony "TBC" writes in his latest blog post:

almost the entire table limps $2 and the lady on my right who just sat who i thinks gay and her partner just sat on my left and she makes it $12. shed been raising a lot the $15 min shed been there, so i wasnt worried about her. i had KK and made it $40 in my blind. everyone calls but the black guy who always calls me it seems cause hes got no respect for my game. (what a fish to call $40 preflop with his hand.) she folds of course. flop comes A57 and the pots $100+ and if im beat im beat, he will bet anyway maybe but to make sure i get his money if he has a hand like QQ i bet the last of it (about $110) and he calls and wins with AT offsuit.

i think pokerdogg would say if ur going to check/fold KK heads up anytime theres a ton of money in the pot and an ace comes u way too weak.
As many other people smarter than me have observed, no-limit hold'em is a game of implied odds, one in which capturing your opponent's entire stack needs to be your goal. Conversely, you need to avoid giving your opponent correct implied odds to make a better hand by being able to fold when he gets there, thus protecting your stack against your opponent trying to win it.

Let's simplify this problem to clarify whether Tony's opponent is indeed being a "fish" to call with an ace, using the apparently justified assumption that Tony will pay him off every time an ace flops, but that our man will be able to fold every time an ace does not flop. In other words, suppose our "fish" knows that Tony has exactly K-K.

The action isn't entirely clear, but let's guess that there were five limpers before the raise to $12, then our man in question called, then Tony reraised to $40. (Tony says "everyone calls but the black guy," but context suggests that this is a mistake and the word should have been "folds" rather than "calls.") So now he has to decide whether to call an additional $28 into a pot of about $74.

How often will an ace hit the flop if there are three left in the deck? We have four cards known (our A-x and Tony's K-K), leaving 48 unknown. There are 17,296 different flops possible from 48 unknown cards. Of those, 6625 will contain at least one ace. (To be precise, 6486 will have one ace, 138 will have two aces, and one will have all three remaining aces--if I've done the math right, which at this hour of the night is always a little dubious.) That's about 38% of the time.

That means that 62% of the time he loses the additional $28 he invests pre-flop. But 38% of the time he will win not only the $74 currently in the pot, but also the $110 that Tony has left in front of him. If they play this hand 100 times, he will lose 62 x $28 = $1736, but he will win 38 x $184 = $6992. As poker bets go, that's a great investment.

Of course things aren't really this simple. Sometimes the flop will have both an ace and a king, giving Tony a set, and our man will lose. Sometimes the flop will be A-x-x but a king will hit the turn or river after all the money is in. Sometimes one or the other of them will hit some weird runner-runner combination for a straight or flush. Sometimes his kicker will flop trips even without an ace. Etc. Also, he can't ever know that Tony has exactly K-K. Sometimes he'll actually be up against a bigger ace (though the probability of an ace hitting the flop then goes down drastically so it's easier for him to get away from it). On the other hand, I suspect Tony will do just about the same play with Q-Q and J-J, making the call with A-x even more profitable than if K-K were the only hand Tony played this way.

The point is that it is not at all clear that one is being a "fish" to call the reraise in this spot if one has good reason to believe that when an ace flops one will get one's opponent's entire stack most of the time.

I am not saying that one has to just give up with big pairs every time an ace flops. It's more nuanced than that, depending on how many people are in, what their pre-flop calling ranges are, how often they will represent having an ace when they don't, how often they will call a shove with lesser hands (e.g., the Q-Q Tony thought he might have), and so forth.

But the reality is that A-x hands are among the most common ones with which loose opponents--both good ones and bad ones--will call pre-flop. So while one need not necessarily surrender every time an ace shows up, it is also demonstrably bad practice to blindly charge ahead, ignore the potential danger, and shove every time. That pattern is what produces the favorable implied odds for an opponent to make a big call pre-flop.

Before concluding that somebody else is the fish in the game, it's good to check one's own mouth to see if there might be a hook there.


Addendum, August 25, 2011, 1:30 p.m.:
"Jasper6294" submitted a comment politely suggesting that my math was wrong. One of these years, I'll learn that if I write a heavily math-dependent post in the middle of the night, I should not hit "publish" until I've rechecked the number after a full night of sleep. Jasper is exactly correct, though it took me a while to figure out what I had done wrong. First I failed to remove the extra aces from my virtual deck before counting how many cards we had from which to deal the other cards on the flop. Second, in doing the one-ace flops, I double-counted, forgetting that it makes no difference what order the other cards come in, e.g., 9h-6c or 6c-9h.

I want to leave the evidence of my own occasional boneheadedness intact above, so I'm not editing the post as originally written. But here are the two math-dependent paragraphs rewritten correctly:
How often will an ace hit the flop if there are three left in the deck? We have four cards known (our A-x and Tony's K-K), leaving 48 unknown. There are 17,296 different flops possible from 48 unknown cards. Of those, 3106 will contain at least one ace. (To be precise, 2970 will have one ace, 135 will have two aces, and one will have all three remaining aces--if I've done the math right, which at this hour of the night is always a little dubious.) That's about 18% of the time.

That means that 82% of the time he loses the additional $28 he invests pre-flop. But 18% of the time he will win not only the $74 currently in the pot, but also the $110 that Tony has left in front of him. If they play this hand 100 times, he will lose 82 x $28 = $2296, but he will win 18 x $184 = $3312.
I left out the sentence about that being a "great" investment. The corrected numbers make it a good investment, but not what I would call a great one.

The larger point remains, though with a qualification that I should have added the first time around: One is not being a "fish" to call the reraise in this spot if one has good reason to believe that when an ace flops one will get one's opponent's entire stack most of the time and if the opponent's stack is large enough to make it worth the gamble. I understand this caveat deeply enough that I routinely check an opponent's stack size before calling a pre-flop raise with a speculative, tricky hand such as suited 6-7. That's because I know that it will be relative rare that I make a strong hand at the same time that he has enough of a hand that he will call off his stack. That means that the payoff has to be quite large when it happens to compensate for all the times that I miss and all the times that he gets away from a second-best hand.

In this case, as you can see from the revised math, Tony's stack was not huge, but was nevertheless large enough to make it worth an 18% chance of busting him. From a mathematical point of view, it was a perfectly justifiable call, given the assumptions stated above.


Tuesday, July 19, 2011

More stats on women at the WSOP

A few days ago I presented a rudimentary statistical analysis showing, I believe, that women in the WSOP Main Event performed less well on average than the men did, in terms of surviving to the money. I wanted to do another test of how the women cashing did compared to the men cashing, in terms of final standings, but I couldn't do it until now. With the last female in the field eliminated a few hours ago, I can now proceed.


First, though, I have to admit a small problem. I was told that 13 women cashed. This apparently came from Nolan Dalla doing a hand count of the field when the bubble was reached. I have been able to find no list of the names of these women. From news reports of those who went deepest, plus a little detective work, I have been able to identify 12 women in the list of the payouts. But if there were 13, I sure can't figure out who the 13th one is. I've checked a whole bunch of gender-ambiguous names on the list, using several sources (such as Google image search), and can't find whoever the last one is--if Dalla is right about the number.

The 12 I confidently identified (name, finishing spot):

Moutinho, 29
Musumeci, 62
Crawford, 85
Callaway, 203
Koerner, 299
Luu, 310
Naugoks, 391
Renaud, 398
Rousso, 511
Andrews, 521
Kerstetter, 590
Gazes, 609

Fortunately, I can do the math with just 12, though in order to do so, I'm going to have to pretend that there were only 12 women cashing, along with 680 men, for a total of 692--even though there were really 693 in the money. Because I don't know where the missing data point is, it won't systematically skew the results; it will just make them a little less robust. (However, because the number of women became smaller as the event wore on, and those remaining got more media attention, I'm positive that the missing woman--if there indeed is one--did not finish above the 142nd spot, when it was widely reported that only three women were left, and she is much more likely to be among the earlier exits than the later ones.)

I'm going to run what's called the Mann-Whitney U-test, which you can read a little about here. Basically, you put all your data points in order, then perform a statistical test on their rankings to determine if those with characteristic A are, on average, more toward the high end of the list, more toward the low end of the list, or similar in distribution when compared to those with characteristic B.

You enter lists of the rankings into an online calculator such as this one, and it spits some numbers back at you. In this case, I did it two ways. The first time I entered the raw place-finishing numbers in as two datasets and let the software do everything else. The second time I calculated the value of C myself (it's the sum of the number of men each of the 12 women bested, in this case 4230), then directly entered the values for n1, n2, and U. Both methods gave the same results, giving me confidence that I did it all correctly.

The bottom line is this: The p-value of the resulting statistical test is 0.83, which means, roughly, that if we ran the tournament a whole bunch of times from where things stood when the money bubble burst, we would see at least this level of difference between the sexes' average subsequent performance by chance alone 83% of the time.

In other words, the women's performance, once in the money, was not statistically distinguishable from that of the men. Put yet another way, the distribution of the women's final standings is very much what one would expect if one just randomly picked 12 out of the last 692 finishers. Their results do not tend to cluster meaningfully toward either the high or the low end of the list.

So once this group of women hit the money, their results were completely comparable to the men. Of course, this is a very small sample, so the test does not have a lot of resolving power. But to tell you the truth, I was expecting, based on the previous results, that the women in the money would be sufficiently clustered low in the standings that their mean performance would be demonstrably lower than the men's collective average. It was not so.

You can get a sense of this graphically, too. Below is a plot of the women as pink dots against the blue line of the men in the money. (I swear I did not pick those colors; they are what the Excel chart wizard chose by default!) It is, strangely, oriented with the best lower on the left, though that doesn't really matter. (It's late and I'm too tired to figure out how to make this just a horizontal line the way I originally envisioned it.) Click on it for the bigger version.



Even without running any numbers, you can basically eyeball it and see that the women are not noticeably clustered toward the top or bottom of the line.

The only odd thing is how they tend to show up in pairs, one going out soon after another of her kind. It's probably rooted in the same biological phenomenon that causes women always go to the restroom together, but that's one of those mysteries to which we men are doomed to stay eternally ignorant.

Conclusion: As far as can be determined with the very small sample, once female players reached the money, they performed, on average, as well as the men did in terms of finishes--in striking contrast to the most likely conclusion about women's performance from the start of the tourney to the money bubble.


Saturday, July 16, 2011

Women underperforming in WSOP main event?

While I was out playing poker this evening, B.J. Nemeth mentioned on Twitter that only 13 out of 242 women cashed in this year's Main Event--fewer than would be predicted based on their numbers. That represented only 5.4% of the female entrants, whereas 10.1% (693/6865) of the whole field and 10.3% (680/6623) of the men made the money.


His characterization of women "underperforming" in terms of results (he was not, he clarified, trying to imply anything about skill) touched off some discussion about whether the numbers were statistically significant, given the small sample size.

It wasn't something I wanted to try testing while in the midst of shaking down tourists at Bally's. But now that I'm home, I can give it a shot.

Using the simplest statistical test available for a dichotomous variable--the binomial probability--we can easily determine whether a given rate of cashing is within the expected range of random statistical variance, if we take the entire field's rate of cashing as the expected baseline. Put another way, our null hypothesis is that the women's lower rate of cashing compared to the men's is due only to randomness. Does the math cause us to accept or reject that hypothesis?

Reject.

The expected number of women cashing would be 24. The probability of getting a result at least as skewed as was actually seen this year (i.e., 13 or fewer women cashing out of 242 who entered) is only 0.0063. In other words, if we knew that the women played exactly as well as the men so that any difference in the two groups' rates of cashing was due to chance alone, and we played this same tournament a thousand times, we would expect to see a result deviating this far from the predicted only 6 times. The other 994 times we would expect to see more women than that make the money. That is a pretty striking result.

If you want to see the numbers calculated for yourself, follow the link above to the probability calculator and enter n=242, k=13, p=0.101.*

The conclusion is that it is overwhelmingly likely that there is some force at work other than randomness to explain women's lower rate of cashing. The most obvious explanation sure seems to me to also be the most likely: On average, the women played less well than the men, to a measurable degree, if we take survival to the money as a surrogate measure of quality of play.

Of course one can play perfectly and still get knocked out early, or play terribly and win the whole thing. But we lack any ability to measure poker skill or quality of play directly, and we're stuck measuring what can be measured. We have to hope and assume that there is sufficient correlation between quality of play and survival success that the latter can shed at least some meaningful light on the former.

Please note that saying that "the women played less well than the men" is not the same thing as saying that "women are worse poker players than men." It is an observation limited to this particular group of players in this tournament. Still, I find it difficult to conjure up a plausible explanation for the large difference in cash rates other than a significant difference between the two sexes in average quality of play.

B.J. did not claim to know the outcome of any statistical test, and even seemed to deny caring much what the statistics might say; his position was that the difference in cashing rates was sufficient large to be interesting and noteworthy regardless of how a statistician would analyze it. I'm adding to that subjective opinion the objective conclusion that the difference in cashing rates is large enough to be highly unlikely to be the result of random variance alone. Make of that what you will, but I'm forced to agree with B.J. that it is, at the very least, interesting and noteworthy.



*I suppose it would be technically better to use the men's rate of cashing as the baseline, rather than the entire field, but I was trying to be generous. If we use the men's rate instead, we enter p=0.103 instead of 0.101. That yields a slightly lower probability that the difference is due to chance alone: about 5/1000 instead of 6/1000.