$P(X = k) = \frac{\dbinom{K}{k}\dbinom{N-K}{n-k}}{\dbinom{N}{n}}, \quad k = \max(0,\, n+K-N), \ldots, \min(n, K)$
$\text{where } N = \text{population size},\; K = \text{successes in population},\; n = \text{sample size}$
The Hypergeometric Distribution models the number of successes $k$ when drawing $n$ items **without replacement** from a finite population of $N$ items containing exactly $K$ successes.
Unlike the binomial, trials are not independent because sampling without replacement alters the composition of the remaining population. Its mean is $E[X] = nK/N$ and variance is $\text{Var}(X) = n\frac{K}{N}\frac{N-K}{N}\frac{N-n}{N-1}$.
> [!example]- Defective Items in a Quality Sample {💡 Example}
> A batch of 20 policies contains 5 with errors. An auditor randomly selects 4 without replacement. What is the probability exactly 2 have errors?
>
> > [!answer]- Answer
> > Here $N = 20$, $K = 5$, $n = 4$, $k = 2$:
> > $P(X = 2) = \frac{\binom{5}{2}\binom{15}{2}}{\binom{20}{4}} = \frac{10 \times 105}{4845} = \frac{1050}{4845} \approx 0.2167$