Home · Statistics · Distributions & Sampling · Hypergeometric Distribution Calculator

Hypergeometric Distribution Calculator

The probability of exactly k successes in a sample of n drawn without replacement from a population of N containing K successes, reported as a percentage.

Your figures

Example result — edit the figures to make it yours

27.03

Expected successes nK/N2.4

P(X = 0) = 4.602%P(X = 1) = 19.0429%P(X = 2) = 31.4208%P(X = 3) = 27.0286%P(X = 4) = 13.3032%P(X = 5) = 3.87%P(X = 6) = 0.664%P(X = 7) = 0.065%P(X = 8) = 0.00339%P(X = 9) = 0.0000814%P(X = 10) = 6.43e-7% 010 P(X = 3) = 27.03%
The distribution for your figures, drawn from the same parameters as the calculation. The amber region is the probability the result reports — the area under the curve (or the highlighted bar) equals that percentage.

What this calculator does

The probability of exactly k successes in a sample of n drawn without replacement from a population of N containing K successes, reported as a percentage. Every figure on this page is computed from the standard definition stated below — the same definition used in textbooks and reference tables — with no hidden rounding steps, and the method notes name the exact convention where more than one exists.

The formula and method

P(X = k) = C(K, k) · C(N − K, n − k) / C(N, n)

The main result is the exact-count probability P(X = k), expressed as a percentage.

Sampling is without replacement, which is what distinguishes this from the binomial distribution.

k must be achievable: max(0, n − (N − K)) ≤ k ≤ min(n, K).

Worked example

With the example inputs this page opens with (population size n 50, successes in population k 12, sample size n 10, successes in sample k 3), the result is 27.03. Change any figure and the result updates with the same formula.

Quick reference

Quick reference — varying population size n
Population size NResult
2511.55
4030.73
5027.03
7514.68
1008.07
5126.48

Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.

Common questions

When should I use this instead of the binomial distribution?

When you sample without replacement from a finite population and the sample is a noticeable share of it. Drawing 10 items from 50 changes the odds as you go; drawing 10 from a million barely does, and the binomial is then a fine approximation.

What is the expected number of successes in the sample?

n·K/N — the sample size times the population success share. For the defaults that is 10 × 12/50 = 2.4 successes.

How does the Hypergeometric Distribution Calculator work?

The probability of exactly k successes in a sample of n drawn without replacement from a population of N containing K successes, reported as a percentage. Population N · Successes in population K · Sample size n · Successes in sample k → P(X = k) (%). The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.

What inputs does the Hypergeometric Distribution Calculator need?

Population N · Successes in population K · Sample size n · Successes in sample k → P(X = k) (%). Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.