Sampling plan and OC curve
SCQUALITYGUILD.COM/CALCULATORS/SAMPLING-PLAN-OC-CURVE.HTML
Enter n and c, see producer and consumer risk against your AQL and RQL, and the shape of what the plan can actually discriminate.
SINGLE OR DOUBLE · PRODUCER AND CONSUMER RISK · AOQ AND AOQL · FREE · NOTHING YOU TYPE LEAVES YOUR BROWSER
Q-BotClick for an explanation of this calculator.Sampling plan and OC curve
SINGLE OR DOUBLE · PRODUCER AND CONSUMER RISK · AOQ AND AOQLCURVE COMPUTED FROM THE BINOMIAL DISTRIBUTION. NOT A REPRODUCTION OF ANY PUBLISHED SAMPLING STANDARD — USE THE STANDARD ITSELF WHEN A PLAN IS CONTRACTUALLY REQUIRED.
For educational use. This page is a study aid. The method behind it has far more depth and detail than one page and one tool can cover, and what you see here is not everything the method offers or everything this site offers. For full understanding and application, use the governing standards and texts, and seek further education, training or qualified advice. Results depend on the data you enter, so check them before relying on them.
What an OC curve actually shows
An operating characteristic curve answers one question: if a lot were this bad, how often would this sampling plan let it through? The horizontal axis is the true fraction defective in the lot. The vertical axis is the probability that the plan accepts it.
Every attribute sampling plan has one, and the curve is fixed the moment you choose the sample size and the acceptance number. You do not get to decide how much protection the plan gives you after the fact — you decided it when you wrote n and c on the control plan.
That is the value of drawing it. A plan on paper looks like a rule. The curve shows you what the rule actually does.
Producer's risk and consumer's risk
Two points on the curve carry the names people argue about.
- Producer's risk is the chance of rejecting a lot that was good enough. It is read at the AQL, and it is conventionally around 5 percent — meaning a lot running at your AQL is accepted about 95 times in 100, and bounced the other five.
- Consumer's risk is the chance of accepting a lot that was bad enough to matter. It is read at the RQL, sometimes called the LTPD, and it is conventionally around 10 percent.
Both risks live on the same curve, and you cannot lower one without either raising the other or increasing the sample size. That is the whole trade, and it is the reason two people can look at the same plan and both be unhappy.
AQL describes a process average, not a per-lot allowance. In ANSI/ASQ Z1.4 and ISO 2859-1 the acceptance quality limit is the worst tolerable process average across a continuing series of lots. It is not a budget of defects you are entitled to ship in any one lot, and a plan built at a given AQL will still accept individual lots running worse than it — that is what the curve is showing you.
The sample size does the work, not the percentage
The most expensive misunderstanding in acceptance sampling is the belief that inspecting a fixed percentage of the lot gives consistent protection. It does not.
Take a rule that says "inspect 10 percent, accept on 2 or fewer." Run it against lots that are genuinely 1.5 percent defective:
| Lot size | Sample | Probability the lot is accepted |
|---|---|---|
| 200 | n = 20, c = 2 | 99.7% |
| 5,000 | n = 500, c = 2 | 2.0% |
Same written rule. Same quality. One lot sails through essentially every time and the other is rejected forty-nine times in fifty. The only thing that changed was a number that has nothing to do with how good the parts are.
Now hold the sample at 200 pieces and move the lot size instead, computed exactly rather than approximated:
| Lot size | n = 200, c = 2, at 1.5% defective |
|---|---|
| 2,000 | 41.0% |
| 5,000 | 41.7% |
| 20,000 | 42.0% |
| 100,000 | 42.1% |
A fiftyfold change in lot size moves the answer by about one point. The discriminating power is in n. This is why plans are written as a sample size and an acceptance number rather than as a percentage, and why "we inspect ten percent" tells you almost nothing about what is being caught.
What c = 0 does and does not buy you
Zero-acceptance plans are popular because they sound uncompromising — one defect and the lot goes back. They do not, however, simply move the curve to the left.
A c = 0 curve has no shoulder. It starts falling the instant quality is anything other than perfect, because the acceptance probability is simply the chance of drawing no defective at all. Compare two plans that give almost identical consumer protection:
| True fraction defective | n = 50, c = 0 | n = 200, c = 5 |
|---|---|---|
| 0.5% — a good lot | 77.8% | 99.9% |
| 1.0% | 60.5% | 98.4% |
| 2.0% | 36.4% | 78.7% |
| 5.0% — a bad lot | 7.7% | 6.2% |
At 5 percent defective the two plans are the same — they let roughly one bad lot in fourteen through. But at half a percent, the c = 0 plan rejects 22 percent of perfectly good lots while the c = 5 plan rejects one in a thousand.
That is the trade, and it is not the one most people think they are making. You buy a smaller sample and a rule that sounds uncompromising. You pay for it in returned lots that were fine, and in the supplier relationship that goes with them.
Whether it is worth it depends on what a defect costs you downstream. It is a decision worth making with the curve in front of you rather than on instinct.
Where sampling plans go wrong in practice
- Re-sampling after a rejection. "We'll pull another sample to be sure" discards the plan's protection entirely. The curve you designed assumed one sample and one decision. Two bites raises the acceptance probability at every quality level, including the bad ones.
- The plan was chosen by lot percentage. See above. It is the single most common way a control plan ends up offering protection nobody ever calculated.
- The AQL was negotiated rather than derived. If nobody can say what the two risks are or where they were read, the number came from a meeting, not from a curve.
- Sampling a stratified lot as though it were homogeneous. A plan's mathematics assume the sample represents the lot. Three pallets from three different setups in one lot break that assumption before the first piece is measured.
- Nobody knows what the plan detects. Ask what fraction defective the plan would catch nine times out of ten. If the answer is a shrug, the plan is a ritual.
Double sampling
A double plan takes a first sample of n1. With c1 or fewer nonconforming the lot is accepted; with r1 or more it is rejected; in between, a second sample of n2 is taken and the lot is accepted only if the total from both samples is c2 or fewer. Very good and very bad lots are decided on the first sample, so a double plan usually inspects fewer units on average than a single plan with the same OC curve. The calculator shows that average, the average sample number (ASN), at the AQL.
AOQ and AOQL
Under rectifying inspection, every rejected lot is screened and its nonconforming units replaced. The average outgoing quality (AOQ) is then the fraction nonconforming that leaves after inspection: about Pa × p × (N − n) ÷ N for a single plan. It is low when incoming quality is good (little to find) and low again when it is bad (most lots are screened), and it peaks in between. That peak is the average outgoing quality limit (AOQL): the worst average quality the plan lets through, whatever arrives. Leave the lot size blank for large lots.
The AOQL is an average over many lots, and it holds only if rejected lots really are screened. A plan whose rejected lots are returned, waived or re-sampled until they pass has no AOQL at all.