Skip to content
Omnikalc

Hypergeometric calculator: draws without replacement

Calculate the probability of drawing exactly k, at most k or at least k successes without replacement, as with cards, lottery balls or quality control samples.

Updated on
Your inputs

Value out of range

Value out of range

Value out of range

Value out of range

Results

P(X = k)

29.947%

P(X ≤ k)

95.832%

P(X ≥ k)
34.116%
P(X > k)
4.168%
Expected successes (n × K ÷ N)
0.385

Drawing without replacement

The hypergeometric distribution gives the probability of drawing a certain number of “successes” when you take a sample without replacement from a finite population. Each draw changes what is left, so the draws are not independent.

The variables

  • N: population size (52 cards)
  • K: number of successes in the population (4 aces)
  • n: number of draws (5 cards)
  • k: number of successes drawn (1 ace)

The formula

P(X = k) = C(K, k) × C(N − K, n − k) ÷ C(N, n)

where C(n, k) is the number of combinations of k items among n. The mean number of successes is n × K ÷ N.

Worked example

What is the chance of exactly one ace in a 5-card poker hand?

  1. Ways to choose 1 ace from 4: C(4, 1) = 4.
  2. Ways to choose the other 4 cards from 48 non-aces: C(48, 4) = 194,580.
  3. Total hands: C(52, 5) = 2,598,960.
  4. P(X = 1) = 4 × 194,580 ÷ 2,598,960 ≈ 29.95%.
  5. P(X ≥ 1), at least one ace: ≈ 34.12%.
  6. Average number of aces in a hand: 5 × 4 ÷ 52 ≈ 0.38.

Other uses

  • Quality control: a batch of 500 parts contains 10 defective ones. If you inspect 20, what is the chance of finding none? N = 500, K = 10, n = 20, k = 0 gives about 66%.
  • Lotteries: in a 6 of 49 game, the chance of matching exactly 3 numbers is C(6, 3) × C(43, 3) ÷ C(49, 6) ≈ 1.77%.
  • Card games: the chance of drawing a needed card in collectible card games, where decks are small and every draw counts.
  • Ecology: capture-recapture estimates of animal populations.
  • Genetics: Fisher’s exact test for 2 × 2 tables is built on the hypergeometric distribution.

Hypergeometric or binomial?

The binomial distribution assumes each draw has the same probability, as when sampling with replacement. When the sample is small compared with the population, under about 5% of it, the two give almost the same answer and the binomial is simpler. When the sample is a large share of the population, use the hypergeometric distribution.

Limits of this calculator

The number of draws is limited to 30 so that the cumulative probabilities can be added up exactly.

Frequently asked questions

When do you use the hypergeometric distribution?

When you draw without replacement from a finite population that contains a known number of successes, such as cards from a deck, balls from an urn or items from a production batch.

What is the formula?

P(X = k) = C(K, k) × C(N − K, n − k) ÷ C(N, n). The chance of exactly one ace in a 5-card hand is 4 × 194,580 ÷ 2,598,960 ≈ 29.9%.

How is it different from the binomial distribution?

The binomial distribution assumes each draw is independent with the same probability, as with replacement. Without replacement, probabilities change after each draw. When the population is large compared with the sample, the two give similar results.

What is the chance of at least one ace in 5 cards?

P(X ≥ 1) = 1 − P(X = 0) ≈ 34.1%. Enter k = 1 and read P(X ≥ k).

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.