Hypergeometric Distribution Calculator

Model “successes without replacement” — for example, drawing red balls from an urn. Enter N, K, n, k and get the probability and distribution table.

1. Input parameters

Total items in the population

How many of the N are “success”

Drawn without replacement

Exact number you want the probability for

2. Results

P(X = k)

Cumulative

P(X ≤ k): —

P(X ≥ k): —

Mean

Variance

3. Distribution table

All valid k from 0 to n (subject to K and N). Handy for homework / QA.

k P(X = k) P(X ≤ k)

Hypergeometric distribution: formula

For a population of N items containing K successes, when you draw n items without replacement, the probability of observing exactly k successes is:

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

where C(a, b) is the number of combinations “a choose b”.

Mean and variance

E[X] = n · (K / N)
Var(X) = n · (K / N) · (N - K)/N · (N - n)/(N - 1)

Where it’s used

  • Quality control (defectives in a batch)
  • Card games (drawing particular suits)
  • Sampling without replacement in surveys

Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\\]
','\
Formula (extracted text)
P(X = k) = [C(K, k) · C(N − K, n − k)] / C(N, n)
Formula (extracted text)
E[X] = n · (K / N) Var(X) = n · (K / N) · (N - K)/N · (N - n)/(N - 1)
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
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.
Verified by Ugo Candido on 2026-01-19
Profile · LinkedIn
, ', svg: { fontCache: 'global' } }; ]], displayMath: [['\\[','\\]']] }, svg: { fontCache: 'global' } };, svg: { fontCache: 'global' } };