Skip to main content
Probability Cards
Menu

Target cards in a draw

When you draw cards without putting them back, how many from a chosen group will you see? Simulate it and compare with the exact hypergeometric distribution.

Simulation settings

The simulation counts how many of these appear in each draw.

Whole number from 1 to 52.

Number of simulated draws

The same seed and settings always reproduce exactly the same results.

The mathematics

If K of the 52 cards are targets and n cards are drawn, the number of targets X has the hypergeometric distribution:

P(X = k) = C(K, k) × C(52 − K, n − k) / C(52, n) E[X] = n·K / 52 Var[X] = n·(K/52)·(1 − K/52)·(52 − n)/51

The last factor, (52 − n)/51, is the finite population correction. It makes the variance smaller than it would be if each card were returned and reshuffled, because drawing without replacement removes uncertainty as the deck shrinks. Compare your result with the exact numbers on the calculator.

Things to try