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