Hypergeometric Probability Calculator
Calculate the exact probability of drawing exactly k successes from a finite population without replacement. Ideal for quality control sampling, card game odds, and any scenario where items are not returned to the pool after selection.
About this calculator
The hypergeometric distribution models the number of successes in a sample drawn without replacement from a finite population. Unlike the binomial distribution, each draw changes the composition of the remaining pool, so trials are not independent. The probability mass function is P(X = k) = C(K, k) × C(N−K, n−k) / C(N, n), where N is the total population size, K is the number of success states in the population, n is the sample size drawn, and k is the number of observed successes desired. C(a, b) denotes the binomial coefficient 'a choose b'. This formula counts the number of ways to choose exactly k successes from K available, multiplied by the ways to fill the remaining n−k draws from non-successes, divided by all possible samples of size n from N items.
How to use
Suppose a deck has N = 52 cards, K = 13 hearts. You draw n = 5 cards and want exactly k = 2 hearts. Calculate each combination: C(13, 2) = 78, C(39, 3) = 9139, C(52, 5) = 2598960. Apply the formula: P(X = 2) = (78 × 9139) / 2598960 = 712842 / 2598960 ≈ 0.2743. There is approximately a 27.4% chance of drawing exactly 2 hearts in a 5-card hand — a result impossible to get correctly with a binomial model because the draws are not independent.
Frequently asked questions
What is the difference between the hypergeometric distribution and the binomial distribution?
The key difference is whether sampling is done with or without replacement. The binomial distribution assumes each trial is independent with a constant success probability p, which corresponds to sampling with replacement. The hypergeometric distribution applies when items are not replaced, so the probability of success changes with each draw. For large populations relative to the sample size, the two distributions give nearly identical results, but for small populations the hypergeometric is more accurate and should always be preferred.
When is the hypergeometric probability distribution used in real life?
The hypergeometric distribution appears in quality control, where inspectors sample items from a batch to detect defects without retesting the same item. It is used in card games, lottery analysis, and clinical trials where patients are selected from a fixed pool. In genetics, it models the probability that a specific number of offspring inherit a trait from a finite gene pool. Any time you sample from a known, finite group without putting items back, this distribution is the correct model.
How do I interpret the observed successes input in the hypergeometric calculator?
The observed successes input (k) is the specific number of success items you want to appear in your sample. It is the target count you are calculating the probability for, not the number you actually observed in a past experiment (unless you are doing a retrospective analysis). For example, if you want to know the probability that exactly 3 of your 10 sampled products are defective, k = 3. You can run the calculator for multiple values of k to build a full probability distribution over all possible outcomes.