What does Acceptance Sampling for Buyers conclude, in numbers, about “Double Sampling and the Average Sample Number: Look at a Few, Then More If Needed”?

Answer: Chapter 5 shows that double sampling with the same protection inspects only 103.2 items on average, 28.8 fewer than the single plan.

Scope of the numbers: Lot sizes, defect shares and costs are illustrative; all calculations are generated by the book's programs; the book is general business analysis, not individualised business advice. Marked boxes separate published evidence, runnable Python calculations (22 programs), classical sources and the author's hypotheses.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 103.2, 28.8

n1c1n2c2ASN(0.01)ASN(0.05)Pa(0.01)Pa(0.05)
690693103.2104.60.95200.0949
881884107.2130.90.97240.0953
7911585108.6190.80.97720.0991
5801164109.2149.10.97210.0967
8211646114.5214.00.99030.0996
single plan n = 132, c = 3; double saves 28.8 items at p = 0.01
Show the full program
# Chapter 5. p51: a double plan with the same two risks, fewer items.
# Model: binomial. Draw n1; accept if d1 <= c1, reject if d1 > c2;
# otherwise draw n2 more and accept if d1 + d2 <= c2. Then
# Pa = P(d1 <= c1) + sum over c1 < k <= c2 of P(d1 = k) P(d2 <= c2-k)
# and ASN = n1 + n2 P(c1 < d1 <= c2). Search n2 = n1 or 2 n1 for the
# plan meeting Pa(0.01) >= 0.95 and Pa(0.05) <= 0.10 with the least
# ASN at p = 0.01 (best n1 kept for each c1, c2, n2 / n1).
# The single plan n = 132, c = 3 comes from p31.
import math


def pmf(n, k, p):
    return math.comb(n, k) * p ** k * (1 - p) ** (n - k)


def cdf(n, k, p):
    if k < 0:
        return 0.0
    return math.fsum(pmf(n, j, p) for j in range(min(k, n) + 1))


def double(p, n1, c1, n2, c2):
    first = cdf(n1, c1, p)
    mid = [pmf(n1, k, p) * cdf(n2, c2 - k, p)
           for k in range(c1 + 1, c2 + 1)]
    go = math.fsum(pmf(n1, k, p) for k in range(c1 + 1, c2 + 1))
    return first + math.fsum(mid), n1 + n2 * go


if __name__ == "__main__":
    best = {}
    for c1 in range(0, 4):
        for c2 in range(c1 + 1, 9):
            for k in (1, 2):
                for n1 in range(c2 + 1, 140):
                    a, asn = double(0.01, n1, c1, k * n1, c2)
                    b, _ = double(0.05, n1, c1, k * n1, c2)
                    row = (round(asn, 6), n1, c1, k * n1, c2)
                    key = (c1, c2, k)
                    if a >= 0.95 and b <= 0.10:
                        if key not in best or row < best[key]:
                            best[key] = row
    best = sorted(best.values())
    print("  n1  c1   n2  c2   ASN(0.01)  ASN(0.05)  Pa(0.01)  Pa(0.05)")
    for asn, n1, c1, n2, c2 in best[:5]:
        a, _ = double(0.01, n1, c1, n2, c2)
        b, asn5 = double(0.05, n1, c1, n2, c2)
        print("  {:3d}  {}   {:3d}   {}    {:6.1f}     {:6.1f}    {:.4f}"
              "    {:.4f}".format(n1, c1, n2, c2, asn, asn5, a, b))
    asn, n1, c1, n2, c2 = best[0]
    print("single plan n = 132, c = 3; double saves {:.1f} items at "
          "p = 0.01".format(132 - asn))

Single source and citation

Fan, Y. (2026). Acceptance Sampling Plans and Operating-Characteristic Curves: How Many Items a Buyer Must Inspect on Arrival (Version 1.0.0), Chapter 5: Double Sampling and the Average Sample Number: Look at a Few, Then More If Needed. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-329 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026329,
  author    = {Fan, Yafu},
  title     = {Acceptance Sampling Plans and Operating-Characteristic Curves: How Many Items a Buyer Must Inspect on Arrival},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book