Sampling inspection and cost of defects
Shows how likely a lot is to pass inspection under a “sample n, accept c” plan at the real defect rate, how many defective items reach the customer and what that costs; you can compare with a tighter sample.
At a glance
- What question does it answer?
- Will the sample notice real defects and what missed defects cost.
- What data is needed?
- Sample size n and accept number c from the contract or ISO 2859-1 tables.
- How to read the result?
- Look at the acceptance probability at real defect rates and the defects reaching the customer. The table shows the OC curve: how sharply the plan separates a good lot from a bad one. Compare the damage with the price of a tighter sample. Example on the default values: Probability the lot is accepted — 73.6%; Defective pieces reaching the customer on average — 110.4 pcs; Expected damage under the plan — RUB 209,739; Acceptance probability under the tighter sample — 42.8%.
Why and how to reason
Inspecting every piece is expensive, so a sample is checked: n pieces are drawn and the lot is accepted if defects do not exceed c. But a sample is probabilistic: a lot with a real defect rate of 5% can pass, and a good lot can fail. The tool shows the acceptance probability at the real defect rate. Plan n=20, c=1: probability 0.95^20 + 20 × 0.05 × 0.95^19 ≈ 73.6%. So nearly three lots of four with 5% defects go to customers: on average 3,000 × 5% × 73.6% ≈ 110 defective pieces. Expected damage adds sample inspection, defects at the customer (RUB 1,500 each), rework of rejected lots and their full inspection: RUB 209,739. A tighter sample n=80, c=3 accepts such a lot in only 42.8% of cases, damage RUB 192,078, which is RUB 17,661 lower.
When to use it
Use it for lot acceptance at the factory or warehouse, when you must choose sample size and accept number or assess risk of an agreed plan. Assumptions: defects are randomly spread through the lot and independent, and the real defect rate is entered as an estimate. It does not fit critical defects (child safety, needles): there the accept number is zero and 100% inspection is needed. It does not replace an acceptance standard, it only estimates damage and probabilities.
How to read the result
Key numbers: probability of accepting a lot at the given defect rate, and damage. If 5% defects are accepted 73% of the time, the plan protects poorly: the sample is small. A tighter sample costs more to inspect but less in damage: compare the total, not one line. Also check the curve at 1–2%: a good plan accepts good lots almost always. Decision: tighten the sample if customer damage is high (returns, reputation) and relax it if the defect is cheap and obvious. It is worth comparing the plan with your factory’s typical defect rate over past lots, not the desired one, and tighten the sample where defects are higher and customer damage costs more.
Common mistakes
Entering the defect rate you wish for instead of the real one; ignoring that defects come in classes (critical, major, minor); n larger than the lot; mixing accept number c with defect share. Remember: sampling protects only statistically, one accepted lot does not prove there are no defects. Customer damage includes the return and reputation, not only the price of the item.
What data is needed?
- Sample size n and accept number c from the contract or ISO 2859-1 tables.
- An estimate of the real defect rate and the lot size.
- Optional: rework price, damage at the customer, inspection price, a tighter plan.
Inputs
| Field | Unit | Value in the example | Meaning |
|---|---|---|---|
| Sample size n | pcs | 20 | From the contract or the ISO 2859-1 tables (paid, not included here). |
| Accept number c | pcs | 1 | The accept number: how many defective pieces in the sample are allowed. More: the lot is rejected. |
| Real defect rate in the lot | % | 5 | An estimate from past lots; that is exactly the uncertainty. The default is set for apparel; for footwear, accessories and children’s take your own data. |
| Lot size | pcs | 3,000 | The lot size in pieces. If the sample is above 10% of the lot, the probability is calculated more exactly with the hypergeometric model. |
| Rework or replacement of one defective piece | ₽ | 300 | What it costs to rework or replace one defective piece, excl. VAT. Empty: 0. |
| Damage from one defective piece at the customer | ₽ | 1,500 | Return, replacement, lost customer. |
| Cost of inspecting one piece | ₽ | 40 | What it costs to inspect one piece (inspector’s time, a visit), excl. VAT. Empty: 0. |
| Sample size n | pcs | 80 | The sample size of a second, tighter plan to compare. Empty: no comparison. |
| Accept number c | pcs | 3 | The accept number of the second plan. Empty: no comparison. |
How it is calculated
| Step | Formula |
|---|---|
| Probability of acceptance | P = Σ C(n,k) · pᵏ · (1−p)ⁿ⁻ᵏ for k from 0 to c |
| Defects reaching the customer | P × lot size × p |
| Expected damage | n × inspection + P × lot × p × damage + (1 − P) × lot × p × rework + (1 − P) × (lot − n) × inspection |
Worked numbers
Default values from the app; in the interactive version you enter your own.
- Probability the lot is accepted
- 73.6 %At the given real defect rate.
- Defective pieces reaching the customer on average
- 110.4 pcs
- Expected damage under the plan
- 209,739 ₽Sample inspection + defects at the customer + rework and full screening of rejected lots.
- Acceptance probability under the tighter sample
- 42.8 %
- Expected damage under the tighter sample
- 192,078 ₽
- The tighter sample is better by
- 17,661 ₽A negative number: the tighter sample costs more.
Acceptance probability at different defect rates (OC curve)
| Defect rate | Plan n=20, c=1 | Plan n=80, c=3 |
|---|---|---|
| 1 % | 98.3 % | 99.1 % |
| 2 % | 94 % | 92.3 % |
| 3 % | 88 % | 78.1 % |
| 5 % | 73.6 % | 42.8 % |
| 8 % | 51.7 % | 10.9 % |
| 10 % | 39.2 % | 3.5 % |
| 15 % | 17.6 % | 0.1 % |
AQL 2.5% does not guarantee “no more than 2.5% defects in the lot”: the plan only sets how often a lot with such defects passes. A small sample hardly catches defects; fix the plan, defect classes and result in the report and contract.
Nuances and limits
- Thinking AQL 2.5% guarantees no more than 2.5% defects.
- Mixing critical, major and minor defects.
- Inspecting after packing and not recording the result in a report.