Foundations
Hypergeometric Distribution
The Hypergeometric distribution is the law of the success count in n draws without replacement from a finite population of N items, K of which are successes. The PMF is the ratio of three binomial coefficients. The mean is nK/N, identical to the Binomial with p = K/N, but the variance carries the finite-population correction (N-n)/(N-1). The Binomial is the n << N limit. Fisher's exact test, capture-recapture, and quality-control acceptance sampling read off the Hypergeometric directly.
Prerequisites
Plain-Language Definition
Take a finite population of items. Mark of them as successes. Draw a sample of size without replacement and count the number of successes drawn. The probability law of that count is the Hypergeometric distribution.
The plain example is an urn with red balls and blue balls. Pull out balls without replacement; how many are red? Sampling without replacement is what distinguishes the Hypergeometric from the Binomial. The Binomial is the law for the same setup with replacement, or equivalently for an infinite population. As the population grows large relative to the sample, the Hypergeometric converges to the Binomial.
Definition
Hypergeometric Distribution
A random variable has a Hypergeometric distribution with population size , success count , and sample size if its PMF is
The numerator counts the ways to choose successes from the available and failures from the available. The denominator counts the ways to choose any items from . The ratio is the equally-likely-outcomes probability for that count.
The support boundaries are tight. The lower bound kicks in when the sample is so large that some successes are forced into it; the upper bound caps the count at the smaller of the sample size and the available-success count.
Why This Matters
Three places in the canon use the Hypergeometric directly.
-
Fisher's exact test for tables. The null distribution of one cell count given fixed margins is exactly Hypergeometric. The conditioning argument that produces it is the cleanest derivation of an exact small-sample test in classical statistics, and it works when the chi-squared approximation breaks down for small cell counts.
-
Capture-recapture. Tag animals, release them, draw from the population, and observe tagged. The Hypergeometric PMF gives a likelihood for the unknown ; the maximum-likelihood estimator is the Lincoln-Petersen estimator. Same idea works for software-defect estimation in code review.
-
Acceptance sampling. A lot of items contains defectives. Draw items and accept the lot if no more than are defective. The operating characteristic of the inspection plan is a sum of Hypergeometric PMFs in .
Mean and Variance
Hypergeometric Mean and Variance
Statement
Intuition
The mean is identical to a Binomial with trials and per-trial success probability . The variance differs by the factor , the finite-population correction. As with , the correction tends to 1 and the Hypergeometric variance approaches , the Binomial variance.
Proof Sketch
Write , where is the indicator that the -th draw is a success. By symmetry for every , so by linearity. For the variance, . Each . For , by the chain rule on a uniformly sampled pair, giving . Summing variances and covariances and collecting terms gives the stated variance.
Why It Matters
The mean alone cannot tell the Hypergeometric apart from the Binomial. The finite-population correction in the variance is the diagnostic. In any setting where the sample is a meaningful fraction of the population (sampling 10 percent or more from a finite population), the Binomial variance overstates the true variance, sometimes substantially.
Failure Mode
Software libraries differ on parameter order. Some take , others , others . Read the docstring before plugging in numbers.
Binomial Limit
Hypergeometric Converges to Binomial as N grows
Statement
For fixed and , as with .
Intuition
When the population is much larger than the sample, removing a drawn item barely changes the success fraction in the remaining items. Sampling without replacement becomes indistinguishable from sampling with replacement, and the Hypergeometric reduces to the Binomial.
Proof Sketch
Expand the Hypergeometric PMF using and similarly for the other binomial coefficients. The numerator is a polynomial of total degree in , and the denominator is also . Match leading coefficients: the factors from and the factors from give to leading order, while the denominator gives a factor close to for large . Reassembling and dividing produces the Binomial PMF.
Why It Matters
The rule of thumb in textbooks is to use the Binomial approximation when , i.e. the sample is at most five percent of the population. Below that threshold the Binomial PMF and the Hypergeometric PMF agree to two decimal places for moderate . Above it, the finite-population correction matters and the exact Hypergeometric should be used.
Failure Mode
The convergence is pointwise in , not uniform in the extreme tails. For very small at the support boundaries, the relative error from the Binomial approximation can be substantial even when is small.
Worked Example: Acceptance Sampling
A shipment contains widgets, of which are defective. An inspector draws at random without replacement.
What is the probability of seeing exactly defectives?
Compute the three binomial coefficients (in practice via log-gamma to avoid overflow). The numerical value is approximately .
What is the probability of seeing no defectives at all? That is the acceptance probability for a lot-tolerance plan with :
The Binomial approximation with , gives , which overestimates the acceptance probability because it ignores the finite-population correction.
The mean and standard deviation: , , . The Binomial would give variance , about 24 percent too large.
Comparison to Closely Related Distributions
Hypergeometric and Binomial have the same mean but different variances
The two distributions agree on the mean ( versus with ). They differ in the variance by the finite-population correction , which equals when and decreases monotonically to when . Reporting the Binomial standard error on data from a finite-population without-replacement design will overstate the uncertainty.
The Hypergeometric is not symmetric in K and n
A Hypergeometric has the same distribution as a Hypergeometric by the symmetry of "which side of the table is the sample". The PMF is symmetric in the roles of "successes" and "draws". This is a useful computational trick when or . It is also a frequent source of confusion when reading code that swaps the two.
Conditional on the margins, the Hypergeometric is exact, not approximate
In a contingency table with fixed margins, the conditional distribution of the upper-left cell under the null of independence is exactly Hypergeometric. Fisher's exact test reports a -value computed from this exact distribution. The chi-squared approximation to the same test statistic uses a continuous distribution and is approximate; the two answers can differ for small cell counts.
Hypergeometric vs Binomial vs Negative Hypergeometric
The Hypergeometric, the Binomial, and the Negative Hypergeometric all answer questions about counting successes in a sequence of draws but differ in what is fixed and what is random.
- Binomial. independent trials with constant success probability . Random variable: the number of successes. Sampling with replacement, or equivalently from an infinite population.
- Hypergeometric. draws without replacement from a finite population with successes and failures. Random variable: the number of successes. Sampling without replacement from a finite population.
- Negative Hypergeometric. Draw without replacement until failures occur. Random variable: the number of successes before the -th failure. Less commonly encountered, but appears in stopping-time and waiting-time problems analogous to the Negative Binomial under sampling without replacement.
The relationships are clean: the Hypergeometric converges to the Binomial as with , and the Negative Hypergeometric stands to the Hypergeometric as the Negative Binomial stands to the Binomial.
Capture-Recapture
A wildlife biologist tags fish in a lake, releases them, waits for mixing, and then draws fish, of which are tagged. The likelihood of the unknown population size is
Differentiating with respect to and finding the integer maximum gives the Lincoln-Petersen estimator fish.
The Lincoln-Petersen estimator assumes a closed population (no births, deaths, immigration, or emigration during the experiment), random mixing of tagged fish, and no tag loss. Violations are common in field work, and modified estimators (Schnabel for multiple recapture occasions, Jolly-Seber for open populations) extend the same Hypergeometric likelihood approach.
Exercises
Problem
A deck of 52 cards contains 4 aces. Draw 5 cards without replacement. Find the probability of getting exactly 2 aces and the probability of getting at least 1 ace.
Problem
A factory ships boxes of light bulbs. The quality-control protocol draws bulbs without replacement and rejects the box if any are defective. If the box contains defectives, what is the probability the box is accepted?
Problem
A lottery draws 6 numbers without replacement from 49. A ticket selects 6 numbers. Find the probability of matching exactly 4 of the 6 drawn numbers.
Problem
Show that for fixed , the variance ratio equals , and interpret the two extremes and .
Problem
A contingency table records the outcomes of 14 patients on two treatments. Treatment A: 6 of 8 successes. Treatment B: 1 of 6 successes. Compute Fisher's exact one-sided -value for the null that treatments are equally effective, conditioning on the observed margins.
Sampling-Distribution Connections
The Hypergeometric is the without-replacement analogue of the Binomial and sits inside a small lattice of related distributions:
- The Binomial is the with-replacement / infinite-population limit.
- The Multivariate Hypergeometric generalizes to populations with more than two categories: items in categories , sample , count the categories.
- The Negative Hypergeometric changes the stopping rule from "fixed " to "until failures occur".
- The Poisson is the rare-event limit of the Binomial and, transitively, a far-field limit of the Hypergeometric when both and grow large with and .
References
- Casella, G., and Berger, R. L. (2002). Statistical Inference, 2nd ed., Duxbury. Chapter 3.2 covers discrete distributions including the Hypergeometric, with the Binomial limit worked through.
- Blitzstein, J. K., and Hwang, J. (2019). Introduction to Probability, 2nd ed., Chapman and Hall / CRC. Chapter 3 has a chess-board treatment of the Hypergeometric and a clean derivation of the Lincoln-Petersen estimator.
- Lehmann, E. L., and Romano, J. P. (2005). Testing Statistical Hypotheses, 3rd ed., Springer. Section 4.6 covers Fisher's exact test and the role of the Hypergeometric null distribution in conditional inference.
Last reviewed: May 12, 2026
Canonical graph
Required before and derived from this topic
These links come from prerequisite edges in the curriculum graph. Editorial suggestions are shown here only when the target page also cites this page as a prerequisite.
Required prerequisites
2- Common Probability Distributionslayer 0A · tier 1
- Distributions Atlaslayer 0A · tier 1
Derived topics
0No published topic currently declares this as a prerequisite.