How it’s calculated
The hypergeometric distribution counts successes when you draw a sample without replacement from a finite population that contains a known number of successes: hearts in a poker hand, defective parts in a batch, winning numbers in a lottery ticket. Because nothing goes back, each draw changes the odds of the next, which is what separates it from the binomial distribution.
Here N is the population size, K the number of successes in it, n the sample size and k the number of successes you ask about. The cumulative values add up P(X = i) over the relevant i.
Worked example: draw 5 cards from a 52-card deck. What is the chance of exactly 2 hearts? N = 52, K = 13, n = 5, k = 2: C(13,2) × C(39,3) ÷ C(52,5) = 78 × 9,139 ÷ 2,598,960 = 0.27428. The mean is 5 × 13 ÷ 52 = 1.25 hearts.
The factor (N − n) ÷ (N − 1) in the variance is the "finite population correction". When the sample is a tiny part of the population it is close to 1 and the binomial distribution is a good approximation.
Frequently asked questions
What is the difference between hypergeometric and binomial?
Binomial assumes independent trials with a constant success chance, as with replacement. Hypergeometric is for sampling without replacement from a small population, where the chance changes with every draw.
Why can X not take every value from 0 to n?
You cannot draw more successes than exist (K), and you cannot draw more failures than exist (N − K). The "Possible values of X" result shows the real range.
How do I find "more than k" or "fewer than k"?
P(X > k) = 1 − P(X ≤ k), and P(X < k) = 1 − P(X ≥ k). "At least k" is P(X ≥ k).
Can I use it for a lottery?
Yes: N is the numbers in the draw pool, K the numbers drawn, n the numbers on your ticket and k the matches. The lottery odds calculator on this site does that for you.
Embed this calculator
Add this free calculator to your own website. Copy the code below into your page’s HTML:
Need this calculator branded, changed or built around your own prices?See custom business solutions →
Sources
Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.
Added · Last updated · How we check our calculators
Spotted a mistake or missing option? Report a problem· Suggest a calculator