The Engineering Desk
Engineering, without the noise.

ManufacturingQuality & Inspection

What an AQL sampling plan actually protects you from

An AQL 1.0 plan passes most lots that are 2% defective. The operating characteristic curve shows what a plan really does, and how to pick one that fits.

Two cylindrical plug gauges, one labeled GO and one labeled NO-GO
Photo: “Go & No-Go gauge” by Krakuspm, CC BY-SA 3.0, via Wikimedia Commons

"We inspect to AQL 1.0" sounds like a promise that no more than 1% of what ships will be defective. It is not. An acceptable quality limit is a statement about the quality level a sampling plan will usually accept, not a ceiling on what gets through. A lot that is 2% defective will pass an AQL 1.0 plan most of the time. A lot that is 3% defective will pass about half the time. Understanding why takes one probability formula and one curve, and it changes how you read every incoming inspection report.

This article explains what an acceptance sampling plan does, how to calculate its operating characteristic (OC) curve, what the AQL and the limiting quality level really mean, and what protection a plan actually gives the customer. A worked example runs the numbers for a common plan size.

What a sampling plan is

An attribute single sampling plan has two numbers:

  • Sample size, nn: how many units to take at random from the lot.
  • Acceptance number, cc: the largest number of defective units allowed in the sample. If the sample has cc or fewer defectives, accept the lot. If it has more, reject it. The rejection number is c+1c + 1.

Standards such as ANSI/ASQ Z1.4 (and its military predecessor, MIL-STD-105) give tables that pick nn and cc from the lot size, an inspection level and the chosen AQL. The tables are convenient, but they hide what the plan does. To see that, you need the probability of acceptance.

The probability of acceptance

If the lot is large compared with the sample, the number of defectives in a random sample follows a binomial distribution. For a lot with fraction defective pp, the probability that the sample contains exactly dd defectives is

P(d)=(nd)pd(1−p)n−d.P(d) = \binom{n}{d} p^d (1-p)^{n-d}.

The probability of accepting the lot, PaP_a, is the chance of seeing cc or fewer:

Pa(p)=∑d=0c(nd)pd(1−p)n−d.P_a(p) = \sum_{d=0}^{c} \binom{n}{d} p^d (1-p)^{n-d}.

Plot PaP_a against pp and you get the plan's operating characteristic curve. Every sampling plan has one, and it is the only honest description of what the plan does. Two plans with the same AQL label can have very different curves.

When the sample is a large share of the lot (more than about 10%), the hypergeometric distribution is exact and the binomial slightly understates the protection. For most lot sizes, the difference is too small to matter, as the example below shows.

Worked example: n=125n = 125, c=3c = 3

Consider a plan that samples 125 parts and accepts the lot if 3 or fewer are defective. A plan of about this size is typical for lots of a few thousand parts at an AQL near 1%. Here is its probability of acceptance at several lot quality levels, calculated with the binomial formula:

Lot fraction defective ppProbability of acceptance PaP_aOut of 100 such lots, about how many pass
0.5%0.996100
1.0%0.96396
2.0%0.75976
3.0%0.48148
4.0%0.25926
5.0%0.12412
6.5%0.0353

Binomial probabilities calculated by The Engineering Desk.

To check one value by hand, take p=0.01p = 0.01. The expected number of defectives in the sample is np=1.25np = 1.25. A quick Poisson approximation gives

Pa≈∑d=03e−1.25 1.25dd!=0.962,P_a \approx \sum_{d=0}^{3} \frac{e^{-1.25} \, 1.25^d}{d!} = 0.962,

very close to the exact binomial value of 0.963.

Read the table from the customer's side. A lot that is 2% defective, twice the nominal AQL, passes three times out of four. A lot that is 3% defective is close to a coin toss. The plan only becomes a strong barrier around 5% defective, where it rejects about seven lots in eight.

The points on the curve that matter

Four quality levels are used to describe a plan:

