Hypergeometric Probability Calculator
Find exact probabilities when sampling without replacement.
Constraints: 0 ≤ K ≤ N, 0 ≤ n ≤ N, and valid k values lie in the support range of the distribution.
What this hypergeometric calculator does
This tool calculates probabilities for the hypergeometric distribution, which is used when you draw items from a finite population without replacement. That “without replacement” detail is key: each draw changes the composition of what remains.
You get:
- P(X = k): probability of exactly k successes
- P(X ≤ k): cumulative probability of at most k successes
- P(X ≥ k): cumulative probability of at least k successes
- Support range, expected value, and variance
When to use a hypergeometric model
Use this model when all of the following are true:
- You have a finite population of size N.
- Exactly K items in that population are classified as “successes.”
- You draw n items.
- Sampling is done without replacement.
Common real-world applications
- Card games: chance of drawing a specific number of aces or face cards.
- Quality control: defects found in a sample from a production lot.
- Auditing: number of problematic records in a reviewed subset.
- Biology: enrichment or overlap tests in finite sets.
The formula
The probability of exactly k successes is:
where C(a, b) is “a choose b,” the number of combinations of b items selected from a.
How to interpret the inputs
- N (population size): total number of items
- K (success states): total number of “success” items in population
- n (draws): sample size
- k (observed successes): target number of successes in your sample
Worked example
Quality-control batch test
Suppose a lot contains 100 parts, and 8 are defective. If you inspect 12 parts at random without replacement, what is the chance of finding exactly 2 defective parts?
- N = 100
- K = 8
- n = 12
- k = 2
Enter those values into the calculator to get exact and cumulative probabilities. This helps compare acceptance thresholds (for example, reject lot if defects ≥ 2).
Hypergeometric vs. binomial
The binomial model assumes independent trials with constant success probability. That is approximately true for large populations with very small sampling fractions. Hypergeometric is exact when sampling without replacement from a finite population.
Practical tips
- Always verify your sampling setup (with vs. without replacement).
- Check your support bounds before interpreting “impossible” outcomes.
- Use cumulative probabilities for decision rules and thresholds.