Interactive demo · Introduction to Mathematical Statistics · Chapter 3

Without replacement or with replacement?

A lot holds N items, r of them defective. Inspect n items. If each is put back before the next is drawn the count of defectives is binomial(n, p) with p = r/N (orange); if they are kept out it is hypergeometric (blue), which is more concentrated: its variance is the binomial one times (N−n)/(N−1). When n is small beside N the two bar charts are nearly the same; when n is a large share of N they are not. The lower panel is the operating characteristic of the plan “accept the lot if at most c defectives are found”, for every possible share of defectives.

Lot size N

Defective items r

Sample size n

Accept if at most c defectives

Try these

All probabilities are exact (computed from logarithms of factorials, no simulation). The sample size is kept at most N, and the number of defectives at most N. The total variation distance is half the sum of the absolute differences between the two probability functions.

In the lecture notes