What does Agarwood Volatiles and Olfactory Adaptation conclude, in numbers, about “Closing the Loop: a Shop Scheduling Log, a Pre-Registered Test and Authenticity Checks”?

Answer: Chapter 8 gives a shop-level loop, the distilled tool Scent Scheduler, a pre-registered protocol (459 trading days if purchases are the outcome) and the logic of authenticity checks (sinking in water has a likelihood ratio of only 1.75). Marked boxes separate published evidence, runnable Python calculations (21 programs), classical sources and the author's hypotheses.

Scope of the numbers: Its rooms, wood, heaters and adaptation parameters are illustrative; all calculations are generated by its programs; it is general rather than individualised business guidance, does not discuss health effects and is not medical advice. Marked boxes separate published evidence, runnable Python calculations (21 programs), classical sources and the author's hypotheses.

中文版

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: 459

z_alpha 1.960, z_beta 0.842
baseliftn per armvisits totaldays at 6/day (ICC 0.02)
0.150.0324024804881
0.150.059061812333
0.150.08377754139
0.250.03339767941246
0.250.0512512502459
0.250.085041008185
0.350.03404280841483
0.350.0514712942540
0.350.085831166214
design effect for day-level randomisation: 1.10
Show the full program
# Chapter 8. p81: how many visits a pre-registered shop test needs.
# Design: each appointment is randomised to schedule A (chip on the
# heater all day) or schedule B (chip lit 15 minutes before arrival,
# p61). Outcome: purchase within the visit (yes / no). Two-sided test
# of two proportions, alpha 0.05, power 0.80, normal approximation:
#   n per arm = (z_a sqrt(2 pbar qbar) + z_b sqrt(p1 q1 + p2 q2))^2
#               / (p1 - p2)^2.
# If whole days are randomised instead, inflate by the design effect
# 1 + (m - 1) ICC with m = 6 visits a day. Baselines, lifts and the
# ICC of 0.02 are illustrative (示意).
import math
from statistics import NormalDist

Z = NormalDist()
ZA, ZB = Z.inv_cdf(1 - 0.05 / 2), Z.inv_cdf(0.80)


def n_arm(p1, p2):
    pb = (p1 + p2) / 2
    num = ZA * math.sqrt(2 * pb * (1 - pb)) + \
        ZB * math.sqrt(p1 * (1 - p1) + p2 * (1 - p2))
    return math.ceil(num * num / (p1 - p2) ** 2)


print("z_alpha {:.3f}, z_beta {:.3f}".format(ZA, ZB))
print("base   lift   n per arm  visits total  days at 6/day (ICC 0.02)")
de = 1 + (6 - 1) * 0.02
for p1 in (0.15, 0.25, 0.35):
    for lift in (0.03, 0.05, 0.08):
        n = n_arm(p1, p1 + lift)
        days = math.ceil(2 * n * de / 6)
        print("{:4.2f}  {:5.2f}  {:9d}  {:12d}  {:9d}".format(
            p1, lift, n, 2 * n, days))
print("design effect for day-level randomisation: {:.2f}".format(de))

Single source and citation

Fan, Y. (2026). Agarwood Sesquiterpene Volatilisation, Combinatorial Olfactory-Receptor Coding and the Time Constant of Olfactory Adaptation (Version 1.0.0), Chapter 8: Closing the Loop: a Shop Scheduling Log, a Pre-Registered Test and Authenticity Checks. 5D Library. DOI pending

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

BibTeX
@book{fan2026205,
  author    = {Fan, Yafu},
  title     = {Agarwood Sesquiterpene Volatilisation, Combinatorial Olfactory-Receptor Coding and the Time Constant of Olfactory Adaptation},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book