In poker, suppose you’re dealt a pair.
Is the probability that your opponent also holds a pair higher, lower, or the same as it would be if you held nothing?
Let's assume that one pair is the highest way your hand can be described, and the sought probability is that your opponent has a pair that also cannot be considered any higher hand (such as a full house).
What is the probability that a random hand fits the type under consideration? First lets consider the first two cards drawn are the pair: the probability the second card matches the first is 3/51; then that the third card does not match: 48/50; then that the fourth card matches neither of the two previously chosen ranks: 44/49; and finally the last card doesn't match a previous one: 40/48. Then we have to consider that there are a total of C(5,2)=10 positions which we could have considered as being the pair:
(3/51)*(48/50)*(44/49)*(40/48)*10 = 352/833
So out of the 2,598,960 possible poker hands, 1,098,240 are a single pair with nothing better. I don't know if this helps us with the problem at hand, but in case we need it we know it.
Now what's the probability that the other player will have the same kind of hand? The probability the other player has the same rank pair as you will of course be lower than his having a pair of any other given rank, since there are only two of those cards left in the deck. It doesn't really matter what order the cards are dealt in: any way, his cards come from the 47 that are not in your hand.
What starts out below as an attempt at an analytic solution turns out to be flawed somewhere, so you might want to skip to the bottom. Better yet, find the flaw in my analysis.
First the probability that his pair is the same rank as your pair:
(2/47)*(1/46)*( /45)*( /44)*( /43)*10
... well I can't figure out what the numerators should be. We have to break it down into cases, with their individual probabilities and the conditional probabilities from there.
Three of the remaining denominations have only 3 members left, while nine have all 4 members left. The remaining cards in the "other"'s hand may all come from denominations with 4 remaining members, or one may come from one with 3, or two or all three may come from denominations with 3 members left; these are of course mutually exclusive. In any case, part of being "successful" is that they do come from different denominations.
None from sets of 3: (2/47)*(1/46)*(36/45)*(32/44)*(28/43)*10
One from a set of 3: (2/47)*(1/46)*(9/45)*(32/44)*(28/43)*10*3
(the *3 at the end representing the three possible locations of the selection from a triplet, after the locations of the pair were chosen)
Two from sets of 3: (2/47)*(1/46)*(9/45)*(6/44)*(28/43)*10*3
Three from sets of 3: (2/47)*(1/46)*(9/45)*(6/44)*(3/43)*10
As these are mutually exclusive we add them together. They already include the factors for selecting the matching pair, and they add up to 79/11,891 ~= 0.00664. This is the probability your opponent holds the same pair that you do. That is, from scratch, the probability that he not only has a pair, but it's the same pair (different suits of course) that you do.
The simulation below agrees within a margin of error dependent on the expected number of hits, but does always come out a bit high. I don't see any errors in my logic above, so it could be a bias in the random number generator, or an error in my logic. Numbers come out like 67 or 78 out of 10,000.
Private Sub Form_Load()
Form1.Visible = True
Randomize Timer
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
deck$ = "1122233344455556666777788889999AAAABBBBCCCCDDDD"
For tr0 = 1 To 10
For tr = 1 To 1000
ReDim had(47)
hand = 0
Do
r = Int(Rnd(1) * 47 + 1)
If had(r) = 0 Then
had(r) = 1
hand = hand + 1
End If
Loop Until hand = 5
h$ = ""
For i = 1 To 47
If had(i) Then
h = h + Mid(deck, i, 1)
End If
Next
If Left(h, 2) = "11" Then
If Mid(h, 3, 1) < Mid(h, 4, 1) And Mid(h, 4, 1) < Mid(h, 5, 1) Then
goodct = goodct + 1
End If
End If
DoEvents
Next
Randomize Timer
Next
Text1.Text = Text1.Text & crlf & goodct & " " & goodct / 10000 & " done"
Next up is the probability that some your opponent has some other pair than the same one you had. This has even more cases:
The pair is from a denomination you left 4 cards of, and his three non-paired cards also came from sets of which you left 4 cards:
The pair is from a denomination you left 4 cards of, and two of his three non-paired cards also came from sets of which you left 4 cards, while one came from a set you left 3 of:
The pair is from a denomination you left 4 cards of, and one of his three non-paired cards also came from a set of which you left 4 cards, while two came from a set you left 3 of:
...
I can see where this is going ... it's not going to be worth the effort. I may as well do a simulation. Not only can the opponent's unpaired cards come from the 4- and 3- member sets, but also from the 2-member set left over from your pair. And then the same thing would have to be done if the opponent's pair came from one of the 3-member sets.
|
Posted by Charlie
on 2018-11-02 13:08:37 |