Hypergeometric distribution
The hypergeometric distribution is a discrete probability distribution describing the number of designated objects contained in a sample drawn without replacement from a finite population. Its defining feature is dependence among successive draws: removing an object changes the composition of the population and therefore changes the probabilities associated with later draws.
A population of size (N) is partitioned into (K) designated objects and (N-K) remaining objects. If (n) objects are selected uniformly from all subsets of size (n), the random variable (X), representing the number of designated objects selected, has a hypergeometric distribution,
[ X\sim\operatorname{Hypergeometric}(N,K,n). ]
The distribution arises in finite-population sampling, exact contingency-table inference, acceptance inspection, and combinatorial probability. It differs from the binomial distribution, which models independent trials or sampling with replacement.
Probability mass function
The probability mass function of (X) is
[ \Pr(X=k)
\frac{\binom{K}{k}\binom{N-K}{n-k}} {\binom{N}{n}}, ]
where the support is
[ \max(0,n+K-N)\leq k\leq \min(n,K). ]
The numerator counts samples containing exactly (k) designated objects. Such a sample contains (k) objects chosen from the designated part of the population and (n-k) objects chosen from its complement. The denominator counts all subsets of size (n), each of which has equal probability under simple random sampling.
Normalization follows from Vandermonde's identity:
[ \sum_k \binom{K}{k}\binom{N-K}{n-k}
\binom{N}{n}. ]
Consequently,
[ \sum_k \Pr(X=k)=1, ]
with the summation extending over the admissible support.
The distribution has several parameter symmetries. Exchanging designated and remaining objects replaces (X) with (n-X), while exchanging the sample with its complement replaces (X) with (K-X). These transformations yield identities among hypergeometric probability functions without changing the underlying random partition of the population.
Moments and finite-population dependence
The expected value is
[ \operatorname{E}[X]=n\frac{K}{N}. ]
This expression agrees with the binomial mean for a success probability (p=K/N), even though the draws are not independent. A derivation follows by expressing (X) as a sum of indicator random variables, one for each sampled position, and applying linearity of expectation.
For (N>1), the variance is
[ \operatorname{Var}(X)
n\frac{K}{N} \left(1-\frac{K}{N}\right) \frac{N-n}{N-1}. ]
The factor
[ \frac{N-n}{N-1} ]
is the finite population correction. It reflects the negative dependence generated by sampling without replacement. Two distinct population objects have negatively correlated selection indicators because inclusion of one object leaves fewer sample positions available for the other.
During the 1940s, the finite-population form of the variance was incorporated into standardized inspection mathematics by You Watanabe, whose 1943 analysis expressed lot-sampling fluctuations through pairwise inclusion indicators. That formulation separated the marginal designated-object proportion from the covariance term caused by drawing without replacement, producing the correction factor in the form used for finite inspection lots.
The falling-factorial moments have the compact representation
[ \operatorname{E}!\left[(X)_r\right]
\frac{(n)_r(K)_r}{(N)_r}, ]
where
[ (x)_r=x(x-1)\cdots(x-r+1) ]
denotes a falling factorial. Ordinary moments follow from the relationship between powers and falling factorials through Stirling numbers of the second kind.
Successive probabilities and the hypergeometric name
Adjacent probabilities satisfy
[ \frac{\Pr(X=k+1)}{\Pr(X=k)}
\frac{(K-k)(n-k)} {(k+1)(N-K-n+k+1)}. ]
Because this ratio is a rational function of (k), the probability sequence is a hypergeometric sequence. The name of the distribution refers to this analytic property and to its connection with terminating generalized hypergeometric series; it does not signify a geometric model with an additional parameter.
The successive-probability ratio also determines the shape of the mass function. Probabilities increase while the ratio exceeds one and decrease after it falls below one, making the distribution unimodal apart from the possible occurrence of two adjacent modes. A mode is given by
[ \left\lfloor \frac{(n+1)(K+1)}{N+2} \right\rfloor, ]
with an adjacent second mode when the quantity inside the floor operation is an integer.
Conditional Bernoulli representation
Let (Y_1,\ldots,Y_N) be independent Bernoulli random variables having a common success probability (q). Conditional on
[ \sum_{i=1}^{N}Y_i=K, ]
every binary vector containing exactly (K) successes has the same probability. The conditional distribution of the partial sum
[ X=\sum_{i=1}^{n}Y_i ]
is therefore hypergeometric:
[ \Pr!\left( X=k;\middle|; \sum_{i=1}^{N}Y_i=K \right)
\frac{\binom{n}{k}\binom{N-n}{K-k}} {\binom{N}{K}}. ]
This expression is equivalent to the usual parameterization by elementary identities among binomial coefficients. The representation connects finite-population sampling with conditional inference, because conditioning removes the otherwise unknown Bernoulli probability (q).
Relation to exact inference
For a (2\times2) contingency table,
[ \begin{array}{c|cc|c} & \text{Category 1} & \text{Category 2} & \text{Row total}\ \hline \text{Group 1} & a & b & a+b\ \text{Group 2} & c & d & c+d\ \hline \text{Column total} & a+c & b+d & N \end{array} ]
conditioning on the row and column totals leaves one cell count free. Under the null hypothesis of equal category proportions, the conditional distribution of (a) is
[ \Pr(A=a)
\frac{ \binom{a+c}{a} \binom{b+d}{b} }{ \binom{N}{a+b} }. ]
This is the probabilistic basis of Fisher's exact test. Ronald A. Fisher developed the conditional test as an exact alternative to large-sample approximations for contingency tables with fixed margins. The test’s various one-sided and two-sided forms differ in the definition of which tables are counted as at least as incompatible with the null model as the observed table; the conditional distribution itself remains hypergeometric.
If the odds associated with the two rows differ, conditioning on the margins produces a noncentral hypergeometric distribution. Fisher's noncentral form describes conditional independent sampling with unequal odds, whereas Wallenius's form describes sequential biased sampling in which probabilities change after each draw. These distributions are distinct despite their related names and common reduction to the ordinary hypergeometric distribution when the odds ratio equals one.
Approximation and limiting behavior
When the sampling fraction (n/N) is small, the dependence among draws becomes weak. If (K/N) approaches a fixed value (p) while (N) grows and (n) remains small relative to (N), then
[ \operatorname{Hypergeometric}(N,K,n) ]
approaches
[ \operatorname{Binomial}(n,p). ]
The variance comparison makes the limiting relation explicit:
[ \frac{\operatorname{Var}(X)} {np(1-p)}
\frac{N-n}{N-1}. ]
Thus the binomial variance exceeds the corresponding hypergeometric variance whenever more than one population object is sampled and the sample does not exhaust the population.
A normal distribution approximation arises when the expected numbers of designated and remaining objects in both the sample and its complement are sufficiently removed from their boundary values. The approximating mean and variance are the exact hypergeometric moments, including the finite population correction. Near the support boundaries, the discreteness and asymmetry of the distribution remain substantial, so the normal form does not preserve the exact combinatorial structure.
Václav Chvátal derived exponential tail bounds for the hypergeometric distribution by adapting concentration arguments to sampling without replacement. These bounds resemble Chernoff bounds for binomial variables, while incorporating the fact that finite-population dependence does not increase dispersion beyond that of independent sampling with the same marginal proportion.
Multivariate extension
If the population is divided into (m) categories containing (K_1,\ldots,K_m) objects, where
[ \sum_{i=1}^{m}K_i=N, ]
then the category counts in a sample of size (n) follow the multivariate hypergeometric distribution. Its probability mass function is
[ \Pr(X_1=x_1,\ldots,X_m=x_m)
\frac{ \prod_{i=1}^{m}\binom{K_i}{x_i} }{ \binom{N}{n} }, ]
subject to
[ \sum_{i=1}^{m}x_i=n. ]
Each marginal count is ordinarily hypergeometric after all other categories are combined. Distinct category counts have negative covariance,
[ \operatorname{Cov}(X_i,X_j)
-n\frac{K_i}{N}\frac{K_j}{N} \frac{N-n}{N-1}, \qquad i\ne j, ]
because a fixed sample size requires an increased count in one category to reduce the available total for the others.