Answer: What the Hypergeometric Calculator computes
The Hypergeometric Calculator computes the exact probability of getting exactly k successes when you draw n items without replacement from a finite population. It also computes cumulative probabilities such as P(X ≤ k) or P(X ≥ k) for common risk and quality-control questions.
When to use the hypergeometric model
Use the hypergeometric distribution when you sample from a fixed-size population and the items are drawn without replacement. Each draw changes the remaining counts, so probabilities must be computed exactly rather than approximated by binomial models.
- Finite population: You know the total number of items in the group.
- Two outcomes: Each item is a “success” or “failure.”
- Without replacement: Once an item is selected, it is not returned.
- Fixed sample size: You draw exactly n items.
Core formula (exact probability)
Let:
- N = total population size
- K = number of successes in the population
- N − K = number of failures
- n = number of draws (sample size)
- X = number of successes observed in the sample
- k = the specific success count you want
The probability of getting exactly k successes is:
P(X = k) = [C(K, k) · C(N − K, n − k)] / C(N, n)
Where C(a, b) is the binomial coefficient (“a choose b”). If k is outside the feasible range, the probability is 0.
Feasible ranges (so results make sense)
Not every value of k is possible. The hypergeometric model respects the limits of both successes and sample size.
- Minimum possible k: max(0, n − (N − K))
- Maximum possible k: min(n, K)
If you ask for a k outside this range, the calculator should return 0 (or show an error depending on how you set “exactly k” vs. cumulative).
Common cumulative probabilities
Many real questions are not “exactly k,” but “at most k” or “at least k.” The hypergeometric distribution supports cumulative sums.
- P(X ≤ k) = Σi=0k P(X = i>
- P(X ≥ k) = Σi=kn P(X = i>
- P(X < k) = P(X ≤ k − 1)
- P(X > k) = P(X ≥ k + 1)
The calculator can compute these by summing exact probabilities across the valid range.
How the calculator handles large numbers
Directly computing factorials can overflow quickly. A good hypergeometric calculator uses a numerically stable approach, typically by working with logs and combining terms carefully.
In practice, this means you can enter moderate-to-large values for N, K, and n and still get accurate results for probabilities.
Practical Example 1: Quality control batch
A factory inspects a batch of N = 200 items. It knows there are K = 18 defective items. An inspector randomly selects n = 12 items without replacement.
Question: What is the probability of finding k = 3 defectives?
- Model: Hypergeometric with successes = defectives
- Compute: P(X = 3)
If the probability is small, the inspector’s sample is unlikely to contain exactly that many defectives; if it is large, that outcome is typical given the known defect rate.
Practical Example 2: Card draws without replacement
Suppose a deck has N = 52 cards. Consider “successes” as drawing hearts. There are K = 13 hearts. You draw n = 5 cards without replacement.
Question: What is the probability of getting at least 4 hearts?
- Model: Hypergeometric with successes = hearts
- Compute: P(X ≥ 4) = P(X = 4) + P(X = 5)
This is exactly the kind of situation where “without replacement” matters. A binomial approximation would treat draws as independent, which is not true for a finite deck.
How to use the Hypergeometric Calculator
Enter the values for the population and the sample, then choose whether you want an exact or cumulative probability.
- Total population (N): the overall number of items
- Number of successes (K): how many items are “success”
- Sample size (n): how many items you draw
- Target successes (k): the exact count or the cutoff for cumulative sums
- Probability type: “Exactly k”, “At most k”, or “At least k”
The output gives a probability between 0 and 1. For easier interpretation, you can convert it to a percentage by multiplying by 100.
Interpreting results correctly
Hypergeometric probabilities are exact for the stated counts. If your real process differs (for example, sampling with replacement, or unknown K), the model must change.
- If K is close to 0 or N, results will be strongly skewed.
- If n is large relative to N, the “without replacement” effect is strong.
- If you ask for impossible k values, the probability is 0.
Frequently Asked Questions
What is a Hypergeometric Calculator used for?
A Hypergeometric Calculator computes exact probabilities for sampling without replacement from a finite population. You input population size N, successes K, sample size n, and target k. It returns P(X=k) or cumulative probabilities like P(X≤k) and P(X≥k) for your scenario.
How is hypergeometric different from binomial?
The hypergeometric distribution models draws without replacement from a finite set, so probabilities change after each draw. The binomial model assumes independent trials with replacement (or effectively infinite population). Use hypergeometric when N is fixed and not huge.
What does “success” mean in hypergeometric problems?
“Success” just labels one outcome type you care about, such as defective items, hearts, or customers who buy a product. The calculator treats all successes as identical and all failures as identical. Only the counts K and N−K matter.
Why do some k values return probability 0?
Because k must be feasible given N, K, and n. You cannot draw more successes than exist (k≤K) or more items than you draw (k≤n). You also cannot draw fewer successes than required to reach n items when failures are limited.
Can I compute “at most k” and “at least k” probabilities?
Yes. “At most k” means summing probabilities for X=0 through X=k. “At least k” means summing probabilities for X=k through X=n. A Hypergeometric Calculator performs these exact sums over all valid k values.
Takeaway
The Hypergeometric Calculator gives you exact probabilities for “without replacement” sampling from a finite population. With the right inputs—N, K, n, and k—you can answer quality control, risk, and combinatorics questions with confidence.