Hypergeometric Distribution: Sampling Without Replacement
Problem
A standard deck has 13 hearts. Draw 5 cards without replacement. What is P(exactly 2 hearts)? Show the sampling and the full hypergeometric formula.
Explanation
When do we need the hypergeometric distribution?
When you sample without replacement from a finite population split into two categories ("successes" and "failures"), the probability of each draw changes as items are removed. The binomial distribution assumes with-replacement (or equivalently, each trial has the same ), so it fails here.
The hypergeometric distribution handles this correctly.
The formula
Given:
- = total population size
- = number of successes in the population
- = sample size
- = observed successes
The numerator counts: ways to choose successes from the available, times ways to choose failures from the available. The denominator is the total number of samples.
Step-by-step solution
Setup: cards, hearts, cards drawn, hearts wanted.
Step 1 — Count favorable outcomes (2 hearts, 3 non-hearts):
- Choose 2 hearts from 13:
- Choose 3 non-hearts from 39:
- Multiply:
Step 2 — Count total outcomes (any 5 cards from 52):
Step 3 — Divide:
So there's about a 27.4% chance of drawing exactly 2 hearts.
Sanity check
The mean of a hypergeometric is . Since 2 is close to 1.25, a 27% probability is plausible — around the mode of the distribution.
Hypergeometric vs. binomial
- Hypergeometric (without replacement): the deck shrinks, probabilities shift after each draw.
- Binomial (with replacement, or infinite population): fixed each draw.
When is tiny compared to , the two agree very closely. For our problem, the binomial approximation with gives close to but not equal to the exact hypergeometric answer.
Common mistakes
- Using the binomial when drawing without replacement. It's almost right for large populations, but it's wrong for small ones like a deck.
- Mismatching the categories. Keep careful track: and refer to successes; and refer to failures.
- Forgetting in the denominator. Only normalizing by or leaving it out entirely are common slips.
Try it in the visualization
Sliders for , , , and reshape the whole bar chart live. A deck of cards animates the draw, coloring hearts red as they are taken, showing why each subsequent probability changes.
Interactive Visualization
Parameters
Got your own math or physics problem?
Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.