Hypergeometric Distribution Calculator
Sampling without replacement.
Interpretation
Drawing {5} items from a population of {52} (containing {13} successes), the probability of getting {exactly} {2} success(es) is {27.428}%.
What Is the Hypergeometric Distribution?
The hypergeometric distribution models the probability of drawing a specific number of successes when sampling without replacement from a finite population. Unlike the binomial distribution, which assumes independent trials with constant probability, the hypergeometric distribution accounts for how each draw changes the composition of the remaining population.
Classic example: Drawing cards from a deck. Once you draw an ace, there are fewer aces (and fewer total cards) remaining, affecting subsequent draw probabilities.
The Setup
Consider a population of items:
- items are "successes" (the type you're counting)
- items are "failures"
You draw items without replacement. The hypergeometric distribution gives the probability of getting exactly successes.
The Formula
Where:
- = ways to choose successes from available
- = ways to choose remaining items from non-successes
- = total ways to choose items from
Valid Range for k
The number of successes must satisfy:
You can't draw more successes than exist (), more than you draw (), or fewer than forced by having too few failures ().
Key Statistics
- Mean:
- Variance:
The variance formula includes the finite population correction factor , which reduces variance compared to binomial sampling.
Practical Applications
Quality Control
A shipment contains 100 parts, 10 of which are defective. If an inspector samples 20 parts without replacement, what's the probability of finding exactly 3 defective?
This is more accurate than binomial approximation for small populations.
Card Games
Probability of being dealt exactly 2 hearts in a 5-card poker hand:
Ecological Studies
Capture-recapture methods estimate population sizes using hypergeometric reasoning. If researchers tagged 50 fish, then later caught 30 fish (of which 10 were tagged), they can estimate total population.
Lottery Analysis
Lottery probability calculations often involve hypergeometric distributions, especially for games where you select numbers from a fixed pool without replacement.
Auditing
When auditing a sample of transactions for errors, the hypergeometric distribution properly models finding errors in the sample given a finite population of transactions.
Hypergeometric vs. Binomial
| Aspect | Hypergeometric | Binomial |
|---|---|---|
| Sampling | Without replacement | With replacement |
| Probability | Changes each draw | Constant |
| Population | Finite, matters | Infinite/large |
| Independence | Draws dependent | Draws independent |
When to use binomial approximation: When (sample is less than 5% of population), binomial closely approximates hypergeometric and is computationally simpler.
Fisher's Exact Test Connection
Fisher's exact test for 2Γ2 contingency tables is based on the hypergeometric distribution. It tests whether two categorical variables are independent by computing hypergeometric probabilities.
Multivariate Hypergeometric
The distribution extends to multiple categories. If a population has items of types 1, 2, ..., with counts :
This models scenarios like drawing cards of multiple suits or sampling items of multiple types.
Computational Considerations
For large populations, direct calculation of factorials leads to overflow. Use:
- Log-factorial calculations:
- Recursive relationships
- Stirling's approximation for very large values
Related Calculations
- Binomial Probability Calculator β Sampling with replacement
- Fisher's Exact Test β Based on hypergeometric
- Combinations Calculator β Underlying counting
- Negative Binomial Calculator β Until successes
Summary
The hypergeometric distribution is essential when sampling without replacement from a finite populationβsituations where each selection genuinely affects subsequent probabilities. From quality control inspections to card game odds to ecological population estimates, it provides exact probabilities that binomial approximations miss. While computationally more intensive, modern tools handle the calculations easily, making hypergeometric analysis accessible for practical applications.