The hypergeometric probability distribution
The hypergeometric distribution models the number of successes X in a sample of size
n drawn without replacement from a finite population of size N.
Because items are not replaced, the trials are dependent and the success probability changes from draw to draw.
Parameters and meanings
N: total number of elements in the population
r: number of successes in the population
N − r: number of failures in the population
n: sample size (number of draws without replacement)
x: number of successes in the sample
n − x: number of failures in the sample
Probability formula
\[
P(X = x)=\frac{\binom{r}{x}\cdot \binom{N-r}{\,n-x\,}}{\binom{N}{n}}
\]
The numerator counts the number of samples that contain x successes and n − x failures.
The denominator counts the total number of possible samples of size n.
Feasible values of x
Not every integer is possible. The support is:
\[
\max\!\bigl(0,\;n-(N-r)\bigr)\le x \le \min(n,\;r)
\]
Cumulative probabilities
For statements like “at most” or “at least,” we add the probabilities of mutually exclusive outcomes:
P(X \le k)=\sum_{x}P(X=x) over the appropriate range.
Binomial comparison
If the population is very large and the sample is a small fraction of the population, the hypergeometric model
can be close to a binomial model with p \approx r/N. When sampling without replacement from a
finite population, the hypergeometric model is the correct default.