Hypergeometric Distribution Calculator
The probability of drawing a given number of successes when sampling without replacement — cards from a deck, defectives from a batch, an audit sample from a ledger.
When you sample without replacement the draws are not independent: taking one red ball changes the odds for the next.
How the hypergeometric distribution calculator works
When you sample without replacement the draws are not independent: taking one red ball changes the odds for the next. The hypergeometric distribution handles that exactly. With K successes in a population of N and a sample of n, the chance of exactly k successes is C(K, k) C(N − K, n − k) ÷ C(N, n).
If the population is very large relative to the sample, the binomial distribution is a good approximation — the calculator shows both so you can see when it stops being one.
Formula: P(X = k) = C(K, k) C(N − K, n − k) / C(N, n)
Worked examples
| Inputs | P(X = k) | Note |
|---|---|---|
| Exactly one ace in a 5-card hand | 29.947364% | about 29.9% |
| No aces in a 5-card hand | 65.8842% | about 65.9% |
| 2 defectives in a sample of 10 from 100 with 5 bad | 7.021881% | about 7% |
FAQFrequently asked questions
When do I use the hypergeometric rather than the binomial?
Whenever you sample without replacement from a finite population. If the sample is under about 5% of the population the two agree closely.
What is the chance of at least one ace in a five-card hand?
About 34.1% — the complement of the 65.9% chance of none.
Why are the draws not independent?
Because removing a card changes what is left. After drawing an ace, only three remain in 51 cards.
Where is this used in practice?
Acceptance sampling and audit: a sample of 10 from a batch of 100 with 5 defectives finds at least one about 42% of the time — which is why small samples miss small defect rates.
What is the expected number of successes?
n × K / N, exactly the same as the binomial. Only the spread differs, by the finite-population correction.
Where these figures come from
- NIST Digital Library of Mathematical Functions — reference definitions for elementary and special functions
- Wolfram MathWorld — definitions and formulas for every topic on this page
- NIST/SEMATECH e-Handbook of Statistical Methods — the statistical formulas (mean, variance, z, confidence intervals, sample size)
- National curriculum in England — Mathematics — the terms and methods taught in UK schools
Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.