Z Table

Hypergeometric Calculator

The hypergeometric distribution gives the probability of drawing k successes in n draws without replacement from a population of N items that contains K successes: P(X = k) = C(K, k) × C(N − K, n − k) ÷ C(N, n). For a 60-card deck with 4 copies of a card and a 7-card hand, the chance of at least one copy is 0.3995, and of none is 0.6005. Enter N, K, n and k above for exactly, at least or at most k.

Cards in the deck, or items in the batch.
Copies of the card you want, or defective items.
Opening hand plus any draws.

At least k (X ≥ k)

0.399500

As a percent

39.95%

Mean (n × K ÷ N)

0.4667

Standard deviation

0.6255

Working

  1. P(X = 1) = C(4, 1) × C(56, 6) ÷ C(60, 7) = 0.336280
  2. P(X ≤ 1) = 0.936781; P(X ≥ 1) = 0.399500
  3. Mean = n × K ÷ N = 7 × 4 ÷ 60 = 0.4667; standard deviation = 0.6255

Table rows with a probability below 0.0000001 are hidden.

Probability of each number of successes
kP(X = k)P(X ≤ k)P(X ≥ k)
00.6005000.6005001.000000
10.3362800.9367810.399500
20.0593440.9961240.063219
30.0038040.9999280.003876
40.0000721.0000000.000072

Example: 60 cards, 4 copies, 7-card hand

  • P(X = 1) = C(4, 1) × C(56, 6) ÷ C(60, 7) = 0.336280
  • P(X ≤ 1) = 0.936781; P(X ≥ 1) = 0.399500
  • Mean = n × K ÷ N = 7 × 4 ÷ 60 = 0.4667; standard deviation = 0.6255
  • Chance of at least one copy = 0.3995; none = 0.6005

Hypergeometric or binomial?

Use the hypergeometric distribution when each draw removes an item, as with cards, raffle tickets or parts pulled from a lot. Use the binomial distribution when every trial has the same chance, as with coin flips or draws that are put back. When the sample is a small share of the population the two are close, and the finite population correction (N − n) ÷ (N − 1) in the variance is what separates them.

The mean is n × K ÷ N and the variance is n × (K ÷ N) × (1 − K ÷ N) × (N − n) ÷ (N − 1). The possible values of k run from max(0, n − (N − K)) to min(n, K); outside that range the probability is 0.

Worked uses

In the card example, the binomial shortcut 1 − (56 ÷ 60)^7 gives about 0.383, noticeably below the true 0.3995, because it ignores that drawn cards are not replaced. In quality control, N is the lot size, K the number of defective items and n the sample inspected; the probability of finding at least one defect is P(X ≥ 1). In a 6-of-49 lottery, matching exactly 3 of 6 numbers (N = 49, K = 6, n = 6, k = 3) has probability 0.0177.

The result is a pure shuffled-draw probability. It does not model mulligans, searching, extra draws or any game effect; add extra cards you expect to see to n. This is an independent tool and is not affiliated with any game publisher.

Frequently asked questions

What is a hypergeometric distribution?
It describes the number of successes in a fixed number of draws without replacement from a finite population with a known number of successes.
How do I find the chance of drawing a card in my opening hand?
Enter the deck size as N, the copies as K, the hand size as n and k = 1, then read P(X ≥ 1). For 4 copies in a 60-card deck and 7 cards it is 39.95%.
Why not use the binomial distribution for a deck?
A binomial assumes every draw has the same chance. In a deck each card drawn changes the odds of the next, so the binomial is only an approximation.
Can I use it outside card games?
Yes. It fits quality control, raffles, lottery matches and any draw without replacement.

Sources and references