关于「买手到货验货表与证伪方案」,《验收抽样与到货验货》给出的定量结论是什么?
结论:第八章给出买手到货验货表、蒸馏小工具「验货抽样方案计算器」与预注册检验方案。书中以标注框区分已发表的证据、可运行的 Python 计算(22 段程序)、原典与作者的假说。
数据口径:书中批量、不良率与成本均为示意参数;全部计算由书中程序生成;本书属于非个人化经营建议。 书中以标注框区分已发表的证据、可运行的 Python 计算(22 段程序)、原典与作者的假说。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库
| barrier p = 0.10 at risk 0.10; process average 0.02 | ||||||
| N | n | c | tenth | Pa(0.02) | AOQL | ATI |
| 24 | 17 | 0 | 2 | 1.0000 | 0.0122 | 17.0 |
| 60 | 30 | 1 | 6 | 1.0000 | 0.0186 | 30.0 |
| 150 | 47 | 2 | 15 | 0.9706 | 0.0230 | 50.0 |
| 400 | 63 | 3 | 40 | 0.9760 | 0.0276 | 71.1 |
| 1000 | 77 | 4 | 100 | 0.9853 | 0.0314 | 90.6 |
| 3000 | 90 | 5 | 300 | 0.9916 | 0.0346 | 114.4 |
查看完整验算程序
# Chapter 8. p81: the buyer's inbound inspection table.
# Model: for each lot size, the Dodge-Romig style single plan of p72
# with a shop-level barrier: lots with 0.10 defective accepted with
# prob <= 0.10, least ATI at the process average 0.02; then the
# exact AOQL (rectifying, D up to 0.4 N) and P(accept) at 0.02.
# Exact hypergeometric; D rounded half up. Parameters illustrative.
import math
from fractions import Fraction
def defects(N, p):
return int(Fraction(p) * N + Fraction(1, 2))
def hyper(N, D, n, c):
num = 0
for d in range(0, min(c, D, n) + 1):
num += math.comb(D, d) * math.comb(N - D, n - d)
return Fraction(num, math.comb(N, n))
def aoq(N, D, n, c):
num = 0
for d in range(0, min(c, D, n) + 1):
num += math.comb(D, d) * math.comb(N - D, n - d) * (D - d)
return Fraction(num, math.comb(N, n) * N)
def best_plan(N, pt, beta, pbar, cmax=8):
Dt, Db = defects(N, pt), defects(N, pbar)
rows = []
for c in range(0, cmax + 1):
if c >= Dt:
break
n = c + 1
while n <= N and hyper(N, Dt, n, c) > beta:
n += 1
if n > N:
break
pa = hyper(N, Db, n, c)
rows.append((n + (1 - pa) * (N - n), n, c))
return min(rows)
if __name__ == "__main__":
beta = Fraction(1, 10)
print("barrier p = 0.10 at risk 0.10; process average 0.02")
print(" N n c tenth Pa(0.02) AOQL ATI")
for N in (24, 60, 150, 400, 1000, 3000):
ati, n, c = best_plan(N, "0.10", beta, "0.02")
top = int(0.4 * N)
q = max(aoq(N, D, n, c) for D in range(0, top + 1))
pa = hyper(N, defects(N, "0.02"), n, c)
print(" {:5d} {:3d} {:2d} {:4d} {:.4f} {:.4f} {:6.1f}"
.format(N, n, c, N // 10, float(pa), float(q), float(ati)))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《验收抽样方案与操作特性曲线、买手到货验货抽检件数母典》第 8 章「买手到货验货表与证伪方案」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 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}
}