Hypergeometric Distribution Calculator — drawing without replacement
A population of N items contains K “successes”. You draw n items without putting them back. How likely is it that exactly k of them are successes? Pick an example or enter your own numbers.
Full distribution of X
| k | P(X = k) | P(X ≤ k) | P(X ≥ k) |
|---|---|---|---|
| Fill in the fields above — the result is computed on this page. | |||
The P(X = k) column adds up to 100%. P(X ≤ k) grows and P(X ≥ k) falls from row to row; the highlighted row is your k.
What these numbers mean
- Result for the settings above: 1.77%. It updates as soon as any field changes.
- We compute it from the formula shown below — not from a prediction model and not from draw history.
The numbers come from the formula and the values you typed above. They are not a forecast — no calculator changes the probability of a single draw.
How to use this page
- Fill in the fields in the form above — the result recomputes at once, with no page reload.
- Under the result you will find the interpretation scale, if the calculator has one: it says which range your value fell into.
- The formula we use is shown lower on this page — you can check the arithmetic yourself.
- To compute the same for another game or variant, change it in the select field — prices and pools update automatically.
What this page does not do: It does not point to numbers to play and does not predict a draw — every draw is independent of the previous ones.
Further reading
Formula
P(X = k) = C(K, k) × C(N − K, n − k) ÷ C(N, n) · E(X) = n × K/N · Var(X) = n × K/N × (1 − K/N) × (N − n)/(N − 1) The hypergeometric distribution describes drawing without replacement: every item taken out changes what is left. That is exactly how lottery balls, cards dealt from a deck or a sample of products taken for inspection behave.
The formula counts favourable samples. Choose k successes out of K and n − k failures out of N − K, multiply the two numbers and divide by all ways of choosing n items out of N. For exactly three matches in Lotto this gives 20 × 12,341 ÷ 13,983,816, about 1.77%.
Not every k is possible. If there are only K successes, you cannot draw more than K of them; if there are only N − K failures, a large sample must contain at least n − (N − K) successes. The calculator shows the possible range of X and returns 0 for values outside it.
The expected value n × K/N is the long-run average number of successes, not a prediction of a single draw. The factor (N − n)/(N − 1) makes the variance smaller than in the binomial distribution, because drawing without replacement leaves less room for chance; when N = 1 or n = N the variance is 0.
The examples are the classic ones from probability lessons — balls in an urn, a deck of cards, defective items in a batch — plus two lottery cases. They only fill in the numbers: the formula never changes.
Read more
Frequently asked questions
What is the difference between the hypergeometric and the binomial distribution?
The binomial distribution assumes drawing with replacement, so the chance of success stays the same every time. The hypergeometric distribution is for drawing without replacement, where each draw changes what is left. For a large population and a small sample the two give similar results.
Why is P(X ≥ k) not equal to 1 − P(X ≤ k)?
Because both include the row X = k. The correct relation is P(X ≥ k) = 1 − P(X ≤ k − 1), which you can check in the table.
See also
Arithmetic Mean
Enter numbers separated by commas and calculate the arithmetic mean online. The calculator will give you the s
Combinations, variations and permutations
Calculate the number of combinations, variations and permutations of n elements taken k at a time. Combinatori
Geometric mean
Calculate the geometric mean of any number of values. The n-th root of the product. Useful for rates of return