Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Find a Hypergeometric Probability

When you draw without replacement from a group that holds two kinds of items, every sample of the same size is equally likely. Count the samples with exactly kk successes by choosing the successes and the failures separately, then divide by the number of all samples.

Recognize the task

A finite group with two kinds of members is sampled without putting anything back, and the question counts one kind in the sample: "a 55-card hand with exactly 22 aces", "a committee of 33 from 44 women and 66 men", "a sample of 44 from a lot of 2020 with 33 defective". Test: the population is small enough that each draw changes the odds for the next. Then X∼Hyp⁡(N,K,n)X \sim \operatorname{Hyp}(N, K, n).
The model is defined in the hypergeometric distribution lesson.

Two ways to do it

Count with combinationsexact
P(X=k)=(Kk)(N−Kn−k)(Nn)P(X = k) = \frac{\binom{K}{k}\binom{N-K}{n-k}}{\binom{N}{n}}
The hypergeometric PMF is a favorable-over-total count of equally likely samples.
Binomial approximationlarge population
Hyp⁡(N,K,n)≈Bin⁡(n,KN)(n<0.05N)\operatorname{Hyp}(N, K, n) \approx \operatorname{Bin}\left(n, \tfrac{K}{N}\right) \quad (n < 0.05N)
When the sample is a small part of a large population, the odds barely change; use binomial probability with p=K/Np = K/N.

Steps

StepOn a committee of 33 from 44 women and 66 men, P(exactly 2 women)P(\text{exactly } 2 \text{ women})
1Name NN, KK, nn and kk. NN is the population, KK the successes in it, nn the sample size, kk the successes wanted in the sample.N=10N = 10, K=4K = 4, n=3n = 3, k=2k = 2
2Count the ways to choose the successes. Choose kk of the KK successes.(42)=6\binom{4}{2} = 6
3Count the ways to fill the rest with failures. Choose n−kn - k of the N−KN - K failures. The bottom numbers add up to nn, the top numbers to NN.(61)=6\binom{6}{1} = 6
4Divide by all samples of size nn. Multiply the two counts and divide by (Nn)\binom{N}{n}. For "at least" use the complement.6⋅6(103)=36120=310\frac{6 \cdot 6}{\binom{10}{3}} = \frac{36}{120} = \frac{3}{10}

Worked examples

Example 1 · a small committee

exact count
44 women, 66 men, choose 33; P(X=2)P(X = 2)
XX = number of women
(42)(61)(103)=6⋅6120\frac{\binom{4}{2}\binom{6}{1}}{\binom{10}{3}} = \frac{6 \cdot 6}{120}
women, men, all committees
P(X=2)=310P(X = 2) = \frac{3}{10}

Example 2 · a poker hand

cards
55 cards from 5252, P(exactly 2 aces)P(\text{exactly } 2 \text{ aces})
N=52N = 52, K=4K = 4, n=5n = 5
(42)(483)(525)=6⋅172962598960\frac{\binom{4}{2}\binom{48}{3}}{\binom{52}{5}} = \frac{6 \cdot 17296}{2598960}
22 aces, 33 non-aces
=1037762598960≈0.0399= \frac{103776}{2598960} \approx 0.0399

Example 3 · at least one defective

complement
lot of 2020 with 33 defective, sample 44; P(X≥1)P(X \ge 1)
P(X=0)=(30)(174)(204)=23804845P(X = 0) = \frac{\binom{3}{0}\binom{17}{4}}{\binom{20}{4}} = \frac{2380}{4845}
all four from the good parts
P(X≥1)=1−23804845=493969≈0.5088P(X \ge 1) = 1 - \frac{2380}{4845} = \frac{493}{969} \approx 0.5088
complement
Check your counts in the discrete distributions calculator.

See it happen

Without replacement, every subset of nn items from the NN is equally likely, so the probability is a ratio of counts. Splitting the sample into the part drawn from the successes and the part drawn from the failures turns one hard count into two easy ones. As the population grows with the same share K/NK/N, removing a few items hardly changes the odds and the bars approach the binomial ones. Compare them in the hypergeometric distribution visualizer.

Common mistakes

Treating the draws as independent

✗ P(X=2)=(32)(0.4)2(0.6)=0.288P(X = 2) = \binom{3}{2}(0.4)^2(0.6) = 0.288
✓ without replacement the odds change: 36120=0.3\frac{36}{120} = 0.3

Counts that do not add up

✗ (42)(63)(103)\frac{\binom{4}{2}\binom{6}{3}}{\binom{10}{3}}
✓ the bottom numbers must add to n=3n = 3: (42)(61)\binom{4}{2}\binom{6}{1}

Impossible values of k

✗ P(X=4)P(X = 4) for K=3K = 3 defective in the lot
✓ kk runs from max⁡(0, n−(N−K))\max(0,\, n - (N - K)) to min⁡(n,K)\min(n, K); here k≤3k \le 3

Ordered counts on top, unordered below

✗ favorable =4⋅3⋅6= 4 \cdot 3 \cdot 6 over (103)\binom{10}{3}
✓ count both as combinations (equally likely outcomes), or both as ordered lists