Wide tables, equations, and code scroll sideways. Swipe, or Tab to focus them and use the left and right arrow keys.

Binomial vs hypergeometric

An urn contains N items, M marked. Draw n times and count marked items. If each draw is uniform and the item is replaced before the next independent draw, the count is binomial with success probability p=M/N. If you take a uniformly random subset without replacement, the count is hypergeometric.

The initial fraction and the expected count agree. Dependence changes the spread and possible outcomes.

Replacement changes the spread of the count00.10.20.30246810marked items drawnprobability

Draw 10 times from 20 items, 8 marked. With replacement, each independent draw has success probability 0.4000. Without replacement, every subset of this size is equally likely.

The same event: at most 4 marked items
ModelProbabilityMeanVariance
Binomial (filled)0.6331034.0002.4000
Hypergeometric (outline)0.6750424.0001.2632

Absolute probability difference: 0.041938. Finite-population variance multiplier: 0.5263.

Both models use the same initial population fraction. The full count range is drawn; probability outside the hypergeometric support is retained in the binomial. Neither distribution is rescaled to match the other's height.

Count a small example

Take N=5, M=2, n=3. Without replacement there are ten equally likely three-item subsets. Exactly six contain one marked item: choose one of the two marked items and two of the three unmarked items. Thus P(X=1)=6/10. With replacement, P(X=1)=3×0.4×0.6²=0.432.

Both means are 3×0.4=1.2. The with-replacement variance is 3×0.4×0.6=0.72. Without replacement it is 0.72×(5−3)/(5−1)=0.36. The factor involving the finite population accounts for dependence.

Var⁡(Xwithout)=np(1−p)N−nN−1,N>1\operatorname{Var}(X_{\rm without})=np(1-p)\frac{N-n}{N-1},\qquad N>1

When the binomial approximation improves

Compare Sample half and Sample two percent. Both have ten draws and an initial marked fraction of 0.4, but the second removes a much smaller fraction of the population. Its finite-population variance multiplier is closer to one. This is a reason to expect closer count probabilities, not a universal error guarantee for every tail.

Now draw the entire population. Without replacement the count must equal M. With replacement, ten appearances of a marked item can include repeated draws of the same physical item. The full chart range preserves those binomial outcomes, including values impossible without replacement.

Make a prediction

You inspect every item in a fixed batch. Is the number of marked items still random under uniform sampling without replacement?

Explore the answer

No. You observe all M marked items, so the count is M and its variance is zero. Uncertainty about how the batch was produced would require a different, additional model.

Random Services: hypergeometric sampling derives the count law and finite-population variance from uniform sampling. Explore the individual hypergeometric and binomial experiments, or review conditioning and independence.

Reset all settings