Compute exact probabilities for sampling without replacement. Switch between Parameter mode and Raw Data mode. In Raw Data mode, just provide the sample sequence (0/1) and population size N – the calculator automatically extracts n, k and estimates K.
The hypergeometric distribution models the number of successes in a sample of size n drawn without replacement from a finite population of size N that contains exactly K successes. Unlike the binomial distribution (which assumes independence and replacement), the hypergeometric accounts for the changing composition of the population after each draw, making it essential for real‑world sampling where items are not returned.
$$ P(X = k) = \frac{ \binom{K}{k} \binom{N-K}{n-k} }{ \binom{N}{n} } $$
where max(0, n-(N-K)) ≤ k ≤ min(n, K)
A factory produces 500 circuit boards, 30 of which are known to be faulty (N=500, K=30). A quality inspector randomly selects 20 boards without replacement. What is the probability that exactly 2 are defective? Using our calculator with N=500, K=30, n=20, k=2 yields P(X=2) ≈ 0.271. This helps decide whether to accept the batch. Unlike binomial approximation, hypergeometric correctly adjusts for the finite population (FPC). For N large relative to n, the difference from binomial is negligible, but for smaller batches, it is critical.
The hypergeometric PMF arises from combinatorial counting: favorable outcomes (choose k successes from K, and n−k failures from N−K) divided by total ways to choose n from N. The mean is μ = n·K/N, identical to the binomial expectation. However, the variance is adjusted: σ² = n·(K/N)·(1−K/N)·((N−n)/(N−1)), where the factor (N−n)/(N−1) is the finite population correction. If N is infinite (or sampling with replacement), the hypergeometric converges to the binomial.
| Scenario (N, K, n) | k | Exact P(X=k) | Expected value |
|---|---|---|---|
| (52,13,5) – 5 cards, hearts | 2 | 0.2743 | 1.25 |
| (100,10,10) – defects | 1 | 0.4076 | 1.00 |
| (200,50,20) – marketing sample | 5 | 0.1736 | 5.00 |
The hypergeometric distribution assumes that each sample of size n is equally likely, the population is finite and each draw is equally probable without replacement. It also assumes a dichotomous classification (success/failure). For large N, it's computationally stable; our calculator uses recurrence to compute probabilities for all k values with high numerical precision, avoiding overflow errors from raw binomial coefficients.