Open Side Menu Go to the Top
Register
KK vs AA Why is My Math Wrong? (Inclusion-Exclusion and Overlapping Sets) KK vs AA Why is My Math Wrong? (Inclusion-Exclusion and Overlapping Sets)

03-09-2020 , 05:19 PM
The math question is: What % of the time will KK flop at least 1 K & AA will not flop an ace?

My math is as follows:

You have to flop a K: 2(C,1)

Then you have a total of: 45 unseen cards that can complete the last 2 cards on the Flop: [52 - 2 As - 3 Ks, as 1 K is on the Flop] unseen cards - the 2 As that can't come on the Flop.

45(C,2)

So, it's [2(C,1)] * [45(C,2)] = 2 * 990 = 1980 possible Flops that bring at least one K & no As.

We have 48 unseen cards pre, so total possible Flops:

C(48,3) = 17,296

1980/17,296 = .11447 or 11.48% chance.

I've seen on at least 3 poker sites that it's in the low 20% arena, i.e., 20.17%, 21.67% & I think 22.06% are the numbers I've seen.

Or maybe what I've seen it quoted as is 20.17% 21.xx% & one other [that I can't remember but think is was 22.06%] on various sites.

What's up with my poor math skillz?
KK vs AA Why is My Math Wrong? (Inclusion-Exclusion and Overlapping Sets) Quote
03-09-2020 , 05:22 PM
That’s for flopping a K only. You can also win by making a straight/flush.
KK vs AA Why is My Math Wrong? (Inclusion-Exclusion and Overlapping Sets) Quote
03-09-2020 , 05:36 PM
Quote:
Originally Posted by 4cardfish
That’s for flopping a K only. You can also win by making a straight/flush.
This is thru the Flop only.
KK vs AA Why is My Math Wrong? (Inclusion-Exclusion and Overlapping Sets) Quote
03-09-2020 , 06:37 PM
Your approach is correct but your math is not quite right. You should probably split it into two cases. Tally each then add the tallies.

Case 1: Exactly 1 King and 0 Aces on Flop

Case 2: Exactly 2 Kings and 0 Aces on Flop
KK vs AA Why is My Math Wrong? (Inclusion-Exclusion and Overlapping Sets) Quote
03-10-2020 , 11:37 AM
Whatever sites you're looking at are most likely giving a 5-card probability. The answer is nowhere near 20%, in fact your answer was slightly high because you unknowingly double-counted quad kings. Your C(45,2) allows for a 2nd king. There is only one way (2C2) to get both kings, not C(2,1).
KK vs AA Why is My Math Wrong? (Inclusion-Exclusion and Overlapping Sets) Quote
03-11-2020 , 01:30 AM
Thank you gentlemen!
KK vs AA Why is My Math Wrong? (Inclusion-Exclusion and Overlapping Sets) Quote
03-11-2020 , 04:18 AM
After thinking about it, I'm still a bit confused....

The C(2,1) in my formula is to flop 1 of the 2 Ks available.

