Hypergeometric Distribution P(X = k)
Probability of exactly k successes in a sample of n drawn without replacement from N items holding K successes: C(K,k)·C(N−K,n−k) / C(N,n).
P(X=k)
—
Hypergeometric P(X = k): sampling without replacement
The hypergeometric distribution counts how many successes you get when you sample without replacement from a finite population. Say there are N items in total, K of them successes, and you draw a sample of size n. Then P(X = k) = C(K, k) · C(N − K, n − k) / C(N, n). The catch that sets it apart from the binomial is that the draws aren't independent: pull one item and the odds shift for the next. Take a standard 52-card deck and draw 5 cards. The chance of landing exactly 2 aces works out to C(4, 2)·C(48, 3) / C(52, 5) ≈ 0.0399, roughly 4%. Push N toward infinity while holding K/N steady and the hypergeometric collapses into the binomial.
Applications
It shows up in quality control when you inspect a lot and count defective items in a sample of N parts. Card and lottery odds lean on it too, like the chance of a particular poker or bridge hand. Pollsters reach for it when the population is small and finite, and ecologists use it for capture-recapture estimates of animal populations.
FAQ
How is it different from the binomial? The binomial assumes each trial is independent and p never changes, which is what you get when you sample with replacement or from an infinite pool. The hypergeometric is built for finite populations, where p drifts with every draw.
When can I approximate with the binomial? When n is small next to N. The usual rule of thumb is n < 0.05·N. Once you're sampling a bigger fraction, the gap starts to matter and the hypergeometric gives you the more accurate answer.
What are the valid ranges for k? k has to fall within max(0, n − (N − K)) ≤ k ≤ min(n, K). Anything outside that window simply can't happen, so its probability is zero.
What are the mean and variance? The mean is n·K/N. Variance comes out to n·(K/N)·((N − K)/N)·((N − n)/(N − 1)), where that final term is the finite population correction. It's what pulls the variance below what the binomial would give you.
Related Tools
Fisher's Exact Test (2×2)
Computes Fisher's exact test for a 2×2 contingency table, the right choice when the counts are small and the chi-square approximation no longer holds. Instead of approximating, it computes the exact probability of observing the current table — and tables even more extreme — holding the margin totals fixed, via the hypergeometric distribution. The tool returns the one-sided and two-sided p-values (the latter by summing the probabilities of tables as likely or less likely than the observed one). Enter the four cells a, b, c and d.
Accessible Corridor Width Brazil
Checks corridor width against NBR 9050 accessibility standard.
Actual Air-Fuel Ratio
Calculate the actual air-fuel ratio, AFR_actual = AFR_stoichiometric × (1 + excess air ÷ 100), from the stoichiometric air-fuel ratio and the excess air (%). The result (kg air per kg fuel) is the amount of air actually supplied in practice, always greater than stoichiometric, because real combustion needs excess air to ensure complete burning (the mixture is never perfect). This value sizes the air supply (fans), the exhaust gas flow and influences the flame temperature and efficiency. Enter the stoichiometric air-fuel ratio and the excess air.
Brazilian Veterinarian Fee (CRMV)
Computes a referential Brazilian veterinarian consultation fee per CRMV table.
Baby Puree Amount
Suggests puree volume and texture by baby age.
Harmonic Drive Reduction
Compute the reduction ratio of a harmonic drive (strain wave gear), R = Nf/(Nc − Nf), where Nf is the flexspline tooth count and Nc the circular spline's (usually Nc = Nf + 2). This ingenious mechanism reaches huge reductions (50:1 to 300:1) in a single compact stage with zero backlash — which is why it is the heart of industrial and collaborative robot joints. Enter the flexspline and circular spline tooth counts.
The results provided by this tool are for general informational and educational purposes only and do not constitute professional, financial, medical, legal, tax or accounting advice. Always confirm important decisions with a qualified professional and official sources.