A deck contains cards. Exactly of them are marked A, and different cards are marked B (no card carries both marks). Five cards are drawn at random without replacement.
Find the probability that the five drawn cards include at least one A and at least one B.
Count the three disjoint groups of cards. The marks do not overlap, so the deck splits into
Every later count is a choice of cards from one of these sub-piles, and the total number of equally likely hands is
Switch to complements — “at least one … and at least one …” is painful head-on. Counting hands with A, A's, A's … while simultaneously tracking B's means a double sum. Instead let
and apply inclusion–exclusion to the complement:
The three complementary events each describe hands drawn from a single restricted pile, so each is one binomial coefficient. The term is essential: hands with neither mark were subtracted twice and must be added back once.
Count hands with no A. These come from the non-A cards:
Count hands with no B. These come from the non-B cards:
That this probability is small is the expected sanity check: with of cards marked B, missing all of them in five draws should be unlikely.
Count hands with neither mark. These are drawn from the unmarked cards only:
Combine. Putting the four counts over the common denominator :
Check the result against a rough expectation. The chance of catching at least one A alone is , and the chance of at least one B alone is . If the two events were independent the product would be ; the true answer is slightly lower, which is exactly right — the events are mildly negatively correlated, because slots in the five-card hand used by an A are slots that cannot hold a B.
Need to solve a different problem like this? Open the solver →