Drawing without replacement, exactly
The hypergeometric distribution gives the probability of getting k successes when you draw n items from a population of N that holds K successes — and each item is drawn once and kept. Because you do not put items back, the odds shift with every draw, which is the whole reason it differs from the binomial.
Read it as: ways to pick k successes from the K available, times ways to pick the remaining n−k draws from the N−K failures, divided by every way to pick n from N. C(a, b) is the binomial coefficient "a choose b".
A worked example — 2 hearts in a 5-card hand
Deal 5 cards from a standard deck and ask for exactly 2 hearts. Here N=52, K=13 hearts, n=5, k=2.
So about a 27.4% chance. Note the odds of a heart start at 13/52 and drop after each heart you draw — a binomial would wrongly hold them at 25% throughout.
Hypergeometric vs binomial, side by side
| Hypergeometric | Binomial | |
|---|---|---|
| Sampling | Without replacement | With replacement |
| Population | Finite (N) | Infinite / constant p |
| Success odds | Change every draw | Fixed at p |
| Mean | n × K / N | n × p |
| Best for | Small draws from a fixed group | Independent repeated trials |
Common uses: quality control (defects in an inspected batch), card and lottery odds, and mark-and-recapture population estimates in ecology.
The mean and the finite-population correction
- Expected successes. The mean is n × K / N — draw 5 cards and you expect 5 × 13/52 = 1.25 hearts.
- Achievable range. k cannot exceed the smaller of n and K, and cannot be below n − (N−K); outside that range the probability is exactly 0.
- Tighter spread. The variance carries a factor of (N−n)/(N−1), the finite-population correction, which makes the hypergeometric less spread out than the matching binomial.
Common questions
When do I use the hypergeometric distribution instead of the binomial?
Use hypergeometric when you draw without replacement from a fixed, finite group, so each draw changes the odds for the next one. Use binomial when the probability of success stays constant on every trial, which is what replacing the item (or an effectively infinite population) does.
What do N, K, n and k mean?
N is the total population, K is how many successes it contains, n is how many items you draw, and k is how many of those draws you want to be successes. A deck of 52 cards with 13 hearts, dealt 5, asking for 2 hearts, is N=52, K=13, n=5, k=2.
When can I just use the binomial as an approximation?
When your sample is under about 5% of the population (n divided by N is below 0.05). At that point removing items barely shifts the odds, so binomial and hypergeometric answers nearly match and the binomial is easier to compute.