The C(45,2) are the remaining cards in the deck [available to complete the flop, after 1 K flops & the 45 includes the other K still in the deck, but not the 2 As, so quad Ks are a possibility in my equation....or so I thought....
KK vs AA Why is My Math Wrong? (Inclusion-Exclusion and Overlapping Sets) Quote
03-11-2020 , 07:27 AM
Yes they are a possibility. The problem is there are only 44 combos of quad kings with no A, but you unintentionally counted 88 combos. It's rather hidden, and if you're curious to see it I'll try to explain. But splitting the calculation into two separate tallies (as whosnext suggested) would be the easy way to avoid that. When dealing with overlapping sets, you either need to use inclusion-exclusion or avoid overlap altogether.

And come to think of it, when you make quads, you probably don't care if an ace comes (in fact you prefer it), so maybe you want the probability to reflect that.
KK vs AA Why is My Math Wrong? (Inclusion-Exclusion and Overlapping Sets) Quote
03-11-2020 , 01:48 PM
Quote:
Originally Posted by heehaww
Yes they are a possibility. The problem is there are only 44 combos of quad kings with no A, but you unintentionally counted 88 combos. It's rather hidden, and if you're curious to see it I'll try to explain. But splitting the calculation into two separate tallies (as whosnext suggested) would be the easy way to avoid that. When dealing with overlapping sets, you either need to use inclusion-exclusion or avoid overlap altogether.
Since this "overlapping" phenomenon is so widespread (and hidden), I think it would be great if you explained why OP's original formula was not quite correct in this case.
KK vs AA Why is My Math Wrong? (Inclusion-Exclusion and Overlapping Sets) Quote
03-12-2020 , 07:49 PM
Good points. Does the overlap come because I use the 2 Ks in C(2,1) and then use the remaining K again in C(45,2) thus using the card twice & overlapping the K that didn't come in C(2,1)? That would make sense.........but then again I'm a novice at this.
KK vs AA Why is My Math Wrong? (Inclusion-Exclusion and Overlapping Sets) Quote
03-12-2020 , 10:45 PM
Since it comes up a lot, perhaps this should be a sticky, so I went ahead and attempted to write something worrrthy of stickiness. To that end, I went beyond addressing OP's question and wrote an intro to inclusion-exclusion. The specific response to OP is mostly at the beginning of Part 2, but is also partly covered in Part 1.

Part 1: Background

Suppose you flip a coin twice and want the probability of at least one tails. You know it isn't simply 50% + 50%. The big clue is that you know it can't be 100% (nor 150% with 3 flips), but what's the underlying reason probabilities don't add (or multiply) like that? Well, sometimes they do, for instance if you want the A, you have a 1/52 chance with one card and a 2/52 chance with 2 cards. What's the difference between those two scenarios? Overlapping possibilities.

There is no overlap in the ace example. Getting the ace with your 1st card or your 2nd card are mutually exclusive possibilities because the A can only be one of your cards (if any). Each 1/52 is the probability of the A being an exact card, so there is no overlap between the two 1/52 terms. Therefore, when you add them, nothing is counted more than once.

By contrast, when you flip a coin twice, Tails can occur on one or both flips. There is a 50% chance for the 1st flip and a 50% chance for the 2nd flip. Notice, though, that each of those 50%'s allows the other flip to also be tails. There's a 50% chance of Tx and a 50% of xT, where x can be a T or H.

If you add the TX and XT cases, you're adding (TH & TT) + (HT & TT), so you're double-counting the TT case. That's why the chance of at least one T is not P(Tx) + P(xT), but lower. If you remove the excess TT, you get the right answer: P(T) = P(Tx) + P(xT) - P(TT) = 100% - 25%, which is the Principle of Inclusion-Exclusion at work. That can also be illustrated with a Venn diagram, but I prefer to picture the strings of symbols, especially when we extend the concept to N sets.

Let's extend it to 3 flips. We know it's not 150%, but by how much is that too high?

Each Txx possibility counts a TTx possibility, so when any two Txx possibilities are combined, one of the 3 TT possibilities gets double-counted. Here is my mental model of what's happening:

Txx + xTx double-counts TTx
xTx + xxT double-counts xTT
Txx + xxT double-counts TxT

By adding Txx + xTx + xxT, we have double-counted each of the 3 TT possibilities. We've also triple-counted the TTT case. Therefore, it follows that:

P(T with 3 flips) = 150% - P(exactly 2 tails) - 2*P(TTT) = 150% - 3/8 - 2(1/8) = 7/8

If you wanted the chance of exactly one tails, you'd simply adjust the above as follows:
P(exactly one T w/ 3 flips) = 150% - 2*P(exactly 2 tails) - 3*P(TTT) = 3/8

However, for problems where it's worth using this approach to begin with (unlike this coin problem), the exactly-2 case would be just as difficult to calculate as the original thing we're trying to calculate. So rather than subtracting the TTH cases, we'd subtract the TTx cases, which is easier in such problems. In doing so, we'd also be subtracting TTT cases, in fact over-subtracting them. Here's what that would look like.

There are 3 TTx arrangements. Since the x is ignored, or equivalently, has a 100% chance, each TTx arrangement has a 25% chance. So from 150% we subtract 75%. Our original 150% triple-counted the TTT. But for each TTx case we subtracted, we also subtracted the TTT case, so overall it got added 3 times and then subtracted 3 times for a net result of 0. It needs to be added back in.

P(T with 3 flips) = 3(1/2) - 3(1/4) + 1/8 = 7/8

Mind you, the problem can also be solved using only addition, but only if there's no overlap among what you're adding: P(T with 3 flips) = P(exactly one T) + P(exactly 2) + P(TTT)


Part 2: Card Examples

Quote:
What % of the time will KK flop at least 1 K & AA will not flop an ace?
A common mistake is to make the numerator C(2,1)*C(45,2). That numerator counts the Kxx cases, but since another K is part of the 45, the x's are allowed to be another K, which means the KKx cases are counted twice.

You can visualize it the same way I illustrated it with the 3 coinflips when listing the Txx vs TTx cases. There's also a numerical explanation.

If instead of the Kxx cases, you wanted to count the KKx cases, you'd correctly say C(2,2)*44. Notice how the two kings are both picked at the same time, hence the C(2,2) term instead of C(2,1).

Let's make it explicit by rewriting the bad numerator:

C(2,1) * [C(44,2) + C(1,1)*44]

What you've done is counted the KKx cases C(2,1)*C(1,1) times instead of C(2,2).

A warning sign was that you picked from the same set (of two kings) twice separately. As a rule of thumb, any time you find yourself picking from the same set more than once (which I'll call "double-dipping"), especially when you don't intend for the order of selections to matter, you have to watch out for overcounting.

To get the correct answer, you can either subtract the excess KKx combos or, from the start, split the problem into non-overlapping cases. If we let "o" represent non-kings, you can add the K-o-o cases and the KKo cases: C(2,1)*C(44,2) + C(2,2)*44


Quote:
5 hold'em players go to the flop and it's all diamonds. What's the chance that at least 2 of them flopped a flush?
49 cards remain, 10 of which are diamonds.

Unlike the other examples, inclusion-exclusion is a time-saving approach to this problem, and probably the most efficient one. It makes this otherwise tedious problem quick and easy (potentially).

Start with the FFxxx cases. There are C(5,2) ways to pick 2 players who to get the flushes. The other 3 players are allowed to have anything, so we can greatly simplify the calculation by ignoring them, which looks like:

C(5,2)*C(10,4) / C(49,4)

If we didn't ignore the unchosen players, we'd have a larger numerator and a proportionally larger denominator:

C(10,4)*C(45,6) * 3*(5*3) / [C(49,10) * 9*7*5*3]

Ignoring is clearly better! But notice how the 45 includes the rest of the diamonds, so C(45,6) means they can be picked again. Just like in the previous example, this double-dipping results in the cases of >4 diamonds to be overcounted. With the shorter method, the same thing is happening, except it's visible in the form of the denominator being too small rather than the numerator being too large. What the two expressions have in common is that they're counting FFxxx cases where the x's are all-inclusive. The inclusiveness of the x's results in overlap, and so things get overcounted. This time, however, we're overcounting on purpose (with the plan of correcting later), since the x's make the calculations easier.

Anyway, we started with P(FFxxx). That triple-counts P(FFFxx), so we have to subtract that twice:

- 2*C(5,3)*C(10,6) / C(49,6)

As a rule of thumb, +'s and -'s always alternate, so our next step will be to add something. Next up is P(FFFFx). It was counted C(4,2) times, then subtracted 2*C(4,3) times for a net count of -2. To make the count +1, we'll add it back 3 times:

+ 3*C(5,4)*C(10,8) / C(49,8)

Finally, the case of all 5 players having a flush. Without any math, I already know it needs to be subtracted 4 times, because these error/correction coefficients follow patterns.

- 4 / C(49,10)

In entirety, after simplification: C(5,2)*C(10,4)*[1/C(49,4) - 2/C(49,6)] + 3*5*C(10,2)/C(49,8) - 4/C(49,10)
KK vs AA Why is My Math Wrong? (Inclusion-Exclusion and Overlapping Sets) Quote
03-13-2020 , 01:55 PM
I've read it all, but haven't studied it all. Got caught up with the stock market.

It appears from Part I, that I'm correct, in that my C(4,1)*C(45,2) IS inclusive of any one of the 4 aces appearing on the board and if it isn't chosen, it has a 2nd chance. I get that part now.........

If the A is what appears otf in C(4,1), then the other 3 suits, which had a chance to be chosen in C(4,1) gets another chance in C(45,2)

Thanks for the in-depth article! I hope it gets pinned.
KK vs AA Why is My Math Wrong? (Inclusion-Exclusion and Overlapping Sets) Quote
03-13-2020 , 05:54 PM
It's included, but too much so. You counted the same combos twice. Your numerator should be 1936 rather than 1980, and the correct answer is 11.19% as opposed to 11.45%.

Your C(2,1) is selecting one of the remaining two suits, say spade and heart. Multiplying by C(2,1) is equivalent to adding C(1,1)*C(45,2) + C(1,1)*C(45,2). That is, you've added (K)(x) + (K)(x) with each x potentially being the final K. The possibility of getting both kings got counted twice: once by the 1st term and once by the 2nd term added.
KK vs AA Why is My Math Wrong? (Inclusion-Exclusion and Overlapping Sets) Quote
03-13-2020 , 06:52 PM
heehaww has explained this very well but just so it is crystal crystal clear to any future reader of this thread ...

If order of the flop cards does not matter, the following flops are considered the same (count as only one):

(K)(K)(9) AND (K)(K)(9)

so some care needs to be taken not to count them separately as two different flops.
KK vs AA Why is My Math Wrong? (Inclusion-Exclusion and Overlapping Sets) Quote
03-14-2020 , 11:14 AM
Quote:
Originally Posted by whosnext
heehaww has explained this very well but just so it is crystal crystal clear to any future reader of this thread ...

If order of the flop cards does not matter, the following flops are considered the same (count as only one):

(K)(K)(9) AND (K)(K)(9)

so some care needs to be taken not to count them separately as two different flops.
Which is called permutations. You don't care if flop comes KQJ or QJK

So when you determine total possible flops when you only know your cards, it's not 50*49*48, it's [50*49*48]/[3*2*1] you start with 3 because that's how many objects [cards] there are. If you wanted total possible 5 card boards, it's' 5*4*3*2*1....the 1 really isn't necessary.

The easy way to write the above possible flops for 50 unseen cards is: C(50,3)
KK vs AA Why is My Math Wrong? (Inclusion-Exclusion and Overlapping Sets) Quote
03-14-2020 , 12:31 PM
He didn't become mod of this forum without knowing that

He's saying you counted the K permutations when you meant to count their combinations, which is another way of looking at it.

A permutation is a special case of multinomial coefficients, which in turn can be expressed as products of binomial coefficients (combinations). For instance the homework problem everyone on the internet seems to have had at one point: how many ways to arrange MISSISSIPPI ? One solution is 11*C(10,2)*C(8,4). The same reasoning works when there are no repeating letters, for instance the arrangements of CARD: C(4,1)*C(3,1)*C(2,1) = 4!

There are C(2,2) combos of KK, but you counted C(2,1)*C(1,1), ie 2 factorial, so rather than counting their combos, you counted their perms (of which there are twice as many). Whichever way you slice it, the combos got double-counted.
KK vs AA Why is My Math Wrong? (Inclusion-Exclusion and Overlapping Sets) Quote
03-14-2020 , 02:30 PM
Based upon a sample size of one, my attempts to make the thread better seemed to have instead made the thread worse. So, hopefully, this will be my last post in this thread ( ).

To repeat, heehaww has given multiple excellent explanations of this hidden double-counting phenomenon and how the Principle of Inclusion-Exclusion (PIE) can properly handle the issue. PIE is a very powerful and useful tool and is often the preferred methodology especially when delineating numerous mutually exclusive and collectively exhaustive cases is unwieldy.

To button up the thread, I attempted to lay out the example from OP and show in an obvious way (as a supplement to what heehaww did) why OP's original answer was wrong because it double-counted some flops. I will try to do so again though at this point it seems a bit foolish.

You have KK and your opponent has AA. You want to count flops with at least one King and no Aces.

OP proposed C(2,1)*C(45,2) = 1,980 to be the answer but we know the correct answer is 1,936.

The reason for the overage has been explained several times in several different ways. Let's try one more which is, of course, essentially the same reasoning previously given.

OP's C(2,1) factor represents having one King on the flop (of the two remaining kings still in the deck). Since you now have accounted for 3 Kings and you don't want any of the 4 Aces to appear on the flop, the remaining 2 flop cards can be any of the remaining 45 cards in the deck (this is OP's C(45,2) factor).

The problem with this is that it double-counts the flops with two Kings. Consider choosing the K as the first flop card (via the C(2,1) factor). Now suppose you choose the K and 9 as the other two flop cards (via the C(45,2) factor).

Fine and dandy since clearly (K)(K)(9) is a valid flop we need to count.

Eventually in our counting we will choose the K as the first flop card (via the C(2,1) factor). And we will eventually choose the K and 9 as the other two flop cards (via the C(45,2) factor). This would give us a flop of (K)(K)(9).

This too appears to be a valid flop that needs to be counted. However, (K)(K)(9) is equivalent to (K)(K)(9) which has already been counted. So it would be a mistake to count them both. (Presumptively we will assume the order of the flop cards does not matter in both the numerator and denominator of our probability quotient.)

The Principle of Inclusion-Exclusion is a way to "remove" the double-counting. As heehaww has explained via both words and math, there are exactly 44 of these "duplicative" flops that need to be removed. Thus, 1,980 - 44 = 1,936 is the correct answer.

In this very simple example, it is easy to delineate the two mutually-exclusive collectively-exhaustive cases (exactly 1 King on flop & exactly 2 Kings on flop) which method also yields 1,936 as the correct answer.

Bottom line: the Principle of Inclusion-Exclusion is a tremendously powerful and useful tool to help tackle many probability questions.

Last edited by whosnext; 03-14-2020 at 03:59 PM.
KK vs AA Why is My Math Wrong? (Inclusion-Exclusion and Overlapping Sets) Quote
11-01-2024 , 03:03 PM
Mike Caro had a section in SuperSystem very similar to this regarding a five card draw hustle about how often youll start with the two red jacks in your hand.
KK vs AA Why is My Math Wrong? (Inclusion-Exclusion and Overlapping Sets) Quote
11-02-2024 , 05:25 PM
Quote:
Originally Posted by K9Papa
The math question is: What % of the time will KK flop at least 1 K & AA will not flop an ace?

My math is as follows:

You have to flop a K: 2(C,1)

Then you have a total of: 45 unseen cards that can complete the last 2 cards on the Flop: [52 - 2 As - 3 Ks, as 1 K is on the Flop] unseen cards - the 2 As that can't come on the Flop.

45(C,2)

So, it's [2(C,1)] * [45(C,2)] = 2 * 990 = 1980 possible Flops that bring at least one K & no As.

We have 48 unseen cards pre, so total possible Flops:

C(48,3) = 17,296

1980/17,296 = .11447 or 11.48% chance.

I've seen on at least 3 poker sites that it's in the low 20% arena, i.e., 20.17%, 21.67% & I think 22.06% are the numbers I've seen.

Or maybe what I've seen it quoted as is 20.17% 21.xx% & one other [that I can't remember but think is was 22.06%] on various sites.

What's up with my poor math skillz?
The probability of one king and no ace is 2/48 x 44/47 x 43/46 x 3. Two kings and no ace is 2/48 x 1/47 x 44/46 x3. The total probability of 11616/103776 when multiplied by the total number of different flops (17296) is 1936.
KK vs AA Why is My Math Wrong? (Inclusion-Exclusion and Overlapping Sets) Quote

      
m