The factory's blind spot
A factory produces batches of 100 microchips. Quality control says: if a batch has 5 or more broken chips, reject it. But testing every chip is expensive.
Try the simulator. Drag the slider to see how sample size affects detection.
Most defects slip through with only 10 tested
At sample size 10, the detection rate is only about 40%. You miss defective batches more often than you catch them.
The wrong question
The intuitive reasoning fails because it answers the wrong question. "Expected broken chips in sample" isn't the same as "probability of finding at least one."
The complement trick
Rather than calculate "at least one," calculate "exactly zero" and subtract from 1.
The detection probability, step by step:
With a sample size of 10, defective batches slip through more often than they get caught.
The hypergeometric distribution
This calculation uses the hypergeometric distribution, which applies when you sample without replacement from a finite population.
For sampling items from a population of containing "successes," the probability of exactly successes is:
The numerator counts favorable outcomes (ways to pick from the successes and from the failures). The denominator counts total ways to pick any items.
Step through the formula to see what each piece represents:
The business trade-off
This tension defines acceptance sampling:
- Test more chips = higher cost, better detection
- Test fewer chips = lower cost, bad batches ship
There's no sample size that's both cheap and reliable. The math forces a trade-off.
Real quality control uses Operating Characteristic curves: graphs showing detection probability vs. defect rate for a given sample size. They make the trade-off visible.
Build your own OC curve. Adjust the batch size and sample size to see how detection probability changes across different defect rates:
Where else this appears
The hypergeometric distribution shows up whenever you sample without replacement from a finite population:
- Drug testing in sports (random selection of athletes)
- Auditing transactions for fraud
- Drawing cards from a deck
- Jury selection from a pool
They all share the same structure: a finite population, sampling without replacement, and counting "hits" in the sample.
Key formula
The core of the hypergeometric calculation is the complement rule:
All the counting power comes from combinations. The numerator counts ways to pick items entirely from the good ones; the denominator counts all possible samples.
Later, in the Hypergeometric Applications lesson, we'll derive the expected value and variance of the hypergeometric distribution. For now, the combinatorial formula is enough to expose the paradox.