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) | |||||
| test | sens | prior | PPV | NPV | flags per 100 |
| one marker | 0.050 | 0.05 | 0.050 | 0.950 | 5.0 |
| one marker | 0.050 | 0.20 | 0.200 | 0.800 | 5.0 |
| one marker | 0.050 | 0.40 | 0.400 | 0.600 | 5.0 |
| two markers | 0.488 | 0.05 | 0.339 | 0.972 | 7.2 |
| two markers | 0.488 | 0.20 | 0.709 | 0.881 | 13.8 |
| two markers | 0.488 | 0.40 | 0.867 | 0.736 | 22.5 |
| two + retained | 1.000 | 0.05 | 0.513 | 1.000 | 9.7 |
| two + retained | 1.000 | 0.20 | 0.833 | 1.000 | 24.0 |
| two + retained | 1.000 | 0.40 | 0.930 | 1.000 | 43.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
- Chapter 1 · First-Order Kinetics: the Loss of Ester Catechins and the Gain of Gallic Acid
- Chapter 2 · Consecutive Reactions and the Peak of Aged Character: Why "Older Is Better" Is Not Monotonic in Chemistry
- Chapter 3 · Arrhenius and the Wet Store: How Many Dry Years a Few Hot, Humid Years Are Worth
- Chapter 4 · Store Logs and Equivalent Age: Seasonal Swings, Humidity Corrections and Storage Histories
- Chapter 5 · Two-Marker Inversion: Separating Time from Heat
- Chapter 7 · Eastern and Western Sources Examined: Lu Yu's Tea Classic and Arrhenius 1889
- Chapter 8 · Closing the Loop: Storage Logs for Collected Tea and a Pre-Registered Test