TermDefinitionValue for n=125n = 125, c=3c = 3
Producer's quality level (about 95% acceptance)The quality the plan accepts about 95% of the time. The producer's risk α\alpha is the 5% chance of rejecting a lot this good.p≈1.1%p \approx 1.1\%
Indifference quality (50% acceptance)The quality the plan accepts and rejects equally oftenp≈2.9%p \approx 2.9\%
Limiting quality, LQ or LTPD (10% acceptance)The quality the plan rejects 90% of the time. The consumer's risk β\beta is the 10% chance of accepting a lot this bad.p≈5.3%p \approx 5.3\%
AOQL (worst average outgoing quality)The worst long-run average fraction defective shipped when rejected lots are 100% sortedabout 1.5%

In ANSI/ASQ Z1.4, the AQL is defined as the quality level that is the worst tolerable process average when a continuing series of lots is submitted. The plans in the standard are built to accept lots at the AQL with a high probability. That makes the AQL mainly a producer-side number: it protects a supplier whose process runs at or better than the AQL from having good lots rejected. The customer's protection is described by the limiting quality, which is typically several times the AQL.

Average outgoing quality

Sampling does not just accept or reject lots. Under a rectifying inspection scheme, rejected lots are sorted 100% and defectives are replaced. The quality that actually ships to the customer, averaged over many lots, is the average outgoing quality (AOQ):

AOQ(p)=p Pa(p) (N−n)N,AOQ(p) = \frac{p \, P_a(p) \, (N - n)}{N},

where NN is the lot size. At very good incoming quality, few defectives come in, so few go out. At very bad incoming quality, most lots are rejected and sorted, so again few go out. In between, the AOQ rises to a maximum, the AOQL.

For our plan with lots of N=3,000N = 3{,}000, the AOQ peaks at an incoming quality of about 2.3%, where the outgoing average is about 1.5%. That AOQL, about 1.5%, is the best single answer to "how bad can it get on average if this plan is run properly?" It assumes rejected lots are actually sorted. If rejected lots are returned to the supplier and come back unchanged, or are accepted by deviation, the AOQ calculation does not apply.

The cost side matters too. At 2% incoming quality, the plan accepts 75.9% of lots after inspecting 125 parts and sorts the other 24.1% completely. The average total inspection per lot is

ATI=n+(1−Pa)(N−n)=125+0.241×2,875≈819 parts.ATI = n + (1 - P_a)(N - n) = 125 + 0.241 \times 2{,}875 \approx 819 \text{ parts}.

A plan that looked like it inspected 4% of each lot ends up inspecting more than a quarter of the parts on average, because the lots are not as good as the AQL.

Comparing plans

Plans with different sample sizes and acceptance numbers can be tuned to similar AQLs and still protect very differently at the bad end. Here is the probability of acceptance for four plans:

Planp=0.5%p = 0.5\%p=1%p = 1\%p=2.5%p = 2.5\%p=5%p = 5\%
n=50n = 50, c=1c = 10.9740.9110.6440.279
n=125n = 125, c=3c = 30.9960.9630.6190.124
n=200n = 200, c=5c = 50.9990.9840.6160.062
n=80n = 80, c=0c = 00.6700.4480.1320.017

Binomial probabilities calculated by The Engineering Desk.

Three patterns stand out:

  • Larger samples make the curve steeper. The three plans with c≥1c \ge 1 all accept about 62% to 64% of lots at 2.5% defective, but the 200-piece plan accepts only 6% of lots at 5% defective, against 28% for the 50-piece plan. Bigger samples separate good lots from bad ones more sharply.
  • Zero-acceptance plans are hard on suppliers. The c=0c = 0 plan rejects a third of lots that are only 0.5% defective. It gives the customer strong protection at the bad end but punishes good suppliers for a single defect found by chance. That is why zero-acceptance plans are usually paired with an expectation that the supplier's process runs far better than 0.5%.
  • The AQL label alone cannot tell you any of this. You have to look at the curve, or at least at the limiting quality.

How a table plan is chosen

In ANSI/ASQ Z1.4, picking a plan takes three steps. First, the lot size and the inspection level (general level II is the usual default) give a sample size code letter. Second, the code letter gives the sample size. Third, the AQL column gives the acceptance and rejection numbers for that sample size, sometimes with an arrow that sends you to a different row and sample size. The process is quick, but it builds in the plan's OC curve without showing it. The standard does include OC curves for its plans; few people look at them.

