What does The Sleep Debt of Afternoon Tea conclude, in numbers, about “Closing the Loop: Menu Labels, a Fourteen-Night A/B Test and Pre-Registered Refutation”?

Answer: Chapter 8 gives caffeine labels for a shop, a fourteen-night personal trial (one person can detect only differences above about 22.5 minutes, with a power of just 0.205 for 9.1 minutes), a pre-registered protocol, the conditions that would refute the book, and the distilled tool, the Caffeine Cutoff Calculator. The book contains 22 programs.

Scope of the numbers: Except where a source is named, its parameters are illustrative; all calculations are generated by its programs. The book is not medical advice and claims no health effect; anyone planning a self-experiment should first consult a licensed physician.

中文版

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.205, 22.5, 9.1

z_alpha 1.960, z_beta 0.842; SD_W 15, SD_B 5 min
effect_min nights/arm(one person) people(14 nights each)
5.0142 29
9.143 9
15.016 4
one person, 7 v 7 nights: SE 8.02 min, detectable 22.5 min
power of one 14-night test for 9.1 min0.205
pooled SD per person9.45 min
Show the full program
# Chapter 8. p82: how many nights, how many people, for a cut-off A/B test
# 结局:入睡潜伏期(分钟)。目标效应取 Gardiner 2023 的合并值 9.1 分钟,
# 另看 5 与 15 分钟。个人夜间波动 SD_W = 15 分钟、人与人之间效应的
# SD_B = 5 分钟,均为示意。单人:两组夜晚独立,每组所需夜数
# n = 2 (z_a + z_b)^2 SD_W^2 / d^2。多人:每人 14 夜(各 7 夜),个人差值
# 的方差为 SD_W^2 (2/7) + SD_B^2,所需人数按配对 z 近似。alpha 0.05 双侧,
# 把握度 0.80。
import math
from statistics import NormalDist

SD_W, SD_B, NIGHTS = 15.0, 5.0, 7
ZA = NormalDist().inv_cdf(0.975)
ZB = NormalDist().inv_cdf(0.80)
print("z_alpha {:.3f}, z_beta {:.3f}; SD_W {:.0f}, SD_B {:.0f} min".format(
    ZA, ZB, SD_W, SD_B))
print("effect_min  nights/arm(one person)  people(14 nights each)")
for d in (5.0, 9.1, 15.0):
    n1 = 2.0 * (ZA + ZB) ** 2 * SD_W ** 2 / d ** 2
    var_p = SD_W ** 2 * (2.0 / NIGHTS) + SD_B ** 2
    n2 = (ZA + ZB) ** 2 * var_p / d ** 2
    print("{:>10.1f}  {:>22}  {:>22}".format(d, math.ceil(n1),
                                             math.ceil(n2)))
se1 = SD_W * math.sqrt(2.0 / NIGHTS)
print("one person, 7 v 7 nights: SE {:.2f} min, detectable {:.1f} min"
      .format(se1, (ZA + ZB) * se1))
pw = NormalDist().cdf(9.1 / se1 - ZA)
print("power of one 14-night test for 9.1 min: {:.3f}".format(pw))
print("pooled SD per person: {:.2f} min".format(math.sqrt(
    math.fsum([SD_W ** 2 * 2.0 / NIGHTS, SD_B ** 2]))))

Single source and citation

Fan, Y. (2026). Caffeine-Theanine Pharmacokinetics, Adenosine-Receptor Half-Lives and the Sleep Debt of Afternoon Tea (Version 1.0.0), Chapter 8: Closing the Loop: Menu Labels, a Fourteen-Night A/B Test and Pre-Registered Refutation. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-186 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026186,
  author    = {Fan, Yafu},
  title     = {Caffeine-Theanine Pharmacokinetics, Adenosine-Receptor Half-Lives and the Sleep Debt of Afternoon Tea},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book