Conditional Probability in 7-card Poker

250 Views Asked by At

For 7 card poker (Texas Hold 'Em) .. how would you find the probability of getting a straight, given that someone else has a straight flush?

I'm not sure if the answer is to use Bayes' theorem. If it is, I can't resolve the conditional probability clauses that arise.

Lets say the probability of making a straight P(S) = .00462 (4.62% as percentage)

And the probability of making a straight flush is P(SF) is .000279 (.0279% as percentage)

This came up in our card game last night.

Edit to add context: At our point of interest in this game, there are 5 'community cards' on the table. There are also two players in the game, each with two 'private cards'. The players can each make a 'best' 5 card hand out of 7 available cards (2 private + 5 community). Without going into more detail: at this instance, one player has a Straight Flush, and another player has a Straight. I believe this is all of the information necessary to answer the question.

1

There are 1 best solutions below

1
On

To do this properly, we'd have to go into lots of details. I'll derive a reasonable estimate, pointing out some relatively unlikely cases that I'm neglecting along the way, and then compare it with an exact computer calculation.

When you say the other player has a straight flush, I'll take that to include a royal flush.

The probability that all $5$ straight flush cards are on the table is $\frac1{\binom75}=\frac1{21}$. (Here I'm neglecting the possibility that the other player might have a straight flush of length $6$ or $7$.) In this case we have a straight.

The probability that exactly $4$ of the straight flush cards are on the table is $\frac{2\cdot5}{\binom75}=\frac{10}{21}$. They form an outside straight with probability $\frac25$ and an inside straight with probability $\frac35$. (Here I'm neglecting the possibility that the four cards are contiguous but include an ace and can thus only be completed on one side.) We have $3$ cards to complete the straight (our two hole cards and the fifth card on the table). The probability to complete an outside straight with $3$ cards is (taking into account that the other player has one of the $8$ required cards):

$$ 1-\frac{\binom{47-7}3}{\binom{47}3}=1-\frac{40\cdot39\cdot38}{47\cdot46\cdot45}=\frac{1267}{3243}\;. $$

The probability to complete an inside straight with $3$ cards is (taking into account that the other player has one of the $4$ required cards):

$$ 1-\frac{\binom{47-3}3}{\binom{47}3}=1-\frac{44\cdot43\cdot42}{47\cdot46\cdot45}=\frac{2971}{16215}\;. $$

The probability that exactly $3$ of the straight flush cards are on the table is $\frac{\binom52}{\binom72}=\frac{10}{21}$ (which adds up to $1$ with the other two cases.) The three cards have no gaps with probability $\frac3{\binom53}=\frac3{10}$, include the two outer cards of the straight flush and thus have two gaps with probability $\frac3{\binom53}=\frac3{10}$, and have one gap with the remaining probability $1-\frac3{10}-\frac3{10}=\frac25$.

We have $4$ cards to complete the straight (our two hole cards and the other two cards on the table). If there are two gaps, we need a certain pair of ranks, and for each of those ranks the other player holds one of the four cards. The probability to have at least one of the remaining ones from each rank is

$$ 1-\frac{\binom{47-3}4}{\binom{47}4}-\frac{\binom{47-3}4}{\binom{47}4}+\frac{\binom{47-6}4}{\binom{47}4}=\frac{2711}{59455}\;. $$

If there is one gap, we need to fill it, and also draw a card on the outside. On the one side the other player holds a card of that rank, on the other side they don't. Thus the probability for us to have a suitable pair of ranks is the same as above, $\frac{2711}{59455}$, on the one side, and slightly higher on the other:

$$ 1-\frac{\binom{47-3}4}{\binom{47}4}-\frac{\binom{47-4}4}{\binom{47}4}+\frac{\binom{47-7}4}{\binom{47}4}=\frac{10594}{178365}\;. $$

If there are no gaps, then three different pairs of ranks complete the straight (again neglecting the fact that we can't go beyond the ace), of which one is the pair that the other player has, one shares one rank with the other player and one shares no ranks with the other player. Thus the probabilities for these cases are the two probabilities above, $\frac{2711}{59455}$ and $\frac{10594}{178365}$, and for the case with no shared ranks:

$$ 1-\frac{\binom{47-4}4}{\binom{47}4}-\frac{\binom{47-4}4}{\binom{47}4}+\frac{\binom{47-8}4}{\binom{47}4}=\frac{13796}{178365}\;. $$

(We'll be adding these probabilities, neglecting the fact that we might have more than one of these pairs of ranks.)

Putting all of this together, we arrive at the estimate

$$ \frac1{21}\cdot1+\frac{10}{21}\left(\frac25\cdot\frac{1267}{3243}+\frac35\cdot\frac{2971}{16215}\right)+\frac{10}{21}\left(\frac3{10}\cdot\frac{2711}{59455}+\frac25\left(\frac{2711}{59455}+\frac{10594}{178365}\right)+\frac3{10}\left(\frac{2711}{59455}+\frac{10594}{178365}+\frac{13796}{178365}\right)\right) \\ =\frac{850067}{3745665}\\\approx0.227\;. $$

Here's code that calculates the exact probability by enumeration, and here's code that checks the result by simulation. The exact probability for us to have a straight if the other player has a straight flush is

$$ \frac{12109847}{54033210}\approx0.224\;, $$

so the estimate isn't too bad.

One might at first think that this is the same as the probability to have a straight if the other player has a straight, since the suits don't matter for us to get a straight; but that's not quite true, because knowing that the other player's straight is suited makes it slightly more likely for their $7$-card hand to include a rank in the straight twice, and we benefit from that. I didn't calculate the exact probability to get a straight given that the other player has a straight, but the simulations yield a slightly lower probability of about $0.202$.