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
| n1 | c1 | n2 | c2 | ASN(0.01) | ASN(0.05) | Pa(0.01) | Pa(0.05) |
| 69 | 0 | 69 | 3 | 103.2 | 104.6 | 0.9520 | 0.0949 |
| 88 | 1 | 88 | 4 | 107.2 | 130.9 | 0.9724 | 0.0953 |
| 79 | 1 | 158 | 5 | 108.6 | 190.8 | 0.9772 | 0.0991 |
| 58 | 0 | 116 | 4 | 109.2 | 149.1 | 0.9721 | 0.0967 |
| 82 | 1 | 164 | 6 | 114.5 | 214.0 | 0.9903 | 0.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
- Chapter 1 · The Illusion of the Tenth: Protection Follows the Count, Not the Share
- Chapter 2 · The Hypergeometric Operating-Characteristic Curve: Acceptance Probabilities Computed Item by Item
- Chapter 3 · Two Risks at Once: Searching for the Smallest Sample and Acceptance Number
- Chapter 4 · Average Outgoing Quality and Its Limit: What Remains after Rejected Lots Are Screened
- Chapter 6 · The Expected Cost of Inbound Inspection: How Many Items Are Worth Checking
- Chapter 7 · Eastern and Western Sources: the Qin Statute That Like Vessels Must Match, and the Protection Constraint of Dodge and Romig
- Chapter 8 · The Buyer's Receiving Sheet and a Plan to Refute the Book