Hypergeometric Calculator
Input Parameters
Computed Results
The hypergeometric calculator determines the probability of drawing a specific number of successes from a population without replacement. It is widely used in statistics, quality control, and card games to calculate exact and cumulative probabilities based on your population size, sample size, and target successes.
Verified Scenario Walkthroughs
To understand how the calculator processes different inputs, consider these verified examples:
Standard Card Game Draw
Suppose you are playing a card game with a 60-card deck (Population Size = 60). You draw an opening hand of 7 cards (Sample Size = 7). There are 4 copies of a specific card you want in the deck (Successes in Population = 4), and you want to know the odds of drawing at least 1 of them (Target Successes = 1). The calculator determines a 39.9% chance to draw 1 or more copies, and a 33.6% chance to draw exactly 1 copy.
Quality Control Batch Inspection
Imagine a manufacturing batch of 1,000 items (Population Size = 1000) where 100 items are known to be defective (Successes in Population = 100). If an inspector randomly checks 50 items (Sample Size = 50) and looks for exactly 5 defects (Target Successes = 5), the probability of finding exactly 5 defects is 19.0%. The chance of finding 5 or more defects is 57.3%.
Impossible Target Success Count
If you have a population of 50 items, draw 10, and there are only 2 successes in the entire population, setting a target of 5 successes will result in a 0% probability. It is mathematically impossible to draw more successes than exist in the population.
Formula & Explanation
The hypergeometric distribution calculates the probability of exactly k successes in n draws from a finite population of size N that contains exactly K successes, without replacement. The probability mass function (PMF) uses combinations:
Where:
- N = Total population size
- K = Total number of successes in the population
- n = Sample size (number of draws)
- k = Target number of observed successes
- C(a, b) = The number of combinations of a items taken b at a time
The calculator also sums these exact probabilities to provide cumulative results, such as the chance of drawing at least or at most a certain number of successes.
How to Use the Calculator
Follow these steps to calculate your probabilities:
- Enter the Population Size (N): Input the total number of items in your entire group or deck.
- Enter the Sample Size (n): Input the number of items you are drawing or selecting from the population.
- Enter Successes in Population (K): Input the total number of desired items that exist within the full population.
- Enter Target Successes in Sample (k): Input the specific number of successes you want to calculate the probability for in your drawn sample.
Inputs & Outputs Table
Below is a reference guide for the terms used in this calculator.
| Term | Type | Description |
|---|---|---|
| Population Size (N) | Input | The total number of items in the population (e.g., total cards in a deck). |
| Sample Size (n) | Input | The number of items drawn without replacement (e.g., opening hand size). |
| Successes in Population (K) | Input | The total number of desired items available in the population. |
| Target Successes in Sample (k) | Input | The number of successes observed or desired in the sample. |
| P(X ≥ k) | Output | The cumulative probability of drawing the target number of successes or more. |
| P(X = k) | Output | The exact probability of drawing precisely the target number of successes. |
| P(X ≤ k) | Output | The cumulative probability of drawing the target number of successes or fewer. |
| P(X < k) | Output | The cumulative probability of drawing strictly fewer than the target number of successes. |
Practical Use Cases
The hypergeometric distribution is applied in scenarios where items are drawn from a finite pool without being replaced, meaning each draw changes the odds for the next. Common applications include:
- Tabletop and Card Games: Calculating the likelihood of drawing specific cards in an opening hand or off the top of a deck.
- Quality Assurance: Determining the probability of finding a certain number of defective parts in a random sample taken from a larger production batch.
- Ecology and Biology: Estimating animal populations using capture-recapture methods, where a sample of animals is tagged, released, and a second sample is drawn to see how many tagged animals are recaptured.
Frequently Asked Questions
What is the difference between binomial and hypergeometric distributions?
The binomial distribution assumes sampling with replacement, meaning the probability of success remains constant for every draw. The hypergeometric distribution assumes sampling without replacement, meaning the probability changes with each draw as the population size decreases.
Can the target successes (k) be higher than the successes in the population (K)?
No. If you set a target number of successes that is higher than the total number of successes available in the population, the probability of achieving that target is 0%.
Why does the probability change when I draw without replacement?
When you draw an item and do not put it back, the total number of items remaining in the population decreases. This alters the ratio of successes to total items for all subsequent draws.