probability calculators

Hypergeometric Distribution Calculator

Calculates exact probabilities when drawing items from a finite population without replacement. Use it in quality control, card games, or any scenario where sampling changes remaining proportions.

About this calculator

The hypergeometric distribution models the number of successes k in a sample of size n drawn without replacement from a population of N items containing K successes. Unlike the binomial distribution, each draw changes the composition of the remaining pool. The probability mass function (PMF) is: P(X = k) = [C(K, k) × C(N−K, n−k)] / C(N, n), where C(a, b) denotes the binomial coefficient (combinations). The cumulative distribution function (CDF) sums the PMF from 0 up to the observed k, giving P(X ≤ k). This distribution arises naturally in acceptance sampling, ecological capture-recapture studies, and analysing card-draw probabilities in games. Mean = n × K/N; variance = n × (K/N) × (1−K/N) × (N−n)/(N−1).

How to use

Suppose a box contains N = 20 items, K = 6 of which are defective. You draw n = 5 items without replacement and want the probability of seeing exactly k = 2 defectives. Step 1 — enter N = 20, K = 6, n = 5, k = 2 and select PMF. Step 2 — compute: C(6,2) = 15, C(14,3) = 364, C(20,5) = 15504. Step 3 — P(X = 2) = (15 × 364) / 15504 = 5460 / 15504 ≈ 0.352, so there is roughly a 35.2% chance of drawing exactly 2 defective items.

Frequently asked questions

What is the difference between the hypergeometric and binomial distribution?

The binomial distribution assumes sampling with replacement, so the probability of success stays constant on every draw. The hypergeometric distribution models sampling without replacement, meaning each draw alters the composition of the remaining population. When the population is very large relative to the sample, the two distributions give nearly identical results. For small finite populations the hypergeometric is the correct choice and produces noticeably different probabilities.

When should I use the cumulative hypergeometric probability instead of the PMF?

Use the PMF when you need the probability of obtaining exactly k successes. Use the CDF when you need the probability of obtaining at most k successes, which is common in quality-control decisions such as 'what is the chance of finding two or fewer defectives?' The CDF sums the PMF over all values from 0 to k. Many acceptance-sampling standards are expressed as CDF inequalities.

How do degrees of freedom affect the hypergeometric distribution?

The hypergeometric distribution does not use degrees of freedom — that concept belongs to chi-square and t-distributions. Instead, the shape of the hypergeometric distribution is fully determined by the three parameters N (population size), K (success states), and n (sample size). Increasing n while holding N and K fixed generally widens the distribution and shifts its mean upward in proportion to K/N.