Advertisement

Poker hand probabilities for n-card hand, where n=1 through n=5

Started by December 23, 2024 04:34 PM
0 comments, last by taby 20 hours, 57 minutes ago

I asked this on Math Stack Exchange, but my question was closed, so I'm cross-posting here.

I have a poker code that properly classifies 5-card hands. I also have a code to best classify 1-card hands, 2-card hands, 3-card hands, and 4-card hands.

For instance, where n=5 we get these frequencies that closely match those on https://en.wikipedia.org/wiki/Poker_probability:

High Card
1301457

One Pair
1099504

Two Pair
123713

Three of a kind
54592

Straight
10151

Flush
5038

Full House
3838

Four of a kind
619

Straight Flush
44

Royal Flush
4

And for instance, for a 1-card hand (plus the remaining unflipped cards), the frequencies become:

Straight Flush
1599447

Royal Flush
999513

It turns out that the frequency ratio is like 1.6=8/5. This makes sense. Using one card plus the remaining unflipped cards leads to Royal Flush when the one card is Ace through 10 (which is 5 possibilities, versus Straight Flush 2 through 9 (which is 8 possibilities).

For a 3-card hand:

Three of a kind
1566610

Straight
450344

Flush
104363

Four of a kind
447411

Straight Flush
25582

Royal Flush
4650

In terms of the binomial coefficient, what are the actual odds for the 3-card hand?

The whole C++ code is too long to paste here. The code is at: https://github.com/sjhalayka/poker

Advertisement