All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Games
Duelling pairs (Posted on 2018-11-02) Difficulty: 3 of 5
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?

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer-aided solution | Comment 2 of 16 |
Well the simulation always showed a slightly higher value for that first probability, 79/11,891, for the opponent having not merely a pair, but the same pair as you have--believably close but consistently higher. Furthermore the simulation (Monte Carlo method) could not give a statistically significant difference between your opponent's probability with and without your having a pair. Then I realized that instead of a Monte Carlo method, I could use the same remaining-deck method to treat all C(47,5)=1,533,939 possible hands equally.

The deck that exists other than the hand held by you can be represented by the string

"1122233344455556666777788889999AAAABBBBCCCCDDDD"

where 1 represents a card with the same value as each of your pair; 2, 3 and 4 represent cards with the same value as each of your individual cards; and the rest represent cards whose denomination is not present in your hand. All 1,533,939 samplings of five cards are examined. Each resulting hand is taken left-to-right from this 47-card remainder of the deck, so any that match are next to one another, simplifying the test for matches (pairs, triples, etc.).

It finds the probability that his hand has the same pair as you, and nothing else, is 11559/1533939 ~= 0.00753550, indeed higher than my apparently flawed calculation. The probability he has a pair and nothing else and that pair does not match yours is 638604/1533939 ~= 0.41631642. By symmetry, half of this is the probability that his is higher than yours, and half is the probability it is lower. Together, the probability he has a pair and nothing else is then  650163/1533939 ~= 0.4238519263151925

A similar program finds that if your hand had nothing then the probability that your opponent had a pair and nothing else would be 645300/1533939 ~= 0.42068166. That program starts out with the string representing the deck as

"1112223334445556666777788889999AAAABBBBCCCCDDDD"

and at the end, the count of "11"'s and the others are combined, as "11..." no longer represents a match with a pair in your hand, but merely a pair of what you have as a single card in your hand, just like four other single cards in your hand.

So apparently your having a pair slightly increases your opponent's probability of having a pair.  There's a small chance it's the same pair but otherwise an equal probability of being higher or lower.

Comfortingly, the overall probability of an individual, such as your opponent, of having a pair and nothing else, calculated 352/833 ~= .4225690 above, is between the probabilities given that you don't have a pair and given that you do have a pair.

DefDbl A-Z
Dim crlf$, had(47)


Private Sub Form_Load()
 Form1.Visible = True
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)
 
 deck$ = "1122233344455556666777788889999AAAABBBBCCCCDDDD"
 
 For a = 1 To 43
  had(a) = 1
 For b = a + 1 To 44
  If had(b) = 0 Then
    had(b) = 1
 For c = b + 1 To 45
  If had(c) = 0 Then
    had(c) = 1
 For d = c + 1 To 46
  If had(d) = 0 Then
    had(d) = 1
 For e = d + 1 To 47
  If had(e) = 0 Then
  
   trialct = trialct + 1

   h$ = Mid(deck, a, 1) + Mid(deck, b, 1) + Mid(deck, c, 1) + Mid(deck, d, 1) + Mid(deck, e, 1)

   matchCt = 0
   For i = 2 To 5
     If Mid(h, i, 1) = Mid(h, i - 1, 1) Then matchCt = matchCt + 1
   Next
   If matchCt = 1 Then
        If Left(h, 2) = "11" Then
            samect = samect + 1
        Else
            diffct = diffct + 1
        End If
   End If
   DoEvents
 
  End If
 Next e
    had(d) = 0
  End If
 Next d
    had(c) = 0
  End If
 Next c
    had(b) = 0
  End If
 Next b
   had(a) = 0
 Next a
 
 
 Text1.Text = Text1.Text & crlf & samect & "/" & trialct & "    " & mform(samect / trialct, "0.00000000") & crlf
 Text1.Text = Text1.Text & crlf & diffct & "/" & trialct & "    " & mform(diffct / trialct, "0.00000000") & " done"
  
End Sub

Function mform$(x, t$)
  a$ = Format$(x, t$)
  If Len(a$) < Len(t$) Then a$ = Space$(Len(t$) - Len(a$)) & a$
  mform$ = a$
End Function

  Posted by Charlie on 2018-11-02 15:17:15
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (7)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information