Designing a plan from two points

A more direct approach is to state the protection you want and find the smallest plan that delivers it. Suppose a customer wants lots at 1% defective accepted at least 95% of the time, and lots at 5% defective accepted no more than 10% of the time. Searching the binomial formula for the smallest sample at each acceptance number gives:

Acceptance number ccSmallest nn with Pa(5%)≤0.10P_a(5\%) \le 0.10Pa(1%)P_a(1\%)Meets 95% at 1%?
0450.636No
1770.820No
21050.911No
31320.956Yes

Binomial search calculated by The Engineering Desk.

The smallest plan that meets both points is n=132n = 132, c=3c = 3. The n=125n = 125, c=3c = 3 plan from the worked example comes close but accepts 12.4% of lots at 5% defective, slightly more than the customer asked for. Seven extra parts per lot is the price of meeting the stated protection exactly. This kind of two-point design makes the trade between producer's risk, consumer's risk and inspection cost visible, which a table lookup does not.

Binomial or hypergeometric?

For a lot of 3,000 parts that is exactly 2% defective (60 defectives), the exact hypergeometric probability of acceptance for n=125n = 125, c=3c = 3 is 0.761, compared with 0.759 from the binomial. With the sample at about 4% of the lot, the difference is negligible. It grows when the sample is a large share of the lot, which is why small lots need the exact calculation or a plan designed for them.

Common mistakes

  • Reading the AQL as a maximum defect rate. It is not. Lots several times worse than the AQL are accepted regularly.
  • Believing an accepted lot meets the AQL. Acceptance means only that the sample had cc or fewer defectives. It says little about any single lot.
  • Taking samples from the top of the box. Every probability in this article assumes a random sample. Parts from one corner of one carton, or from the start of the run, can be very different from the lot.
  • Re-sampling rejected lots until they pass. Drawing a second sample after a rejection and accepting if it passes changes the plan completely and raises the acceptance probability for bad lots. If a double sampling plan is wanted, use one that is designed that way.
  • Ignoring switching rules. Z1.4 includes rules for moving between normal, tightened and reduced inspection based on recent results. Using the normal plan forever discards part of the protection the standard was designed to give.
  • Mixing defect classes. Critical, major and minor defects need separate AQLs, and often separate plans. A critical defect usually calls for 100% inspection or error proofing, not sampling.
  • Using sampling instead of process control. Sampling inspection cannot improve quality; it only sorts lots. If a supplier's process is capable and in statistical control, the incoming plan is mostly confirming what control charts already show. If it is not, sampling will let a steady stream of defects through.

Practical steps

  1. Write down the plan's nn and cc, not just its AQL. Calculate its OC curve, or at least PaP_a at the AQL and at two or three worse quality levels.
  2. Find the limiting quality (the fraction defective accepted 10% of the time). Ask whether you could live with lots at that quality getting through one time in ten.
  3. Calculate the AOQL if rejected lots are sorted. Compare it with the defect rate your own process or customer can tolerate.
  4. Check the sample is random. Write the sampling method into the inspection instruction: which cartons, which positions, how parts are selected.
  5. Apply the switching rules of the standard you use, and record which inspection level is in force.
  6. Track results over time. Plot the fraction defective found in each sample on a p chart. A supplier whose results drift toward the AQL is telling you something long before a lot is rejected.
  7. Move toward process data. For key characteristics, ask suppliers for capability studies and control charts. Reduce sampling once the evidence shows a capable, stable process, and keep sampling as a check rather than the main defense.

The short version

An AQL describes the quality a plan is designed to accept, not the quality it guarantees to ship. For a plan of 125 samples with an acceptance number of 3, a lot that is 1% defective passes 96% of the time, a lot that is 3% defective passes about half the time, and only lots worse than about 5% are rejected nine times in ten. If you know a plan's sample size and acceptance number, the binomial formula and a few minutes are enough to find out what it really protects against, and whether that is enough for the parts you buy.

More in Quality & Inspection