Poker with Lennier

post by HonoreDB · 2011-11-15T22:21:20.561Z · LW · GW · Legacy · 15 comments

Contents

  Suspiciousness: Use a likelihood ratio of your rival categorizations
  Remarkability: Is the description of the interestingness of a hand shorter than the list of cards?
None
15 comments

In J. Michael Straczynski's science fiction TV show Babylon 5, there's a character named Lennier. He's pretty Spock-like: he's a long-lived alien who avoids displaying emotion and feels superior to humans in intellect and wisdom. He's sworn to always speak the truth. In one episode, he and another character, the corrupt and rakish Ambassador Mollari, are chatting. Mollari is bored. But then Lennier mentions that he's spent decades studying probability. Mollari perks up, and offers to introduce him to this game the humans call poker.

Mollari invites Lennier to play

Later, we see Mollari, Lennier, and some others playing poker. Lennier squints at his hand and remarks, "Interesting. The odds of this combination are 5000:1, against." Everybody considers this revelation for a moment, then folds, conceding the hand. Mollari is exasperated, and tells him to stop doing that. Because Lennier is essentially announcing that he has a good hand, Lennier's winning far fewer chips than he should; your biggest wins in poker are when people underestimate you.

The other poker players, and the audience, are picturing Lennier as having a hand something like this:

 

 

This is a four of a kind, the second-best hand in most poker games. The odds against being dealt a four of a kind in a hand of five cards are 4164:1--one might, in a moment of excitement, round that up to an even five thousand.

We the audience are meant to have a hearty chuckle over how theory doesn't translate into practice. But! We never get to see Lennier's cards, which means we get to picture whatever we want. I choose to believe, and I urge you to do so as well, that Lennier had this hand:

 

 

This is one of the worst hands possible in poker: ace-high. It loses to almost everything. By causing everyone else to fold, Lennier won a hand he probably would otherwise have lost. He knew exactly what he was doing.

"Wait," I hear you say. "Like most members of the proud Minbari race, Lennier is sworn to always tell the truth. How could he ever make a verbal bluff in a poker game?" Well. Let's consider a few different ways we can interpret the phrase "the odds of this combination."

First of all, the specific two hands I've given above are equally likely to be dealt. Any specific set of five cards is just as likely to show up as any other. There are 2,598,960 distinct hands of poker, all created equal, so the odds against any particular one showing up are 2598959:1. That's all the hands of poker but one, lined up against that one. Throw a ball, then notice which blade of grass it crushes. The odds against it crushing that blade of grass would have seemed nigh-impossible if you tried to predict it ahead of time. Lennier would have been fully justified in gaping in astonishment at his hand, and announcing that the odds were millions-to-one against. But if he does that, he's obligated to spend every waking moment in a perpetual state of amazement at everything that happens.

That's not how we normally talk about poker hands. Instead, we describe them as falling into relevant categories. There are 624 different four-of-a-kind hands, so the odds of getting a four of a kind, any four of a kind plus any other card, are 624 times better than the odds of getting one specific hand. There are 502,860 ace-high hands, which makes the odds against getting an ace-high hand, any ace high hand, 2096099:502860, which reduces to a mere 4.2:1. Throw a ball into the air: you can almost guarantee it's going to crush some blade of grass or other. Since all similar blades of grass on the lawn fall into the same category, we're not surprised when one in particular gets crushed.

But Lennier's an alien, and more importantly, a novice to poker, and more importantly, a dirty rotten sneak. He's under no obligation to lump poker hands into the same categories as a human poker player does. He's also fully capable of noticing that his cards have the Fibbonaci relation: when placed in ascending order with the ace counting as 1, they form a sequence such that each card N+2 is the sum of card N and card N+1. Furthermore, the first two cards and the second two cards each share a suit! The odds against such a combination are 5076:1. When he gives the odds as 5000:1, he's committed no sin other than a little rounding (down!). We're surprised if the ball lands right on the particular patch of grass we remember once burying a goldfish under, while a stranger who didn't know about the goldfish wouldn't find this spot remarkable.

So what are the odds of a combination? It depends on what you're trying to accomplish! There is no gap between proper theory and proper practice, because theory is only coherent when it is instrumental. That's how I know that, whatever J. Michael Straczynski might think, Lennier won with a bad hand.  We can further illustrate the way "the odds of a combination" depends on your goals by looking at two other things it might mean, and how the math changes depending on what you're trying to do.

