numvana

Hypergeometric Distribution Calculator

Find the probability of drawing exactly, at least, or at most a given number of successes from a finite population, sampling without replacement.

P(exactly 2)
27.428%
P(at least 2)
36.7047%
P(at most 2)
90.7233%
Expected number of successes
1.25
Standard deviation
0.9295

How it works

The hypergeometric distribution models drawing a fixed-size sample of n items, without replacement, from a finite population of N items that contains exactly K "successes" — the classic example is dealing a 5-card hand from a 52-card deck and asking how many of the 13 hearts it contains. The exact probability of getting precisely k successes is the combinatorial ratio P(X = k) = C(K, k) × C(N − K, n − k) ÷ C(N, n): choose k successes from the K available, choose the rest of the sample from the N − K non-successes, divided by the number of ways to draw any sample of size n from the whole population.

This is distinct from the site's binomial-probability calculator, whose success probability p stays fixed on every trial because items are effectively replaced (or the population is treated as infinite). Here, every item drawn changes what's left to draw from, so the chance of success shifts as the sample is taken — which is exactly why card hands, lottery draws, and quality-control sampling from a finite lot all need the hypergeometric model rather than the binomial one. The mean number of successes is n × K ÷ N, and the variance, n × (K/N) × ((N − K)/N) × ((N − n)/(N − 1)), includes that extra (N − n)/(N − 1) "finite population correction" factor the binomial distribution doesn't need.

FAQ

How is this different from the Binomial Probability calculator?

Binomial probability assumes each trial has the same fixed success probability p, which is only true if you're sampling with replacement (or from an effectively infinite population). Hypergeometric probability is for sampling without replacement from a finite, countable population — every draw changes the composition of what's left, so the probability isn't fixed trial to trial. As the population size N grows very large relative to the sample size n, the hypergeometric distribution converges to the binomial with p = K/N, since removing items from a huge population barely changes the remaining proportion.

Why does asking for an impossible number of successes return 0% instead of an error?

If the population only contains K successes, or the sample only draws n items, it's mathematically impossible to see more successes than min(n, K) — but that's a perfectly valid question with a real answer (0%), not an invalid input. This calculator returns 0% for exact/at-least probabilities and 100% for "at most" in that case, the same way it would for any other value outside the distribution's support.

Related calculators