What does Pu-erh Ageing Kinetics and Equivalent Age conclude, in numbers, about “Detecting Misstated Vintages: Likelihood Ratios, Intervals and Base Rates”?

Answer: Chapter 6 gives a likelihood-ratio test of claimed vintages: without a retained sample of the batch the power against wet tea passed off as dry is only 0.488, and in a market where misstatement runs at 0.05 a flag has a positive predictive value of just 0.339, while with a retained sample the power rises to 1.000.

Scope of the numbers: Its parameters are illustrative; all calculations are generated by its programs; the book makes no claim of any wellbeing or other bodily effect of tea and is not personalised investment advice. Chapter 1 gives first-order loss with an illustrative half-life of 8.66 years and shows that ten years of data cannot tell curve shapes apart.

中文版

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: 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
Show the full program
# 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)))

Single source and citation

Fan, Y. (2026). First-Order Ageing Kinetics of Pu-erh Tea under Storage Temperature and Humidity: Equivalent Age and the Detection of Misstated Vintages (Version 1.0.0), Chapter 6: Detecting Misstated Vintages: Likelihood Ratios, Intervals and Base Rates. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 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}
}

Other chapter answers in this book