1001Ferramentas
🃏Calculators

Hipergeométrica P(X=k)

P(X=k) = C(K,k)·C(N−K,n−k) / C(N,n) — amostragem sem reposição.

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