CasinoCityTimes.com

Gurus
News
Newsletter
Author Home Author Archives Author Books Send to a Friend Search Articles Subscribe
Stay informed with the
NEW Casino City Times newsletter!
Newsletter Signup
Stay informed with the
NEW Casino City Times newsletter!
Recent Articles
Best of Donald Catlin

Gaming Guru

author's picture
 

Frequency Frustration

3 July 2005

A few months ago I received an email from a gent called Bob Ciaffone. It seems that Bob had invented a new game called "Compare" but he wanted some help in ranking hands. Since I don't know what the legal status of Bob's game is at the moment, I won't describe it here other than to say it is a parlor game played with cards, and in the course of the game a player would have to select the best four-card Poker hand one can form from a thirteen-card hand. Bob wanted to know how to how to rank such hands based on their frequency.

Well, you math weenies (like me) can see the problem. There are C(52,13) such hands (see my January 2005 article for an explanation of this notation). That number is on the order of 635 billion. But wait, there's more. Each of those hands has to be checked four cards at a time in order to find the best hand and this would involve C(13,4) or 715 hands. Multiplying these numbers we end up with a number on the order of 450 trillion (45 followed by 13 zeros). Whew!

Well, I wrote back to Bob and told him that I did not have the computing power to tackle such a problem. But there is more. I also pointed out that in situations such as this the ranking influences the frequency. For example, if a hand contained both a flush and a straight, which hand one would choose as the best hand would depend upon some apriori ranking. This could lead to paradoxical situations wherein it is impossible to rank hands based on frequency. I suggested that maybe the usual card ranking was best.

Bob wasn't convinced. I'm not surprised. I had addressed a similar question in an earlier article called "Poker Paradox" and, unfortunately, made an error. Because of this I published a follow-up article called "Oops!" and did not return to the matter. That is, until now.

When facing a daunting problem it is sometimes useful to address an easier but similar problem just to see what the structure looks like. So I looked at three-card Poker hands selected from five cards and, sure enough, found an example that illustrated my concern. I wrote back to Bob and told him that I had constructed a paradoxical example and it would appear in my July article. There is more to this story but first let me show you the example.

In Figure 1 below I list the frequencies for three-card Poker hands. In case you are not familiar with them, notice that unlike five card-hands the trips are harder to get than a straight and a straight is harder to get than a flush. No problem with that; the order in which I have them listed is the natural ranking that corresponds to the frequencies.

Hand

Frequency

Royal Flush

4

Straight Flush

44

3 of a Kind

52

Straight

720

Flush

1,096

Pair

3,744

High Card

16,440

Total -

22,100

Figure 1
Normal Three-Card Poker Frequencies

Now let's suppose that we choose our three-card Poker hands by selecting the best three-card hand from among all the possible hands in a five-card hand dealt from a 52-card deck (you see, this is analogous to Bob's situation only the numbers aren't so daunting). As I pointed out above, in order to do this you have to have some apriori criterion as to what the hand ranking should be. So I wrote a little program that would sort through the 2,598,960 different five-card hands and pick the best three-card Poker hand using the rankings in Figure 1. The results are shown in Figure 2.

Hand

Frequency

Royal Flush

4,704

Straight Flush

49,628

3 of a Kind

58,848

Straight

569,268

Flush

708,688

Pair

699,624

High Card

508,200

Total -

2,598,960

Figure 2
Three-Card Poker Hand Frequencies
when Ranked as in Figure 1

Already I think you can see trouble on the horizon. The high card hands have a lower frequency than anything except the Trips, Straight Flush, and Royal. It certainly wouldn't make sense to design a Poker-type game with the high card hands ranked right below the Three of a Kind so I won't belabor that anomaly. But look at the Flush and the Pair hands. Flushes occur with greater frequency than Pairs. Thus it would make sense to rank the Flush below the Pair. So, I rewrote my little program to select the best three-card hand from five using that ranking. The result is shown in Figure 3 below.

Hand

Frequency

Royal Flush

4,704

Straight Flush

49,628

3 of a Kind

58,848

Straight

569,268

Pair

1,049,184

Flush

359,128

High Card

508,200

Total -

2,598,960

Figure 3
Three-Card Poker Hand Frequencies
when Pairs Beat Flushes

Oh no! The Pairs have a greater frequency than the Flushes so should be ranked below them. But that was what we looked at in Figure 2. So there it is. It is impossible to rank three-card Poker hands consistent with their frequency of occurrence when picking the best hand from five cards.

Well, Bob believed me when I told him I had the above example. However, he wrote and suggested that perhaps a reasonable way to assign rankings would be to count every three-card hand in every five-card hand and use that as a basis. Reasonable, but once again I had to point out that I didn't have the computing power to carry out such a program. Nevertheless, I told him I would think about it.

Are you familiar with the concept of serendipity? This is a word that describes a situation wherein while engaged in one activity something else good happens to you. Well, that's what happened to me (and Bob).

I decided to carry out Bob's suggestion on my 3 from 5 example. So I rewrote my program to count every three-card hand in every five-card hand and add up the number of occurrences. The result is shown in Figure 4.

Hand

Frequency

Royal Flush

4,704

Straight Flush

51,744

3 of a Kind

61,152

Straight

846,720

Flush

1,288,896

Pair

4,402,944

High Card

19,333,440

Total -

25,989,600

Figure 4
Frequencies Counting Every Three-
Card Hand in Five-Card Hands

Notice that the rankings match those in Figure 1. That got me to thinking; wondering how close the relative frequencies in Figure 4 were to the frequencies in Figure 1. I checked. Bingo! Every entry in Figure 4 is 1,176 times the corresponding entry in Figure 1. Why would that be? There must be a theorem hiding there. Then slowly it hit me. Isn't it funny how the obvious is only obvious after you realize it? Here is what I realized.

Let's look at a typical three-card hand, say 2H, 2C, 4D. With these cards removed from the deck there are 49 cards left. So how many five-card hands contain this particular three-card hand? As many ways as there are to choose two additional cards from the 49 remaining. That number is C(49, 2) and, yes, you guessed it. That number is exactly 1,176. So this particular pair hand gets counted 1,176 times. How many distinct three-card pair hands are there? That is just the number 3744 noted in Figure 1. Altogether then, pairs get counted 1176 x 3,744 times or 4,402,944. Check out the frequency for pairs in Figure 4.

The argument generalizes easily to any k-card hand chosen from an n-card hand. In general, the answer will be C(52 - k, n - k) times the number of a particular type of k-card hand one can deal from a 52-card deck. In Bob's case, had I been able to write and run such a program, the numbers I would have recorded would have been C(48, 9) or 1,677,106,640 times the usual four-card frequencies. But I didn't have to write it nor run it. Ain't mathematics grand? Wait a minute. Come to think of it, I didn't make a penny on this! Oh well, see you next month.

Donald Catlin

Don Catlin is a retired professor of mathematics and statistics from the University of Massachusetts. His original research area was in Stochastic Estimation applied to submarine navigation problems but has spent the last several years doing gaming analysis for gaming developers and writing about gaming. He is the author of The Lottery Book, The Truth Behind the Numbers published by Bonus books.

Books by Donald Catlin:

Lottery Book: The Truth Behind the Numbers
Donald Catlin
Don Catlin is a retired professor of mathematics and statistics from the University of Massachusetts. His original research area was in Stochastic Estimation applied to submarine navigation problems but has spent the last several years doing gaming analysis for gaming developers and writing about gaming. He is the author of The Lottery Book, The Truth Behind the Numbers published by Bonus books.

Books by Donald Catlin:

Lottery Book: The Truth Behind the Numbers