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 | ||||
| base | lift | n per arm | visits total | days at 6/day (ICC 0.02) |
| 0.15 | 0.03 | 2402 | 4804 | 881 |
| 0.15 | 0.05 | 906 | 1812 | 333 |
| 0.15 | 0.08 | 377 | 754 | 139 |
| 0.25 | 0.03 | 3397 | 6794 | 1246 |
| 0.25 | 0.05 | 1251 | 2502 | 459 |
| 0.25 | 0.08 | 504 | 1008 | 185 |
| 0.35 | 0.03 | 4042 | 8084 | 1483 |
| 0.35 | 0.05 | 1471 | 2942 | 540 |
| 0.35 | 0.08 | 583 | 1166 | 214 |
| 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
- Chapter 1 · A Trillion Smells? Re-deriving the Bushdid Estimator and Its Two Rebuttals
- Chapter 2 · Combinatorial Receptor Codes and the Dimensionality of Odour Space: Why Four Hundred Receptors Do Not Buy an Astronomical Number of Smells
- Chapter 3 · Off the Ember: First-Order Release Kinetics of Agarwood Volatiles and a Temperature Scale
- Chapter 4 · A Room Is a Reactor: Well-Mixed Ventilation and the Surface Sink
- Chapter 5 · The Time Constant of Adaptation: Why the Host Cannot Smell His Own Incense
- Chapter 6 · Light It Before the Guest Arrives: a Lead-Time Rule, a Rule Map and a Day's Ledger
- Chapter 7 · Classical Sources East and West: Chen Jing's Chen Shi Xiang Pu and Theophrastus' On Odours