What does Ritual, Space and the Self conclude, in numbers, about “Practice and a Pre-Registered Test”?
Answer: Chapter 8 gives a four-step checklist and a pre-registered three-arm randomised controlled trial to be run by an independent institution (after the TSST, single primary comparison spatial transition + ritual + slow breathing versus slow breathing in the same room, single primary outcome ln RMSSD with spontaneous breathing over minutes 15–20, analysis of covariance, smallest effect of interest 0.15, 145 per arm for 90 % power and 495 recruited, decision rule written as code). Marked boxes separate published evidence, runnable Python calculations (16 programs), classical sources and the author's models and hypotheses; apart from cited literature data, all data in the book are synthetic.
Scope of the numbers: Marked boxes separate published evidence, runnable Python calculations (16 programs), classical sources and the author's models and hypotheses; apart from cited literature data, all data in the book are synthetic.
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.15, 145, 495, 90
| normal theory | 144.1 -> 145 per arm; t-corrected 144.8 -> 145 per arm |
| without the baseline covariate (rho | 0) it would be 283 per arm |
| simulation, 3,000 trials of 145 per arm: power 0.907 (mean estimate 0.150); | |
| type I error at delta | 0: 0.057 (Monte Carlo s.e. about 0.004) |
| allowing 10% loss of the primary outcome: recruit 165 per arm, 495 in three arms (1 | 1:1) |
| sensitivity: completers per arm for 90 % power | |
| SESOI (ln units) sd 0.45 sd 0.55 sd 0.65 | |
| rho .6 | .7 .8 rho .6 .7 .8 rho .6 .7 .8 |
| 0.10 (x1.105) | 273 218 154 407 325 229 569 453 320 |
| 0.15 (x1.162) | 122 97 69 181 145 102 253 202 143 |
| 0.20 (x1.221) | 69 55 39 102 82 58 143 114 80 |
Show the full program
# Sample size for the Chapter 8 trial. Primary comparison: arm 1 (spatial transition +
# fixed ritual sequence + paced breathing) vs arm 2 (paced breathing in the same room).
# Primary outcome: ln RMSSD in the 15-20 min window after the TSST, by ANCOVA with
# baseline ln RMSSD as covariate. Two-sided alpha 0.05, power 0.90. Planning values (to be
# confirmed by the independent team from its own pilot or published data): sd of the
# outcome 0.55 ln units, baseline-outcome correlation 0.70, SESOI 0.15 ln units.
# n per arm = 2 (z_{1-a/2} + z_{1-b})^2 sd^2 (1 - rho^2) / delta^2 (normal theory)
# then a t-based correction and a simulation check of the ANCOVA test.
import math, random, statistics
Z = statistics.NormalDist().inv_cdf
SD, RHO, DELTA, ATTR = 0.55, 0.70, 0.15, 0.10
def n_normal(sd, rho, delta, power=0.90):
return 2 * (Z(0.975) + Z(power)) ** 2 * sd ** 2 * (1 - rho ** 2) / delta ** 2
def t975(df): # Abramowitz-Stegun 26.7.5
z = Z(0.975)
return (z + (z ** 3 + z) / (4 * df)
+ (5 * z ** 5 + 16 * z ** 3 + 3 * z) / (96 * df ** 2))
def ancova_t(y, x, g):
n = len(y)
mx = math.fsum(x) / n; mg = math.fsum(g) / n; my = math.fsum(y) / n
sxx = math.fsum((a - mx) ** 2 for a in x); sgg = math.fsum((b - mg) ** 2 for b in g)
sxg = math.fsum((a - mx) * (b - mg) for a, b in zip(x, g))
sxy = math.fsum((a - mx) * (c - my) for a, c in zip(x, y))
sgy = math.fsum((b - mg) * (c - my) for b, c in zip(g, y))
det = sxx * sgg - sxg ** 2
bx = (sgg * sxy - sxg * sgy) / det; bg = (sxx * sgy - sxg * sxy) / det
res = math.fsum((c - my - bx * (a - mx) - bg * (b - mg)) ** 2
for a, b, c in zip(x, g, y))
s2 = res / (n - 3)
return bg, bg / math.sqrt(s2 * sxx / det)
def sim_power(n, delta, reps, seed):
rng = random.Random(seed); hits = 0; crit = t975(2 * n - 3); est = []
for _ in range(reps):
x, y, g = [], [], []
for arm in (0, 1):
for _ in range(n):
b = rng.gauss(0, SD)
e = RHO * b + math.sqrt(1 - RHO ** 2) * rng.gauss(0, SD)
x.append(b); y.append(e + delta * arm); g.append(arm)
bg, t = ancova_t(y, x, g); est.append(bg)
hits += abs(t) > crit
return hits / reps, math.fsum(est) / reps
n0 = n_normal(SD, RHO, DELTA)
n1 = n0
for _ in range(5): # replace z_{a/2} by t_{df} iteratively
df = 2 * math.ceil(n1) - 3
n1 = 2 * (t975(df) + Z(0.90)) ** 2 * SD ** 2 * (1 - RHO ** 2) / DELTA ** 2
n_arm = math.ceil(n1)
rec = math.ceil(n_arm / (1 - ATTR) / 5) * 5
print(f"normal theory: {n0:.1f} -> {math.ceil(n0)} per arm; t-corrected {n1:.1f} ->"
f" {n_arm} per arm")
print(f"without the baseline covariate (rho = 0) it would be"
f" {math.ceil(n_normal(SD, 0.0, DELTA))} per arm")
pw, mest = sim_power(n_arm, DELTA, 3000, 8)
p0, m0 = sim_power(n_arm, 0.0, 3000, 9)
print(f"simulation, 3,000 trials of {n_arm} per arm: power {pw:.3f}"
f" (mean estimate {mest:.3f});")
print(f" type I error at delta = 0: {p0:.3f} (Monte Carlo s.e. about"
f" {math.sqrt(0.05 * 0.95 / 3000):.3f})")
print(f"allowing {ATTR:.0%} loss of the primary outcome: recruit {rec} per arm,"
f" {3 * rec} in three arms (1:1:1)")
print("sensitivity: completers per arm for 90 % power")
print(" SESOI (ln units) sd 0.45 sd 0.55 sd 0.65")
print(" rho .6 .7 .8 rho .6 .7 .8 rho .6 .7 .8")
for d in (0.10, 0.15, 0.20):
cells = []
for sd in (0.45, 0.55, 0.65):
cells.append(" ".join(f"{math.ceil(n_normal(sd, r, d)):3d}"
for r in (0.6, 0.7, 0.8)))
print(f" {d:5.2f} (x{math.exp(d):.3f}) " + " ".join(cells))Single source and citation
Fan, Y. (2026). Neurobiology of Ritual, Spatial Boundary Transitions and Computational Biomedicine of Self-Transcendence (Version 1.0.0), Chapter 8: Practice and a Pre-Registered Test. 5D Library. https://doi.org/10.5281/zenodo.23839910
DOI: 10.5281/zenodo.23839910 · Read the monograph · 5DL-B-051 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026051,
author = {Fan, Yafu},
title = {Neurobiology of Ritual, Spatial Boundary Transitions and Computational Biomedicine of Self-Transcendence},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
doi = {10.5281/zenodo.23839910},
url = {https://doi.org/10.5281/zenodo.23839910}
}Other chapter answers in this book
- Chapter 1 · More Than Superstition, Less Than a Cure-All: Anxiety, Rigid Action and Precision Weighting
- Chapter 2 · Stress Axis, Breathing and Inflammation: Which Parts Are Equations and Which Are Evidence
- Chapter 3 · Walking Through a Door: the Doorway Effect, Event Boundaries and the Maps of the Hippocampus
- Chapter 4 · From Rumination to the Present: the Triple-Network Model and Salience-Network Switching
- Chapter 5 · Expectation and Learning: Open and Hidden Administration, Placebo and Conditioned Immunity
- Chapter 6 · Incense, Sound and Cost: Multisensory Integration, Breathing Rhythms and Costly Signals