Poker Hand Outcomes
This post works with 5-card Poker hands drawn from a standard deck of 52 cards. The discussion is mostly mathematical, using the Poker hands to illustrate counting techniques and calculation of probabilities Working with poker hands is an excellent way to illustrate the counting techniques covered previously in this blog - multiplication principle, permutation. A flush in poker is when all 5 cards in your hand are from the same suit. If we want to count the number of ways that we can get a flush, we want to determine the number of ways that we can have distinct hands that result in a flush. In order to do this, we will construct a hand, determining all of the options that are available to us. In poker, the probability of each type of 5-card hand can be computed by calculating the proportion of hands of that type among all possible hands. Frequency of 5-card poker hands The following enumerates the (absolute) frequency of each hand, given all combinations of 5 cards randomly drawn from a full deck of 52 without replacement. With only ten possible outcomes for a poker hand, it is of course possible that the best hand at the table (a pair of 9s, for example) will be held by more than one player. In this case, the tie.
Specifying as gtree game
We specify the game in gtree as follows:
To better understand the definition and to check whether we have correctly specified the game, it is useful to take a look at the outcomes:
card1 | card2 | cb1 | cb2 | fc2 | fc1 | folder | winner | gave1 | gave2 | pot | payoff_1 | payoff_2 | util_1 | util_2 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 2 | check | check | NA | NA | 0 | 2 | 1 | 1 | 2 | -1 | 1 | -1 | 1 |
1 | 2 | check | bet | NA | fold | 1 | 2 | 1 | 2 | 3 | -1 | 1 | -1 | 1 |
1 | 2 | check | bet | NA | call | 0 | 2 | 2 | 2 | 4 | -2 | 2 | -2 | 2 |
1 | 2 | bet | NA | fold | NA | 2 | 1 | 2 | 1 | 3 | 1 | -1 | 1 | -1 |
1 | 2 | bet | NA | call | NA | 0 | 2 | 2 | 2 | 4 | -2 | 2 | -2 | 2 |
1 | 3 | check | check | NA | NA | 0 | 2 | 1 | 1 | 2 | -1 | 1 | -1 | 1 |
Look at the first row. We see from cb1
and cb2
that this corresponds to an outcome in which both players check. The variables fc2
and fc1
take NA
values because there is no decision to fold or call if both players check.
Formulas in the game definition will be internaly evaluated in a vectorized fashion over similar data frames and may take NA
values. The helper function is_true
takes a logical vector and replaces NA
values with FALSE
. I use this function in the game definition where a condition must evaluate to either TRUE
or FALSE
while NA
values are not allowed.
You may also take a look at the definition of card2
in the first stage. Here the set
of the random variable is a formula and depends on the previously computed value of card1
.
Let us also take a look at the game size:
While the number of pure strategy profiles is not really small, the game still seems of tractable size for numerical analysis.
Maria Konnikova is a New York Times bestselling author and contributor to The New Yorker with a doctorate in psychology. She decided to learn how to play poker to better understand the role of luck in our lives, examining the game through the lens of psychology and human behavior. This excerpt is adapted from her new book, “The Biggest Bluff: How I Learned to Pay Attention, Master Myself, and Win,” which is available June 23.
For many years, my life centered around studying the biases of human decision-making: I was a graduate student in psychology at Columbia, working with that marshmallow-tinted legend, Walter Mischel, to document the foibles of the human mind as people found themselves in situations where risk abounded and uncertainty ran high. Dissertation defended, I thought to myself, that’s that. I’ve got those sorted out. And in the years that followed, I would pride myself on knowing so much about the tools of self-control that would help me distinguish myself from my poor experimental subjects. Placed in a stochastic environment, faced with stress and pressure, I knew how I’d go wrong — and I knew precisely what to do when that happened.
Fast-forward to 2016. I have embarked on my latest book project, which has taken me into foreign territory: the world of No Limit Texas Hold ’em. And here I am, at my first-ever tournament. It’s a charity event. I’ve been practicing for weeks, playing online, running through hands, learning the contours of basic tournament poker strategy.
I get off to a rocky start, almost folding pocket aces, the absolute best hand you can be dealt, because I’m so nervous about messing up and disappointing my coach, Erik Seidel — a feared crusher considered one of the best poker players in the world. He’s the one who finagled this invitation for me in the first place, and I feel certain that I’m going to let him down. But somehow, I’ve managed to survive out of the starting gate, and a few hours in, I’m surprised to find myself starting to experience a new kind of feeling. This isn’t that hard. This is fun. I’m not half-bad.
This moment, this I’m not half-bad making its fleeting way through my brain, is the first time I notice a funny thing start to happen. It’s as if I’ve been cleaved in two. The psychologist part of my brain looks dispassionately on, noting everything the poker part of me is doing wrong. And the poker player doesn’t seem to be able to listen. Here, for instance, the psychologist is screaming a single word: overconfidence. I know that the term “novice” doesn’t even begin to describe me and that my current success is due mostly to luck. But then there’s the other part of me, the part that is most certainly thinking that maybe, just maybe, I have a knack for this. Maybe I’m born to play poker and conquer the world.
The biases I know all about in theory, it turns out, are much tougher to fight in practice. Before, I was working so hard on grasping the fundamentals of basic strategy that I didn’t have the chance to notice. Now that I have some of the more basic concepts down, the shortcomings of my reasoning hit me in the face. After an incredibly lucky straight draw on a hand I had no business playing — the dealer helpfully tells me as much with a “You’ve got to be kidding me” as I turn over my hand and win the pot — I find myself thinking maybe there’s something to the hot hand, the notion that a player is “hot,” or on a roll. Originally, it was taken from professional basketball, from the popular perception that a player with a hot hand, who’d made a few shots, would continue to play better and make more baskets. But does it actually exist — and does believing it exists, even if it doesn’t, somehow make it more real? In basketball, the psychologists Thomas Gilovich, Amos Tversky, and Robert Vallone argued it was a fallacy of reasoning — when they looked at the Boston Celtics and the Philadelphia 76ers, they found no evidence that the hot hand was anything but illusion. But in other contexts, mightn’t it play out differently? I’ve had the conventional thinking drilled into me, yet now I think I’m on a roll. I should bet big. Definitely bet big.
That idea suffers a debilitating blow after a loss with a pair of jacks — a hand that’s actually halfway decent. After a flop that has an ace and a queen on it — both cards that could potentially make any of my multiple opponents a pair higher than mine — I refuse to back down. I’ve had bad cards for the last half an hour. I deserve to win here! I lose over half my chips by refusing to fold — hello, sunk cost fallacy! We’ll be seeing you again, many times. And then, instead of reevaluating, I start to chase the loss: Doesn’t this mean I’m due for a break? I can’t possibly keep losing. It simply isn’t fair. Gambler’s fallacy — the faulty idea that probability has a memory. If you are on a bad streak, you are “due” for a win. And so I continue to bet when I should sit a few hands out.
It’s fascinating how that works, isn’t it? Runs make the human mind uncomfortable. In our heads, probabilities should be normally distributed — that is, play out as described. If a coin is tossed ten times, about five of those should be heads. Of course, that’s not how probability actually works — and even though a hundred heads in a row should rightly make us wonder if we’re playing with a fair coin or stuck in a Stoppardian alternate reality, a run of ten or twenty may well happen. Our discomfort stems from the law of small numbers: We think small samples should mirror large ones, but they don’t, really. The funny thing isn’t our discomfort. That’s understandable. It’s the different flavors that discomfort takes when the runs are in our favor versus not. The hot hand and the gambler’s fallacy are actually opposite sides of the exact same coin: positive recency and negative recency. We overreact to chance events, but the exact nature of the event affects our perception in a way it rightly shouldn’t.
We have a mental image of the silly gamblers who think they’re due to hit the magic score, and it’s comforting to think that won’t be us, that we’ll recognize runs for what they are: statistical probabilities. But when it starts happening in reality, we get a bit jittery. “All these squalls to which we have been subjected are signs the weather will soon improve and things will go well for us,” Don Quixote tells his squire, Sancho Panza, in Miguel de Cervantes’s 1605 novel, “because it is not possible for the bad or the good to endure forever, from which it follows that since the bad has lasted so long a time, the good is close at hand.” We humans have wanted chance to be equitable for quite some time. Indeed, when we play a game in which chance doesn’t look like our intuitive view of it, we balk.
Frank Lantz has spent over twenty years designing games. When we meet at his office at NYU, where he currently runs the Game Center, he lets me in on an idiosyncrasy of game design. “In video games where there are random events — things like dice rolls — they often skew the randomness so that it corresponds more closely to people’s incorrect intuition,” he says. “If you flip heads twice in a row, you’re less likely to flip heads the third time. We know this isn’t actually true, but it feels like it should be true, because we have this weird intuition about large numbers and how randomness works.” The resulting games actually accommodate that wrongness so that people don’t feel like the setup is “rigged” or “unfair.” “So they actually make it so that you’re less likely to flip heads the third time,” he says. “They jigger the probabilities.”
For a long time, Lantz was a serious poker player. And one of the reasons he loves the game is that the probabilities are what they are: they don’t accommodate. Instead, they force you to confront the wrongness of your intuitions if you are to succeed. “Part of what I get out of a game is being confronted with reality in a way that is not accommodating to my incorrect preconceptions,” he says. The best games are the ones that challenge our misperceptions, rather than pandering to them in order to hook players.
Poker pushes you out of your illusions, beyond your incorrect comfort zone — if, that is, you want to win. “Poker wasn’t designed by a game designer in the modern sense,” Lantz points out. “And it’s actually bad game design according to modern-day conceptions of how video games are designed. But I think it’s better game design because it doesn’t pander.” If you want to be a good player, you must acknowledge that you’re not “due” — for good cards, good karma, good health, money, love, or whatever else it is. Probability has amnesia: Each future outcome is completely independent of the past. But we persist in thinking that its memory is not only there but personal to us. We’ll be rewarded, eventually, if we’re only patient. It’s only fair.
Poker Hand Outcomes Definition
But here’s the all-too-human element: We’re just fine with runs when they are in our favor. Hence the hot hand. When we’re winning, we don’t think we’re due for a change in the least. If the run is on our side, we’re thrilled to let it continue indefinitely. We think the bad streaks are overdue to end yesterday, but no one wants the good to end.
Why do smart people persist in these sorts of patterns? As with so many biases, it turns out that there may be a positive element to these illusions — an element that’s closely tied to the very thing I’m most interested in, our conceptions about luck. There’s an idea in psychology, first introduced by Julian Rotter in 1966, called the locus of control. When something happens in the external environment, is it due to our own actions (skill) or some outside factor (chance)? People who have an internal locus of control tend to think that they affect outcomes, often more than they actually do, whereas people who have an external locus of control think that what they do doesn’t matter too much; events will be what they will be. Typically, an internal locus will lead to greater success: People who think they control events are mentally healthier and tend to take more control over their fate, so to speak. Meanwhile, people with an external locus are more prone to depression and, when it comes to work, a more lackadaisical attitude.
Sometimes, though, as in the case of probabilities, an external locus is the correct response: Nothing you do matters to the deck. The cards will fall how they may. But if we’re used to our internal locus, which has served us well to get us to the table to begin with, we may mistakenly think that our actions will influence the outcomes, and that probability does care about us, personally. That we’re due to be in a certain part of the distribution, because our aces have already been cracked twice today. They can’t possibly fall yet again. We’ll forget what historian Edward Gibbon warned about as far back as 1794, that “the laws of probability, so true in general, [are] so fallacious in particular” — a lesson history teaches particularly well. And while probabilities do even out in the long term, in the short term, who the hell knows. Anything is possible. I may even final-table this charity thing.
One thing is for sure: Unless I cure my distaste for bad runs and the sense of exuberance that envelops me during the good ones, I am going to lose a lot of money. And maybe if I lose it for long enough, I’ll eventually stop thinking that the cards owe me anything at all — whether that’s continued success or an end to a streak of bad runouts. Or that’s the hope. Otherwise I’ll be one broke poker player.
From the book “THE BIGGEST BLUFF” by Maria Konnikova, to be published on June 23, 2020, by Penguin Press, an imprint of Penguin Publishing Group, a division of Penguin Random House LLC. Copyright © 2020 by Maria Konnikova.