Hypergeometric Calculator Formula
Understand the math behind the hypergeometric calculator. Each variable explained with a worked example.
Formulas Used
P(X = k)
probability = (c_K_k * c_NK_nk) / c_N_nExpected Value
expected = n * K / NVariance
variance_val = n * (K / N) * ((N - K) / N) * ((N - n) / (N - 1))Variables
| Variable | Description | Default |
|---|---|---|
N | Population Size (N) | 50 |
K | Success States in Population (K) | 10 |
n | Number of Draws (n) | 5 |
k | Observed Successes (k) | 2 |
c_K_k | Derived value= factorial(K) / (factorial(k) * factorial(K - k)) | calculated |
c_NK_nk | Derived value= factorial(N - K) / (factorial(n - k) * factorial(N - K - n + k)) | calculated |
c_N_n | Derived value= factorial(N) / (factorial(n) * factorial(N - n)) | calculated |
How It Works
How to Calculate Hypergeometric Probability
Formula
P(X = k) = C(K,k) * C(N-K, n-k) / C(N, n)
The hypergeometric distribution models sampling without replacement from a finite population of N items containing K successes. It answers: if you draw n items, what is the probability of getting exactly k successes? Unlike the binomial, the probability changes with each draw.
Worked Example
A deck has 50 cards, 10 are red. Draw 5 cards without replacement. What is the probability of exactly 2 red cards?
N = 50K = 10n = 5k = 2
- 01C(10,2) = 45
- 02C(40,3) = 9880
- 03C(50,5) = 2118760
- 04P(X=2) = (45 * 9880) / 2118760
- 05= 444600 / 2118760 ≈ 0.20985
Ready to run the numbers?
Open Hypergeometric Calculator