Hypergeometric Distribution
- P(X = k)
- 385/969≈ 0.397317
- P(X ≤ k)
- 682/969≈ 0.703818
- P(X ≥ k)
- 224/323≈ 0.693498
Each bar is the exact probability of that outcome; the darker bars form the selected event. Toggle between PMF (P(X = k)) and CDF (P(X ≤ k)).
Step-by-step solution
- 1
Formula
For X ~ Hypergeometric(N, K, n), P(X = k) counts the samples with exactly k successes and divides by all possible samples: P(X = k) = C(K, k) · C(N−K, n−k) / C(N, n).
- 2
Plug in the values
N = 20, K = 8, n = 5, k = 2. The support is 0 ≤ k ≤ 5.
- 3
Choose the successes
C(8, 2) = 28.
- 4
Choose the failures
C(12, 3) = 220.
- 5
All possible samples
C(20, 5) = 15504.
- 6
Combine
P(X = 2) = (28 · 220) / 15504 = 385/969.
- 7
Result
P(X = 2) = 385/969
About the hypergeometric distribution
The hypergeometric distribution models sampling without replacement: draw n items from a population of N that contains K successes, and X counts the successes drawn. Because drawn items are not returned, every draw changes the odds of the next one — unlike the binomial distribution, where the success probability p is fixed.
The support is max(0, n + K − N) ≤ k ≤ min(n, K): you cannot draw more successes than exist, and once the sample is large enough at least n − (N − K) successes are forced. The mean is n · K/N, and the variance is the binomial variance multiplied by the finite-population correction (N − n)/(N − 1), which shrinks toward 0 as the sample covers the whole population.
Typical uses: lottery odds (6 out of 49), quality control (defectives in a sample) and card games. As a rule of thumb, when the sample is small compared to the population (n ≤ N/10), the hypergeometric distribution is close to the binomial Bin(n, K/N).