关于「年份误报检出:似然比、区间与基础比率」,《普洱陈化动力学与等效年龄》给出的定量结论是什么?

结论:第六章给出年份声称的似然比检验:没有同批留样时,对「湿仓冒充干仓」的检出功效只有 0.488,在误报占 0.05 的市场里一次报警的阳性预测值仅 0.339,有留样后功效升至 1.000。

数据口径:书中参数为示意;全部计算由书中程序生成;本书不谈饮茶的任何保健或其他身体作用,也不是个人化投资建议。 第一章给出一级衰减,示意半衰期 8.66 年,并说明十年数据分不清曲线形状。

English version

对照数据表

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

specificity 0.95 (size 0.05)
testsenspriorPPVNPVflags per 100
one marker0.0500.050.0500.9505.0
one marker0.0500.200.2000.8005.0
one marker0.0500.400.4000.6005.0
two markers0.4880.050.3390.9727.2
two markers0.4880.200.7090.88113.8
two markers0.4880.400.8670.73622.5
two + retained1.0000.050.5131.0009.7
two + retained1.0000.200.8331.00024.0
two + retained1.0000.400.9301.00043.0
one marker: PPV equals the prior, the test carries no news
log10 LR of a flag, two markers: 0.99
查看完整验算程序
# Chapter 6. p63: base rates decide what a positive test is worth.
# A screen flags a cake as "vintage misstated" when the two-marker
# statistic exceeds the size-0.05 cut (specificity 0.95). Sensitivity
# is the power against the matched wet history of p61 (15 y dry claimed,
# about 3.28 y at 30 C 80 % RH true), recomputed here with the same
# model: one assay without a retained sample, four with one. Prior share
# of misstated cakes in a lot is illustrative.
# PPV = P(misstated | flag), NPV = P(as claimed | clear).
import math
import statistics

R = 8.314
TR = 293.15
K1, K2, EA1, EA2, B = 0.08, 0.03, 60.0, 100.0, 0.030
ND = statistics.NormalDist()
Z = ND.inv_cdf(0.95)


def xs(years, t_c, h):
    def f(ea):
        return math.exp(ea * 1000.0 / R * (1.0 / TR - 1.0 / (t_c + 273.15)))
    hf = math.exp(B * (h - 60.0))
    return (K1 * f(EA1) * hf * years, K2 * f(EA2) * hf * years)


def two_marker_power(sd_raw, n):
    h0 = xs(15, 18.0, 62.0)
    wet = h0[0] / xs(1, 30.0, 80.0)[0]
    h1 = xs(wet, 30.0, 80.0)
    s = math.sqrt(sd_raw ** 2 + 0.05 ** 2 / n)
    return ND.cdf(math.hypot(h1[0] - h0[0], h1[1] - h0[1]) / s - Z)


def ppv_npv(sens, spec, prior):
    tp, fp = sens * prior, (1 - spec) * (1 - prior)
    fn, tn = (1 - sens) * prior, spec * (1 - prior)
    return tp / (tp + fp), tn / (tn + fn)


if __name__ == "__main__":
    tests = (("one marker", 0.050), ("two markers",
                                     two_marker_power(0.20, 1)),
             ("two + retained", two_marker_power(0.05, 4)))
    print("specificity 0.95 (size 0.05)")
    print("  test             sens    prior   PPV     NPV    flags per 100")
    for name, sens in tests:
        for prior in (0.05, 0.20, 0.40):
            ppv, npv = ppv_npv(sens, 0.95, prior)
            flags = 100 * (sens * prior + 0.05 * (1 - prior))
            print("  {:<15} {:.3f}   {:.2f}   {:.3f}   {:.3f}   {:5.1f}"
                  .format(name, sens, prior, ppv, npv, flags))
    print("one marker: PPV equals the prior, the test carries no news")
    print("log10 LR of a flag, two markers: {:.2f}".format(
        math.log10(two_marker_power(0.20, 1) / 0.05)))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《普洱陈化一级动力学与仓储温湿度、等效陈化年龄与年份误报检出母典》第 6 章「年份误报检出:似然比、区间与基础比率」(版本 1.0.0). 5D Library. DOI 待发布

DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-330 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026330,
  author    = {Fan, Yafu},
  title     = {First-Order Ageing Kinetics of Pu-erh Tea under Storage Temperature and Humidity: Equivalent Age and the Detection of Misstated Vintages},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

本书其他章节结论