Suspiciousness: Use a likelihood ratio of your rival categorizations

"But!" you cry. "I still feel like I'll be more surprised to be dealt a four of a kind than a two-striped-Fibbonaci-hand. Is that irrational?" Not exactly. The poker hand categories are relevant to probabilistic analysis in one important way: the hand you got may not actually be random. Maybe the dealer is crooked. Maybe this is a dream. If you get dealt a four of a kind, the odds of either being true rise significantly. But we can't say this possibility makes the four of a kind less probable. Indeed it makes it more probable. A nonrandom process is equally likely to give you a four of a kind as an ace high. So if we allow for the possibility of a crooked dealer, all of our previous probability estimates were wrong. Rather than talking about this suddenly murky idea of the probability of a hand, we should talk about the suspiciousness of a hand. We can calculate it as follows.

First divide the set of poker hands into the relevant categories. We've got straight flush, four of a kind, full house, flush, straight, three of a kind, two pairs, one pair, high card, and then separate categories for when they're topped by an ace (the straight flush becomes a royal flush, high card becomes ace high, etc.) That's eighteen categories. This is a culturally-dependent count. In some poker circles, it might make more sense to subdivide pairs into "jacks-or-better" and "tens-or-worse," and in Hypothetical Minbari Poker, Fibbonaci hands are important. Whatever natural categories are in your head are the appropriate ones. If we knew the dealer thought as you did and was crooked and in complete control of what was dealt, but we had no other information on motives or behavior, the probability of being dealt any one of those categories would be 1/18. On the other hand, suppose, as we assumed earlier, we knew the deal was perfectly random. Then the probability of getting a non-ace four of a kind is about 1/4512, while the probability of an ace high is about 1/5. We'll calculate the suspiciousness of each hand by dividing the first figure (1/18 in both cases) by the second. So the suspiciousness of the four of a kind is about (1/18)/(1/4512) = 4512/18=250 2/3, while the suspiciousness of the ace high is (1/18)/(1/5)=5/18. In general, this kind of calculation is called a likelihood ratio.

Here's what you can do with this number. Suppose you currently believe that the odds against the dealer being crooked are 100:1. Once you see your hand, you can multiply that 1 by the suspiciousness of the hand. So if you're dealt a four of a kind, your new odds are now 100:250 2/3 against, which reduces to roughly 5:2 in favor of the dealer being crooked. On the other hand, if you're dealt ace high, your new odds are 100:(5/18), which reduce to 360:1. After seeing such an ordinary hand, you're now more confident the hands are random. Every time you see another hand, you can do the same calculation again on your current beliefs. Each time, you'll be performing a Bayesian Update, which is a sacred sacrament.

Remarkability: Is the description of the interestingness of a hand shorter than the list of cards?

"Hold on," you say, and at this point I'm starting to suspect you just enjoy interrupting. "What if I want to notice patterns in my poker hands? Can I quantify the remarkability of a hand?" Absolutely. We could say that a pattern is worth remarking on if its length is low relative to the number of cards it's talking about. The four of a kind hand can be described as "Four threes and the eight of hearts," which is much quicker than "The four of clubs, the four of diamonds, the four of spades, the four of hearts, and the eight of hearts." Here we see that Lennier's hand does okay in one respect: "One,two,Fibbonaci" is a little shorter than "One, two, three, five, eight". The suit pattern doesn't save any space, so it doesn't actually count as remarkable. And this is still subjective: alien cultures wouldn't know what "Fibbonaci" meant, and they might not even have a name for that particular relation. For the hand to be objectively remarkable, you'd have to be able to describe it succinctly even when including a definition of the term. That's not possible in this case. The odds of getting an objectively remarkable hand by pure chance are always low, no matter how good at spotting patterns you are, because there's not enough room in language to describe the majority of n-card hands more succinctly than you could just the list the hand. This type of analysis is a useful scientific principle, referred to as minimum message length, a generalized and formalized Occam's Razor.  We can quantify it by noting that with a perfect compression algorithm, the odds of being able to compress a message by 1 bit are 1:1, by two bits are 3:1 against, and so on.  It takes 21 bits to list out a poker hand, so a pattern that can be uniquely described in 20 bits or less is remarkable.  If you're getting 20-bit hands more than half the time, or 19-bit hands more than a quarter of the time, it might be wise to modify the suspiciousness calculation, and do a Bayesian Update on the possibility that the dealer, like Lennier, is both crooked and a mathematician.

