Hypergeometric Distribution Calculator

Enter N, K, n, and k to compute P(X = k), cumulative probabilities, mean, variance, and the distribution table.

Distribution parameters

How to use

Provide the population size N, number of successes K, draw size n, and target successes k, then click Calculate to evaluate the hypergeometric probability and related statistics.

Methodology

The calculator uses combinations to compute the probability mass function and sums to produce cumulative distributions, while mean and variance follow textbook expressions for sampling without replacement.

Full original guide (expanded)

Overview

The hypergeometric distribution models drawing k successes in n draws from a finite population of size N where K items are successes, without replacement.

Formula

P(X = k) = \dfrac{\binom{K}{k} \cdot \binom{N - K}{n - k}}{\binom{N}{n}}

Mean and variance

E[X] = n \cdot \dfrac{K}{N}, \quad \mathrm{Var}(X) = n \cdot \dfrac{K}{N} \cdot \dfrac{N - K}{N} \cdot \dfrac{N - n}{N - 1}

Glossary

  • N: Population size.
  • K: Successes in the population.
  • n: Sample size without replacement.
  • k: Observed successes.

FAQ

When should I use the hypergeometric over the binomial? When you sample without replacement from a finite population. The binomial assumes independent trials.

How do I interpret k? It is the exact number of successes you want to observe; the PMF gives P(X = k).

What happens if k > K or k > n? The probability is zero because you cannot observe more successes than exist or draws made.

Are CDFs inclusive? Yes, P(X ≤ k) sums probabilities up to k; P(X ≥ k) sums from k to the maximum possible.

What is the reference source? This implementation follows the documented formulas and examples from Virginia Tech Aerospace Engineering’s distribution page.

Formulas

PMF \(P(X = k) = \dfrac{\binom{K}{k} \cdot \binom{N - K}{n - k}}{\binom{N}{n}}\)

Mean \(E[X] = n \cdot \dfrac{K}{N}\)

Variance \(\mathrm{Var}(X) = n \cdot \dfrac{K}{N} \cdot \dfrac{N - K}{N} \cdot \dfrac{N - n}{N - 1}\)

Citations

NIST — https://www.nist.gov/pml/weights-and-measures

FTC — https://consumer.ftc.gov

Changelog
  • Version 0.1.0-draft — 2026-01-19: Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
\u2713 Verified by Ugo Candido
Last Updated: 2026-01-19
Version 0.1.0-draft