Open Side Menu Go to the Top
Register
Probability of AA vs KK vs QQ PF Probability of AA vs KK vs QQ PF

04-14-2014 , 04:06 PM
Hi. I played this hand tonight: http://www.boomplayer.com/en/poker-h...202_BB5AB4F840

What is the probability before any given hand that this occurs? I.e. AA, KK, and QQ are dealt eight-handed (I'm not interested in who gets what: just that they get dealt to someone).

Please show your working; I'm not sure how to work this out. Thanks.
Probability of AA vs KK vs QQ PF Quote
04-14-2014 , 04:41 PM
You probably mean the chance that at least 3 players get those hands. But I'll answer both since the calculation is identical except for a few coefficients.

Pr(at least) =
(8C3)(4C2)^3 / (52C6) / 5!! -
3(8C4) * 3(4C2)2*3!! / 52C8 / 7!! +
6(8C5) * 3(4C2)(3!!)2 / 52C10 / 9!! -
10(8C6) * (3!!)3 / 52C12 / 11!!
= 1 in 25804.78

Pr(exactly) =
(8C3)(4C2)^3 / (52C6) / 5!! -
4(8C4) * 3(4C2)2*3!! / 52C8 / 7!! +
10(8C5) * 3(4C2)(3!!)2 / 52C10 / 9!! -
20(8C6) * (3!!)3 / 52C12 / 11!!
= 1 in 25995.7

If I typed into my calculator correctly.
Probability of AA vs KK vs QQ PF Quote
04-15-2014 , 09:55 AM
This is an opportunity for me to practice my LaTex:
Pr(at least) =
Probability of AA vs KK vs QQ PF Quote
04-15-2014 , 10:09 AM
That's not right. You don't want the factors of 3,6,10. They should be 1. And for exactly 3 it should be 1,2,3. We aren't considering 3 people having a certain hand, we're considering multiple groups of 3 people having 3 particular hands. So when 4 people have AA,KK,QQ,QQ, that's only double counted.

Actually they are different even from this.

Last edited by BruceZ; 04-16-2014 at 02:41 AM.
Probability of AA vs KK vs QQ PF Quote
04-15-2014 , 10:20 AM
Doh yes, you're right. I actually didn't even think about the coefficients. I remember doing this same problem once before and using those coefficients so I just used them again. I shouldn't trust my past self!
Probability of AA vs KK vs QQ PF Quote
04-16-2014 , 02:40 AM
Actually the coefficients are not what I said either. They don't follow the standard form in this case. They don't even alternate sign. The exactly 3 one has an even bigger surprise. I'm going to leave it as an exercise for you to figure out what they should be. Rounded to the nearest integer it only changes the answer by 1 in each case. I took down the modified latex I posted earlier.

Last edited by BruceZ; 04-16-2014 at 02:51 AM.
Probability of AA vs KK vs QQ PF Quote
04-16-2014 , 05:11 AM
lets try this way:

8 players get 16 hole cards. Lets imagine they are dealt two cards at a time, in which case in order for them to get at least one QQ, one KK and one AA, the sequence of 16 cards to be dealt needs to be

AAKKQQxxxxxxxxxx
AAKKxxQQxxxxxxxx
etc

To calculate the number of sequences that satisfy this:
- the AAKKQQ can be in 3! = 6 different orders (AAKKQQ, AAQQKK, KKAAQQ, KKQQAA, QQAAKK, QQKKAA)
- they can occupy C(8,3) = 56 “spots”
- each AA, KK and QQ can be 4!/2! = 12 different combinations
-> there are 3! * C(8,3) * (4!/2!)^3 = 56*6*12^3 = 580608 ways to put AAKKQQ into the sequence
The remaining 10 cards can be any of the remaining 46 cards. Thus, there are 46!/36! combinations for the x’s.

All in all there are 3! * C(8,3) * C(4,2)^3 * 46! / 36! suitable sequences

The total number of sequences is 52!/36!

The probability of getting at least one AA, KK and QQ with 8 players is thus:

(3! * C(8,3) * C(4,2)^3 * 46!) / 52! = 0,000039609952 (~1 in 25246)

The exactly one is trickier this way, I may come back to that when I have more time.
Probability of AA vs KK vs QQ PF Quote
04-16-2014 , 05:37 AM
Quote:
Originally Posted by hauturi
The remaining 10 cards can be any of the remaining 46 cards. Thus, there are 46!/36! combinations for the x’s.
That's incorrect. You have done nothing to eliminate the over counting of the cases where more than 3 players get these hands. That's the whole point of inclusion-exclusion, and it is the standard way to do these problems. In fact, your answer is merely the first term of inclusion-exclusion which you could have computed as

C(8,3)*18/C(52,2)*12/C(50,2)*6/C(48,2)

≈ 1 in 25246.

That's an upper bound on the probability because it over counts. When you use inclusion-exclusion, getting the answer for the exactly one follows very quickly from the at least one. The terms are the same except for the coefficients. I've already computed both answers. I'm letting heehaww do it because this case is a bit non-standard and is a good exercise in thoroughly understanding the principle of inclusion-exclusion. His formula is correct other than the coefficients of -3,6,-10.

Last edited by BruceZ; 04-16-2014 at 05:47 AM.
Probability of AA vs KK vs QQ PF Quote
04-16-2014 , 06:51 AM
Quote:
Originally Posted by BruceZ
That's incorrect. You have done nothing to eliminate the over counting of the cases where more than 3 players get these hands.
Thats why I wrote:

"at least"

and

"The exactly one is trickier this way, I may come back to that when I have more time. "
Probability of AA vs KK vs QQ PF Quote
04-16-2014 , 07:09 AM
Ok, let's try the "exactly" now.

The propability of exactly one QQ, KK and AA being dealt is the probability of atleast one of each being dealt minus the probability that at least QQ, KK, AA AND [QQ|KK|AA] is dealt.

So, lets calculate the probability of at least QQ, KK, AA AND [QQ|KK|AA] being dealt using the same method as above. Lets say the hand that can be either QQ, KK or AA is marked NN:

Then the 16 card sequence can be
AAKKQQNNxxxxxxxx
AAKKQQxxNNxxxxxx
etc

Now
- the order of AAKKQQNN can be in 4! = 24 different orders
- they can occupy C(8,4) = 70 “spots”
- each AA, KK and QQ can be 4!/2! = 12 different combinations. NN can be any of the remaining AA, KK or QQ = 3 combinations
-> there are 4! * C(8,4) * 3*(4!/2!)^3 = 70*24*3*12^3 = 8709120 ways to put AAKKQQ into the sequence
The remaining 8 cards can be any of the remaining 44 cards. Thus, there are 44!/36! combinations for the x’s.

All in all there are 4! * C(8,4) * 3*(4!/2!)^3 * 44! / 36! suitable sequences

The total number of sequences is 52!/36!

The probability of getting one AA, KK and QQ + at least another QQ, KK or AA with 8 players is thus:

(4! * C(8,4) * 3*(4!/2!)^3 * 44!) / 52! = 0.00000028702863768434862737523672387905 (~ 1 in 3483973)

Now to get the P(exactly):

(3! * C(8,3) * C(4,2)^3 * 46! - 4! * C(8,4) * 3*(4!/2!)^3 * 44!) / 52! = 0.00003932292336275576195040743117143 (~ 1 in 25430,46)
Probability of AA vs KK vs QQ PF Quote
04-16-2014 , 07:14 AM
Quote:
Originally Posted by hauturi
Thats why I wrote:

"at least"

and

"The exactly one is trickier this way, I may come back to that when I have more time. "
But you didn't compute "at least". For "at least", you need to count the combinations of 4,5, and 6 only once. You are counting the combinations of 4 twice, the combinations of 5 four times, and the combinations of 6 eight times. That's why I said you are over counting. Your exactly calculation isn't right either. You need to use inclusion-exclusion for this type of problem as has already been done except for the coefficients.
Probability of AA vs KK vs QQ PF Quote
04-16-2014 , 07:21 AM
Quote:
Originally Posted by BruceZ
But you didn't compute "at least". For "at least", you need to count the combinations of 4,5, and 6 only once. You are counting the combinations of 4 twice, the combinations of 5 four times, and the combinations of 6 eight times. That's why I said you are over counting. Your exactly calculation isn't right either. You need to use inclusion-exclusion for this type of problem as has already been done except for the coefficients.
Ok, I misunderstood your previous post. Thanks for pointing that out.
Probability of AA vs KK vs QQ PF Quote
04-16-2014 , 07:30 AM
In fact, the value you got for "exactly" is very close to the right value for "at least". That's because your calculation of AAKKQQNN doesn't correctly account for the cases of having 5 or 6 players with these hands, but that's a very small error because it's rare to get those. Then you subtract that from the cases where you over counted the "at least", and so you get very close to the right value for "at least". But the probability is a little high because even though you over count the 5 and 6 player cases when you do AAKKQQNN, it actually doesn't subtract enough for them to compensate for the over counting in the "at least" calculation.

I get:

P(at least) ≈ 1 in 25430.85

P(exactly) ≈ 1 in 25617.45

Last edited by BruceZ; 04-16-2014 at 07:50 AM.
Probability of AA vs KK vs QQ PF Quote
04-16-2014 , 06:53 PM
I may be seeing the light.
Quote:
Originally Posted by BruceZ
I get:

P(at least) ≈ 1 in 25430.85

P(exactly) ≈ 1 in 25617.45
Spoiler:
coefs(at least) = 1, -1, -1, -1
coefs(exactly) = 1, -2, 0, 0
At least, that agrees with your answers to those decimal places.

Edit -- although, even if that's right, I wouldn't really be able to explain why if someone asked. That was mostly a hunch. So I still have thinking left to do before I fully believe it.

Last edited by heehaww; 04-16-2014 at 07:02 PM.
Probability of AA vs KK vs QQ PF Quote
04-16-2014 , 07:38 PM
That's correct. I shouldn't have given the answer for you to reverse engineer. It spoils the surprise of realizing one of them only has 2 terms. In fact, that should work for any number of different pairs.

Last edited by BruceZ; 04-16-2014 at 07:53 PM.
Probability of AA vs KK vs QQ PF Quote
04-16-2014 , 08:34 PM
I didn't reverse engineer at all. Actually the biggest hint for me was your previous statement:
Quote:
So when 4 people have AA,KK,QQ,QQ, that's only double counted.
I had a flashback to that and then it occurred to me that if that statement is still true, then the rest of the coefficients should arise from powers of 2 as follows:
Spoiler:
exactly
-2
2^2 - 2(2) = 0
2^3 - 2(2^2) = 0

at least
2 --> -1
2^2 - 2 = 2 --> -1
2^3 - 2^2 - 2 = 2 --> -1
The thing is, when you made that statement yesterday or whenever, I thought it made sense and I said you were right. But when I thought about it today I realized I didn't quite get it (or know if it's true since you changed your answer), so I started completely from scratch. I was coming up with different ideas (some of which weren't alternating) but before I finished writing them out, I got the powers-of-2 idea.

Now I'm pretty sure I do understand the quoted and therefore all of the coefficients. Which makes me way happier than it should!

Last edited by heehaww; 04-16-2014 at 08:45 PM. Reason: Add cryptic thought process spoiler
Probability of AA vs KK vs QQ PF Quote
04-16-2014 , 08:40 PM
And here it is in LaTeX:

Pr(at least) =


Pr(exactly) =
Probability of AA vs KK vs QQ PF Quote
04-17-2014 , 11:30 AM
Quote:
Originally Posted by heehaww
exactly
-2
2^2 - 2(2) = 0
2^3 - 2(2^2) = 0

at least
2 --> -1
2^2 - 2 = 2 --> -1
2^3 - 2^2 - 2 = 2 --> -1
Also for exactly:

4! / (4C2)2! = 2 --> -2

5! / (5C2)3 = 120/30 = 4
(5C3)3! / 30 = 2
4 - 2(2) = 0 --> 0

6! / (6C2)(4C2) = 720/90 = 8
(6C2)4! / 90 = 4
(6C2)(4C2)2! / 90 = 2
8 - 2(4) + 0(2) = 0 --> 0
Probability of AA vs KK vs QQ PF Quote
04-18-2014 , 12:20 AM
I think we can disregard that last post of mine and the stuff it quoted.

I'm thinking the coefs for "at least" should be: (1, -1, -5, -17)
making the answer 1 in 25432.42547
(compared to Bruce' 25430.85)

I still agree that the coefs for "exactly 3" are (1, -2, 0, 0), but I think my previous thought processes arrived at it only by dumb luck.

My new coefs pass the test of, when you add up my exactly's from 3 to 6 you get the same answer as my new "at least 3". (This ofc proves squat but it's something.)

My "exactly 4" coefs are (1, -6, 0)
Exactly 5 = (1, -18)
Exactly 6 = 1
Probability of AA vs KK vs QQ PF Quote
04-18-2014 , 02:13 AM
Quote:
Originally Posted by heehaww
I think we can disregard that last post of mine and the stuff it quoted.

I'm thinking the coefs for "at least" should be: (1, -1, -5, -17)
making the answer 1 in 25432.42547
(compared to Bruce' 25430.85)
Then you didn't do the exactly 4,5,6 right because they sum to 1 in 25430.85. You had the coefficients correct before for the reason you gave.

Code:
> dfact
function(n) ifelse(n<=1,1,n*dfact(n-2))
>
> p3 = C(8,3)*C(4,2)^3 / C(52,6)/dfact(5) -
+ 2*C(8,4)*3*C(4,2)^2*dfact(3) / C(52,8)/dfact(7)
> p3
[1] 3.90358947250714e-05
> 1/p3
[1] 25617.4479166667
>
> p4 = C(8,4)*3*C(4,2)^2*dfact(3) / C(52,8)/dfact(7) -
+ 2*C(8,5)*C(3,2)*C(4,2)*dfact(3)^2 / C(52,10)/dfact(9)
> p4
[1] 2.85814985939383e-07
> 1/p4
[1] 3498766.85686483
> 
> p5 =
+ C(8,5)*C(3,2)*C(4,2)*dfact(3)^2 / C(52,10)/dfact(9) -
+ 2*C(8,6)*dfact(3)^3 / C(52,12)/dfact(11)
> p5
[1] 6.06121080528664e-10
> 1/p5
[1] 1649835374.6875
> 
> p6 = C(8,6)*dfact(3)^3 / C(52,12)/dfact(11)
> p6
[1] 3.52395977051549e-13
> 1/p6
[1] 2837716844462.5
> 
> p = p3+p4+p5+p6
> p
[1] 3.93223161844873e-05
> 1/p
[1] 25430.8519190052

Last edited by BruceZ; 04-18-2014 at 12:40 PM. Reason: Didn't show p3 before
Probability of AA vs KK vs QQ PF Quote
04-18-2014 , 10:51 AM
Quote:
Originally Posted by BruceZ
You had the coefficients correct before for the reason you gave.
My reasoning from before didn't work on this other problem from my thread:
Quote:
A deck contains 30 cards numbered 1 to 15. There are 2 cards of each rank.
When 16 cards are dealt, what is the probability that at least one of each of the cards numbered 1-8 is dealt?
The 2nd approach there made me see it better.

(28 * 8C1) / (8 * (2C2)27) = 2 --> -1

(28 * 8C2) / [8C2 * (2C2)2(26)] = 4
(8 * 27 * 7C1) / ... = 4
4 - 4 = 0 --> +1

(28 * 8C3) / [8C3 * (2C2)3(25)] = 8
(8 * 27 * 7C2) / ... = 12
(8C2 * 27 * 6) / ... = 6
8 - 12 + 6 = 2 --> -1

And so on for that problem.

It all comes down to the fact that there are fewer ways to choose objects all at once than some at a time. For instance (4C2)(2C2) > 4C4 and the former counts the latter 6 times.

Returning to this problem, I wanted to see what happened when I applied that reasoning. To make it easier for myself, I moved things to the numerator and used a single denominator.

Oh I messed up last night, now I'm getting different coefficients yet. Actually they're pretty nice if true (which I doubt):

at least = (1, -5, +25, -125) = 1 in 26184.90943
exactly = (1, -6, +36, -216) = 1 in 26378.57758

Now that my answers are different enough from yours, a simulation could help (assuming you have any doubt in your answer which I don't know that you do).

What's wrong with the reasoning below?

1st term counts 2nd term:
(4C2)3 * (3C1)(2C2) / [(3C1)(4C2)2 *(4C4)] = 6 times
2nd coef = -6

1st term counts 3rd term:
(4C2)3 * (3C2)(2C2)2 / [(3C2)(4C2)(4C4)2] = 36

2nd term counts 3rd term:
3(4C2)2 * 2(2C2) / 3(4C2) = 12

3rd coef: 36 - 6(12) = -36 --> +36

1st term counts 4th term: (4C2)3 * (2C2)3 / (4C4)3 = 216
2nd term counts 4th term: 3(4C2)^2 = 108
3rd term counts 4th term: 3(4C2) = 18

4th coef: 216 - 6(108) + 36(18) = 216 --> -216
Probability of AA vs KK vs QQ PF Quote
04-18-2014 , 02:40 PM
I scaled the problem down so I could try without inclusion-exclusion.

4-handed, what's the probability of exactly 2 players getting AA vs KK?

(4C2)2 * (44C4) * 3!! +
2(4C2)(4C3)(3C2) * (44C3) * 3!! +
2(4C2)(4C4)(4C2) * (44C2) * (3!!-1) +
(4C3)2(3C2)2 * (44C2) * 3!! +
2(4C3)(4C4)(3C2)(4C2) * 44 * (3!!-1) +
(4C4)2(4C2)2 * (3!!-1)
/ (52C8)7!!

= 1 in 3774.205311

But my inclusion-exclusion gets coefs of (1, -3, 0) for an answer of 1 in 3780.176768

What answer do you get for that, Bruce?
Probability of AA vs KK vs QQ PF Quote
04-18-2014 , 02:59 PM
Quote:
What's wrong with the reasoning below?

1st term counts 2nd term:
(4C2)3 * (3C1)(2C2) / [(3C1)(4C2)2 *(4C4)] = 6 times
2nd coef = -6
When you count hands with AA|KK|QQ, you aren't counting each AA|KK|QQ|QQ hand 6 times. You're counting each one twice, one for each QQ. We're talking specific hands with specific QQ's, not any QQ's. Then each AA|KK|KK|QQ|QQ is counted 2^2 = 4 times, and each AA|AA|KK|KK|QQ|QQ is counted 2^8 = 8 times.

For the earlier problem, when you count the ones with 1-8, you count the ones with exactly 1 duplicate twice, exactly 2 duplicates 2^2 = 4 times, exactly 3 duplicates 2^3 = 8 times, etc. It's the same problem.

I don't know what all of your factorials and combinatorics are all about. It should be a simple matter to figure how much each is being over counted.

A simulation would be worthless for this problem because it would take forever to distinguish the tiny differences we're talking about. But here's a simple calculation that shows the 2nd coefficient is -2. Just consider a 16 card deck with only A-J with 4 players, and compute the probability that exactly 3 players have AAKKQQ. That's just

Code:
> p = 18/C(16,2)*12/C(14,2)*6/C(12,2)*(6*4/2 + 6*4 + C(4,2))*4/C(10,2)
> p
[1] 0.00671328671328671
> 1/p
[1] 148.958333333333
where the 6*4/2 is ways for the 4th guy to get both cards A-Q without a pair, 6*4 is ways to get a J with an A,K,Q, and C(4,2) is ways to get JJ. Then we multiply by 4 since any of the 4 can be the guy without AA-QQ. Now we show that agrees with (1,-2,0,0):

Code:
> cards = 16
> players = 4
> p = C(players,3)*C(4,2)^3 / C(cards,6)/dfact(5) -
+ 2*C(players,4)*3*C(4,2)^2*dfact(3) / C(cards,8)/dfact(7)
> p
[1] 0.00671328671328671
> 1/p
[1] 148.958333333333
You can do more complicated examples with this second one, but the first calculation gets more complicated.


Quote:
Originally Posted by heehaww
I scaled the problem down so I could try without inclusion-exclusion.

4-handed, what's the probability of exactly 2 players getting AA vs KK?
> p3 = C(4,2)*C(4,2)^2 / C(52,4)/dfact(3) -
+ 2*C(4,3)*2*C(4,2)*dfact(3) / C(52,6)/dfact(5)
> p3
[1] 0.000265009440764849
> 1/p3
[1] 3773.45047449585

OR

> p3 = C(4,2)*12*6/C(52,2)/C(50,2) -
+ 2*C(4,3)*2*6*6*1*3/C(52,2)/C(50,2)/C(48,2)
> p3
[1] 0.000265009440764849
> 1/p3
[1] 3773.45047449585

Yours comes to 3773.44398723677. That differs by C(4,2)^2/C(52,8)/dfact(7). It also would agree with (1,-2,+4). I did it 3 different ways and got the same answer as yours. Then I scaled it down to a 12 card deck, and it's off from inclusion-exclusion in exactly the same way. Then I simed the 12 card deck, and it is consistent with the direct calculation but not inclusion-exclusion. So that seems real solid, but the inclusion-exclusion seems trivially solid. I'm missing something.

Last edited by BruceZ; 04-19-2014 at 02:48 AM.
Probability of AA vs KK vs QQ PF Quote
04-19-2014 , 01:24 AM
I figured it out. For the AAKK problem in inclusion-exclusion, we multiply by 2 to count both AA|KK|KK and AA|AA|KK. Each one of those counts AA|AA|KK|KK twice, so 4 times all together, and since the coefficient of the second term is -2, that's -8. Add that to the 4 for the first term, and that's -4 which is why we need a 3rd term of +4 as all the direct calculations and sim are telling us. So it's (1,-2,4). I'll have correct coefficients for the original problem shortly.

Last edited by BruceZ; 04-19-2014 at 01:31 AM.
Probability of AA vs KK vs QQ PF Quote
04-19-2014 , 02:38 AM
LOL. At least is just (1,-1,1,-1). Exactly is (1,-2,4,-8).

Exactly starts out 1,-2,4 as just explained for the AA|KK problem. AA|KK|QQ|QQ is counted twice on the 1st line by AA|KK|QQ, so -2. Then AA|KK|KK|QQ|QQ is counted 4 times on the 1st line by AA|KK|QQ then twice EACH on the 2nd line by AA|KK|QQ|QQ and AA|KK|KK|QQ, so 4-2(2*2) = -4 so +4. Then AA|AA|KK|KK|QQ|QQ is counted 8 times on the 1st line by AA|KK|QQ, plus 4 times EACH on the 2nd line by AA|KK|QQ|QQ, AA|KK|KK|QQ, and AA|AA|KK|QQ, plus twice EACH on the 3rd line by AA|KK|KK|QQ|QQ, AA|AA|KK|QQ|QQ, and AA|AA|KK|KK|QQ, for a total of 8-2(4*3)+4(2*3) = 8, so -8.

Now changing this for at least isn't hard. We just change the multipliers so the 2 becomes -1, then we have 4-1(2*2) = 0 so 1. Then 8-1(4*3)+1(2*3) = 2 so -1.


P(at least 3) =



≈ 1 in 25430.0670403859


P(exactly 3) =



≈ 1 in 25615.8569388248
Probability of AA vs KK vs QQ PF Quote

      
m