Calculadora de Distribuição Hipergeométrica

P(X = k) = C(K,k)·C(N−K,n−k) / C(N,n).
Created by
Renato Passos, Eng. de Software
Reviewed by
Renato Passos, Eng. de Software

Last updated: Apr 18, 2026

P(X=k)
0,321725

Formula

P(X=k) = C(K,k)·C(N−K,n−k)/C(N,n)

About this calculator

The Hypergeometric Distribution Calculator computes the probability of obtaining exactly k successes in a sample of size n, drawn without replacement from a finite population of size N containing K successes. The formula is P(X = k) = C(K, k) * C(N - K, n - k) / C(N, n), where C(a, b) denotes combination. This distribution is crucial for situations where the probability of success changes with each draw, unlike the binomial distribution which assumes replacement.

How it works: the calculator takes parameters N (population size), K (number of successes in population), n (sample size), and k (desired number of successes in the sample). It then computes the required combinations and returns the exact probability. For example, in a batch of 100 items with 10 defective, the probability of finding exactly 2 defective in a sample of 20 is calculated with N=100, K=10, n=20, k=2.

When to use: quality control of finite lots (without replacement), card games (probability of certain hands), sampling in small populations, inventory auditing, and any scenario where sampling is done without replacement. Unlike the binomial, the hypergeometric is more accurate when the sample is a significant fraction of the population.

Cautions: ensure that k, n, K, and N are non-negative integers and that k ≤ n, k ≤ K, n - k ≤ N - K. The calculator does not automatically validate these limits. Also, for very large populations relative to the sample, the hypergeometric distribution approximates the binomial, but here you get the exact value.

Frequently asked questions

What is the difference between hypergeometric and binomial distributions?

Hypergeometric is used when sampling without replacement, while binomial assumes replacement or infinite population. In hypergeometric, the probability of success changes with each draw.

Can I use this calculator for probability of more than k successes?

Not directly. It calculates P(X = k). For P(X ≥ k) or P(X ≤ k), you need to sum probabilities for each desired k value.

What if k is greater than K or n?

The probability will be zero, as it's impossible to have more successes than exist in the population or sample. The calculator may return an error if limits are not respected.

How do I interpret the result?

The result is the exact probability of obtaining exactly k successes in the sample. For example, 0.15 means 15% chance. You can use it to make decisions about batches or games.

Does the calculator work for large numbers?

Yes, but very large numbers may cause overflow. For populations above 1000, consider using binomial approximation if the sample is small.

Other Distribuicoes e Graficos calculators