关于「抽一成的错觉:保护力看样本件数而不看比例」,《验收抽样与到货验货》给出的定量结论是什么?

结论:第一章证明,五十件的批抽一成时,一成不良的批仍有 0.577 的概率被接收,批容许不良率从小批的 0.3600 降到大批的 0.0044;固定抽五十件时,接收概率几乎不随批量变化,大批极限为 0.736;同一季到货,固定方案只用 154 件就比抽一成的 477 件给出更均匀的保护。

数据口径:书中批量、不良率与成本均为示意参数;全部计算由书中程序生成;本书属于非个人化经营建议。 书中以标注框区分已发表的证据、可运行的 Python 计算(22 段程序)、原典与作者的假说。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.0044, 0.3600, 0.577

Ten-percent rule, c = 0: P(accept) by lot size
Nnp=0.02p=0.04p=0.10LTPD(0.10)
5050.9000.8080.5770.3600
100100.8090.6520.3300.2000
200200.6540.4240.1090.1050
500500.3450.1160.0040.0440
10001000.1190.0140.0000.0220
50005000.0000.0000.0000.0044
N=50, D=5, n=5: P(accept) = 174537/302680 = 0.5766
查看完整验算程序
# Chapter 1. p11: what the "inspect a tenth" rule really protects.
# Model: a lot of N items holds D defectives; the buyer draws n = N/10
# items without replacement and accepts the lot when no defective is
# found (c = 0). P(accept) is the exact hypergeometric probability
# C(N-D, n) / C(N, n), computed with integers and Fraction.
# Lot sizes and defect rates are illustrative.
import math
from fractions import Fraction


def defects(N, p):
    # D = p N rounded half up, with p given as a decimal string
    return int(Fraction(p) * N + Fraction(1, 2))


def p_accept(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 ltpd(N, n, c, beta):
    # smallest defect share D/N that is accepted with prob <= beta
    for D in range(0, N + 1):
        if p_accept(N, D, n, c) <= beta:
            return Fraction(D, N)
    return Fraction(1)


if __name__ == "__main__":
    rates = ("0.02", "0.04", "0.10")
    print("Ten-percent rule, c = 0: P(accept) by lot size")
    print("     N     n   p=0.02  p=0.04  p=0.10   LTPD(0.10)")
    for N in (50, 100, 200, 500, 1000, 5000):
        n = N // 10
        pa = [p_accept(N, defects(N, p), n, 0) for p in rates]
        lt = ltpd(N, n, 0, Fraction(1, 10))
        print("  {:5d}  {:4d}   {:.3f}   {:.3f}   {:.3f}    {:.4f}".format(
            N, n, float(pa[0]), float(pa[1]), float(pa[2]), float(lt)))
    N, n = 50, 5
    pa = p_accept(N, defects(N, "0.10"), n, 0)
    print("N=50, D=5, n=5: P(accept) = {} = {:.4f}".format(pa, float(pa)))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《验收抽样方案与操作特性曲线、买手到货验货抽检件数母典》第 1 章「抽一成的错觉:保护力看样本件数而不看比例」(版本 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}
}

本书其他章节结论