Model successes in a sample without replacement
A hypergeometric distribution calculator finds the probability of drawing successes from a finite population without replacement.
Enter population size, success count, sample size, and observed successes. The calculator returns exact probability, cumulative probability, mean, and variance for quality control, card draws, surveys, and sampling problems.
Use the hypergeometric distribution instead of the binomial distribution when sampling is without replacement and the population is not effectively infinite.
Exact probability
--
P(X = k)
--
--
P(X <= k)
--
--
P(X >= k)
--
--
Mean and spread
--
--
Variance
--
Standard deviation
--
Feasible X range
--
Population success rate
--
Range probability and mode
--
P(a <= X <= b)
--
Outside range
--
Most likely X
--
Hypergeometric probability breakdown
Shows exact probability, cumulative tails, interval probability, expected value, variance, mode, and feasible range.
| Item | Estimate | Formula | Meaning |
|---|---|---|---|
| Run the calculator to see the probability breakdown. | |||
Probability mass table
Shows nearby X values and their exact probabilities.
| X successes | P(X = x) | Percent |
|---|---|---|
| Run the calculator to see the probability mass table. | ||
Interpretation note: Hypergeometric probabilities assume a fixed population, a fixed number of successes, a fixed sample size, and random sampling without replacement.
How to use the hypergeometric distribution calculator
- Enter population size: This is the total number of items, often written as N.
- Enter success states: This is how many items in the population count as a success, often written as K.
- Enter sample size: This is how many items are drawn without replacement, often written as n.
- Enter observed successes: This is the value of k, the number of successes in the sample.
- Add a range if needed: Use range minimum and maximum to calculate P(a <= X <= b), such as the chance of 1 to 3 defective parts.
- Read exact, tail, and interval probabilities: Use P(X = k) for the exact count, P(X <= k) for at most k successes, P(X >= k) for at least k successes, and P(a <= X <= b) for a bounded range.
- Check feasibility and the PMF table: The calculator shows the possible range for X and a nearby probability mass table because some success counts are impossible for a given population and sample.
Hypergeometric distribution formula
The hypergeometric probability formula counts the number of ways to choose k successes and n - k failures, then divides by the number of ways to choose the full sample.
P(X = k) = C(K, k) x C(N - K, n - k) / C(N, n)
P(a <= X <= b) = sum P(X = x), from x = a to b
Mean = n x K / N
Variance = n x K/N x (1 - K/N) x (N - n) / (N - 1)
Example: in a 52-card deck, there are 13 hearts. If you draw 5 cards without replacement, the probability of exactly 2 hearts is calculated with N = 52, K = 13, n = 5, and k = 2.
Formula reference: Wolfram MathWorld - Hypergeometric Distribution.
When to use hypergeometric instead of binomial
Hypergeometric and binomial distributions both model counts of successes, but they fit different sampling assumptions. The key question is whether the probability of success changes after each draw.
| Situation | Use this model | Reason |
|---|---|---|
| Drawing cards from a deck | Hypergeometric | Cards are not replaced, so the population changes. |
| Inspecting items from a shipment | Hypergeometric | The sample is drawn from a finite lot without replacement. |
| Independent coin flips | Binomial | The probability stays the same on every trial. |
| Very small sample from huge population | Often binomial approximation | Removing a few items barely changes the success probability. |
Model comparison reference: MathWorks - Hypergeometric Distribution.
Common hypergeometric examples
Cards and games
Find the chance of drawing a certain number of suits, rare cards, or matching pieces from a finite deck or bag.
Quality control
Estimate the probability of finding defective items when inspecting a fixed-size sample from a production lot.
Biology and surveys
Model counts from finite groups, such as tagged animals, selected genes, or sampled records without replacement.
Interesting Fact
In a standard 52-card deck, the probability of drawing exactly 2 hearts in a 5-card hand is about 27.43%. That uses N = 52 cards, K = 13 hearts, n = 5 cards drawn, and k = 2 hearts. This is a classic hypergeometric example because the cards are drawn without replacement. Source for the formula: Wolfram MathWorld - Hypergeometric Distribution.
Which probability result should you use?
The most common mistake is using the exact probability when the real question is a tail probability. Choose the result that matches the wording of the problem.
| Question wording | Use result | Example |
|---|---|---|
| Exactly k successes | P(X = k) | Exactly 2 hearts in a 5-card hand. |
| At most k successes | P(X <= k) | At most 1 defective item in an inspection sample. |
| Fewer than k successes | P(X < k) | Fewer than 3 selected records matching a condition. |
| Between a and b successes | P(a <= X <= b) | Between 1 and 3 defective items in a sample. |
| At least k successes | P(X >= k) | At least 4 winning tickets in a draw. |
| More than k successes | P(X > k) | More than 5 tagged animals in a sample. |
Finite sampling reference: Statistics LibreTexts - Finite Sampling Models.
How to map a word problem to N, K, n, and k
Hypergeometric problems become much easier once the four inputs are named correctly. Use this checklist before entering values.
N
The whole population or lot. Example: all 52 cards, all 500 shipped parts, or all sampled records.
K
The successes inside the population. Example: hearts, defective parts, tagged animals, or records with a feature.
n
The sample size drawn without replacement. Example: cards drawn, items inspected, or records selected.
k
The number of successes you want in the sample. Example: 2 hearts, 0 defects, or at least 3 tagged animals.
Common input and interpretation mistakes
The arithmetic may be exact, but the result is only useful if the inputs match the sampling design. Check these issues when a probability seems surprising.
| Mistake | Why it matters | Better check |
|---|---|---|
| Using replacement assumptions | If items are replaced, the probability may stay constant and binomial may be more appropriate. | Ask whether each selected item goes back before the next draw. |
| Confusing K and k | K is the number of successes in the population; k is the number in the sample. | Label the population before labeling the sample outcome. |
| Entering impossible k | Some counts cannot occur because there are too few successes or failures available. | Check the feasible range shown in the result. |
| Treating the result as causal | The distribution gives probability under a sampling model; it does not prove why a sample happened. | Separate probability calculation from study design or root-cause analysis. |
Frequently Asked Questions
What is a hypergeometric distribution?
A hypergeometric distribution gives the probability of getting a certain number of successes in a sample drawn without replacement from a finite population. It has four main inputs: population size, success states in the population, sample size, and observed successes.
What does sampling without replacement mean?
Sampling without replacement means that once an item is selected, it is not returned to the population before the next draw. This changes the probability on later draws, which is why the hypergeometric distribution is different from the binomial distribution.
What is the difference between P(X = k), P(X <= k), and P(X >= k)?
P(X = k) is the exact probability of exactly k successes. P(X <= k) is the cumulative probability of k or fewer successes. P(X >= k) is the upper-tail probability of k or more successes.
Why can some k values be impossible?
A k value is impossible when the sample cannot contain that many successes. For example, if only 3 success items exist in the population, drawing 4 successes is impossible. A lower limit can also occur when the sample is large enough that some successes must be included.
When can I use a binomial approximation?
A binomial approximation is often reasonable when the sample is small compared with the population, so removing sampled items barely changes the success probability. When the sample is a meaningful fraction of the population, the hypergeometric distribution is usually the better model.
Can this calculator find a probability between two success counts?
Yes. Use the range minimum and range maximum fields to calculate P(a <= X <= b). That is useful when a question asks for a band of outcomes, such as 1 to 3 successes, instead of exactly one count or a one-sided tail.
Why does the probability mass table matter?
The probability mass table shows how probability is distributed across nearby possible X values. It helps you see whether the observed count is near the most likely result, deep in a tail, or part of a wider cluster of plausible outcomes.
Other useful calculators
Disclaimer: This hypergeometric distribution calculator is for general educational, statistical, business, research, and planning use only. It provides mathematical probability estimates from user-entered population size, success states, sample size, observed successes, and optional range bounds.
The calculator assumes random sampling without replacement from a fixed finite population with a known number of successes. Real-world results can differ if sampling is biased, the population is not fixed, success states are uncertain, observations are dependent in another way, or the data generating process does not match the hypergeometric model.
Use appropriate statistical methods, study design review, domain expertise, and professional judgment for high-stakes decisions in medicine, finance, manufacturing, legal matters, scientific research, or regulated quality control. This calculator does not provide statistical consulting, risk approval, or a guarantee of real-world outcomes.
Last updated: June 2, 2026