Skip to main content

A discrete distribution used to model sampling without replacement.

The hypergeometric distribution is a discrete distribution. It is used to model sampling without replacement from a collection of objects regarded as being of two types - for example, drawing otherwise identical colored balls from an urn.

Specifically, in that situation, it is the probability of drawing $k$ red balls ("successes") in a sample of $n$ balls drawn without replacement from an urn containing $K$ red balls out of $N$ balls in total.

The probability mass function of the distribution is:

$$P(X=k) = \frac{ {K \choose k} {N-k \choose n-k} }{N \choose n}$$

It arises in a number of contexts in probability and statistics including the analysis of 2x2 contingency tables when the margins are conditioned on, as is the case with Fisher's exact test.

Reference: Wikipedia - Hypergeometric distribution