🔍 Quality Control Lab: Acceptance Sampling, OC Curve and AOQL

The science

Single sampling plan (N, n, c): draw n items at random from a lot of N, count defectives d; accept the lot if d <= c, otherwise reject it and inspect every item (rectifying inspection, defects replaced).

  • Without replacement the defects in the sample follow the hypergeometric law: P(d) = C(D,d) C(N-D,n-d) / C(N,n), D = defective items in the lot. Acceptance probability Pa = sum_{d=0..c} P(d). Plotting Pa against p gives the operating-characteristic (OC) curve.
  • When n is small compared with N the binomial law C(n,d) p^d (1-p)^(n-d) is a good approximation (dashed curve).
  • Average total inspected per lot: ATI = n + (1 - Pa)(N - n).
  • Average outgoing quality: AOQ = sum_{d<=c} P(d) (D - d) / N ~ p Pa (N - n)/N; its maximum over p is the AOQL, the worst long-run quality the plan can let through.

Honest simplifications: every lot has exactly D = round(pN) defects (so the exact law is hypergeometric; real lots vary); the inspection is perfect (no missed or false defects); defects found in a sample or in a screened lot are replaced with good items; no costs or risk (alpha, beta) targets are modelled.