---
tag: 0SPBPW3K61
kind: definition
name: Hypergeometric distribution
msc: ["60E05"]
defines: 0X3Y0ZSKNF
uses: [0WF4EJP91W, 092GEF38YD, 0AKNPYQ04R]
sources:
  - url: https://en.wikipedia.org/wiki/Hypergeometric_distribution
    locator: Probability mass function
---

## Definition

Let $N$, $K$ and $n$ be integers with $N \ge 1$, $0 \le K \le N$ and $0 \le n \le N$.
The hypergeometric distribution with parameters $N$, $K$ and $n$ has the [[probability mass function|0WF4EJP91W]]
$$p(k) = \frac{\binom{K}{k} \binom{N - K}{n - k}}{\binom{N}{n}} \quad \text{for } \max(0, n + K - N) \le k \le \min(n, K).$$

## Remarks

A population has $N$ objects, and $K$ of them are successes. Draw $n$ objects without replacement, each subset of size $n$ equally likely. Then the number of successes in the sample has this distribution.
The mean is $nK/N$. The variance is $n \frac{K}{N} \frac{N - K}{N} \frac{N - n}{N - 1}$ for $N \ge 2$.
When $N$ is large compared with $n$, the distribution is close to the [[binomial distribution|0VRWZDWW6B]] with parameters $n$ and $K/N$.
The probability of exactly $2$ aces in a hand of $5$ cards is $\binom{4}{2} \binom{48}{3} / \binom{52}{5}$.

## Explanations

### L1 human

An urn has red and blue balls. Draw a few balls without putting them back, and count the red ones.
The count has the hypergeometric distribution. Each draw changes the urn, so the draws are not independent.
