Drawing without replacement: the hypergeometric distribution
A random variable
A random variable assigns a number to each outcome. If you draw five cards and let X be the number of hearts, X can be 0, 1, 2, 3, 4 or 5. Its probability distribution lists how likely each value is.
Deriving the formula
To get exactly k hearts in n cards, choose k of the 13 hearts and n − k of the 39 non-hearts, and divide by all ways to choose n cards. The numerator is a product by the multiplication principle.
P(X = k) = C(13, k) × C(39, n − k) / C(52, n) n = 5, k = 2: 78 × 9,139 / 2,598,960 ≈ 27.43%Mean and variance
The mean of X is n × (K / N), here 5 × 13/52 = 1.25 hearts. The variance includes a correction because cards are not replaced: Var = n (K/N)(1 − K/N)(N − n)/(N − 1). With replacement the last factor would be 1, so removing cards shrinks the variability.
E[X] = n K / N Var[X] = n (K/N) (1 − K/N) (N − n) / (N − 1)With or without replacement?
If each card were returned and the deck reshuffled before the next draw, X would follow the binomial distribution. For a small draw from a big population the two are close. For a deck of 52 and a five-card draw the difference is visible, which is why the exact hypergeometric formula matters.
Check your understanding
Expected number of aces in a 13-card draw?
13 × 4/52 = 1.
In a 52-card draw, what is the variance of the number of aces?
0. Every draw contains all four aces (N − n = 0 in the formula).
Which is larger for n = 5, K = 13: the hypergeometric or the with-replacement (binomial) variance?
Binomial: 5 × 0.25 × 0.75 = 0.9375 versus 0.864 for the hypergeometric.