(Thanks to Alicorn, Phlebas, and Unnamed for comments on an earlier draft of this post.  If you liked this, please consider reading The Tragedy of Prince Hamlet and the Philosopher's Stone, or, A Will Most Incorrect to Heaven By William Shakespeare. If it's inconvenient to pay the $3 and you have 50+ karma on this site, PM me your email address.)

15 comments

Comments sorted by top scores.

comment by Klao · 2011-11-16T00:57:50.170Z · LW(p) · GW(p)

Who is the intended audience for this?

If someone has a good grasp of Bayes, it's not that informative. (Though I liked the original idea and the story. :)) But, if one doesn't already understand the math behind this, then it's just a bunch of magic numbers, I am afraid. The second half of it for sure.

Replies from: HonoreDB
comment by HonoreDB · 2011-11-17T04:22:20.532Z · LW(p) · GW(p)

The intended audience for the second half is me ten years ago--someone who has never heard of the concepts, but would find them intriguing enough to unpack the math and follow the links. For the rest, I thought the novel angle on familiar philosophy might be fun.

comment by J_Taylor · 2011-11-15T22:56:36.352Z · LW(p) · GW(p)

Aesthetic concern: Having the poker hands displayed is a really cool idea. However, you may wish to remove the initial image.

Edit: The image has been resized. The change makes the article look much nicer.

Replies from: MixedNuts
comment by MixedNuts · 2011-11-15T23:14:26.395Z · LW(p) · GW(p)

It's good, but way too big. Resizing it beats removing it beats leaving it as such.

Replies from: HonoreDB
comment by HonoreDB · 2011-11-15T23:59:44.668Z · LW(p) · GW(p)

Looks like someone edited it, thanks. Does the new size work?

Replies from: MixedNuts
comment by MixedNuts · 2011-11-16T00:05:25.683Z · LW(p) · GW(p)

The source image is just as big, it's just resized in the browser. This is bad because browsers still have to load the whole file, which is long and can't be good for LW's servers either, and because browsers usually just do a quick resize instead of the prettier ones requiring more expensive algorithms. I don't have anything better than Paint handy otherwise I'd do it for you.

Replies from: HonoreDB
comment by HonoreDB · 2011-11-16T00:25:34.155Z · LW(p) · GW(p)

It's a small file, isn't hosted on Less Wrong, and isn't very high-quality anyway.

comment by taw · 2011-11-16T02:23:45.484Z · LW(p) · GW(p)

Not very informative, but upvoted for amusement and nostalgia value. Good old Babylon 5, I still haven't seen the last season.

Replies from: Nisan
comment by Nisan · 2011-11-16T05:38:22.279Z · LW(p) · GW(p)

You should see Season 4, it's possibly the best one.

Replies from: taw
comment by taw · 2011-11-16T06:53:19.072Z · LW(p) · GW(p)

I've seen seasons 1-4. Since season 4 closes almost everything about the storyline, I didn't feel compelled to watch season 5 at that time, and later I just lost any connection with Babylon 5 characters and story.

Replies from: Nisan, pjeby
comment by Nisan · 2011-11-16T18:44:49.982Z · LW(p) · GW(p)

I choose not to believe in the existence of a fifth season.

Replies from: Vladimir_Nesov
comment by Vladimir_Nesov · 2011-11-16T18:46:40.862Z · LW(p) · GW(p)

"People can stand what is true,
for they are already enduring it."

:-)

comment by pjeby · 2011-11-16T16:54:37.760Z · LW(p) · GW(p)

It's still worth watching the final episode, "Sleeping In Light". It was originally filmed during the filming of season 4 (when it wasn't clear whether the series would end early), and has little connection to the other episodes of season 5.

Oddly enough, the last episode of season 4 was actually done afterward (both filming and in-universe chronologically), but Sleeping In Light provides the primary dramatic ending to the main characters' arc.

comment by Klao · 2011-11-16T00:51:38.988Z · LW(p) · GW(p)

The link to the "Hamlet" is broken. Not that it's hard to find, but you might still want to fix it.

Replies from: HonoreDB
comment by HonoreDB · 2011-11-16T01:21:04.656Z · LW(p) · GW(p)

Thanks, fixed.