What does Sub-Perceptual Tryptamine Kinetics conclude, in numbers, about “Practice and a Pre-Registered Test”?

Answer: Chapter 8 gives a four-step checklist and a pre-registered double-blind trial: smallest effect of interest 0.30 SD, 282 randomised per arm, 564 in all, with blind integrity written into the decision rule. 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: It is not medical advice and is not a guide to using anything. 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.30, 282, 564

outcome = mean of 2 occasions; single-occasion reliability 0.80 -> 0.889
normal theory: n = 184.184 -> 185 per arm (attenuated d = 0.283)
simulation with integer scores and a ceiling at 70:
   n = 185/arm: power 0.881 (s.e. 0.008); active arm at ceiling 0.7%
   n = 195/arm: power 0.892 (s.e. 0.008); active arm at ceiling 0.7%
   n = 210/arm: power 0.913 (s.e. 0.007); active arm at ceiling 0.7%
   n = 225/arm: power 0.928 (s.e. 0.007); active arm at ceiling 0.7%
   smallest n with power - 2 s.e. >= 0.90: 225
   one-sided error rate with no effect: 0.025 (nominal 0.025)
Drop-out in a six-week daily-dosing protocol is higher than in a
questionnaire-only study; the plan allows 20 %:
   225 analysable per arm; 20 % loss -> 282 randomised per arm, 564 in all
sensitivity, analysable per arm (normal theory, reliability 0.89):
   SESOI \ rho        0.35    0.55    0.75
   0.20 SD             520     414     260
   0.30 SD             232     185     116
   0.40 SD             131     105      66
The trial is powered for the PRIMARY comparison only. Programme p14
showed that the belief-stratified contrast, which is the analysis that
separates pharmacology from expectancy, would need several times this
sample if the blind does not hold; it is therefore a pre-specified key
secondary reported with its interval and is not powered. The blind-
integrity check at 225 per arm can detect a correct-guess rate of about
   0.607, which is the resolution the trial has on its own blind.
Show the full program
# Chapter 8. Sample size for the pre-registered trial. Single primary
# comparison: the active condition against a matched placebo, double blind.
# Single primary outcome: the pre-specified wellbeing/affect score at week 6
# by ANCOVA (baseline, site). Planning
# assumptions: SESOI 0.30 SD, baseline-outcome correlation 0.55,
# single-occasion reliability 0.80, outcome = mean of 2 occasions, two-sided
# 0.05, 90 % power. Normal theory first, then a simulation with integer
# scoring, a ceiling, and the drop-out pattern that long daily-dosing
# protocols actually produce.
import math
import random
from statistics import NormalDist

Z = NormalDist().inv_cdf
D, RHO, REL1, K_OCC = 0.30, 0.55, 0.80, 2
ITEMS, ITEM_MAX = 14, 5           # 14 items scored 0-5: range 0-70
CEILING = ITEMS * ITEM_MAX
TRUE_MEAN, TRUE_SD = 42.0, 9.5

def reliability(k):
    return k * REL1 / (1 + (k - 1) * REL1)

def n_formula(d=D, rho_xx=1.0, rho=RHO, power=0.90, alpha=0.05):
    d_obs = d * math.sqrt(rho_xx)
    za, zb = Z(1 - alpha / 2), Z(power)
    return 2 * (za + zb) ** 2 * (1 - rho ** 2) / d_obs ** 2 + za ** 2 / 4

def invert3(S):
    a, b, c = S[0]
    d, e, f = S[1]
    g, h, i = S[2]
    det = a * (e * i - f * h) - b * (d * i - f * g) + c * (d * h - e * g)
    return [
        [(e * i - f * h) / det, (c * h - b * i) / det, (b * f - c * e) / det],
        [(f * g - d * i) / det, (a * i - c * g) / det, (c * d - a * f) / det],
        [(d * h - e * g) / det, (b * g - a * h) / det, (a * e - b * d) / det],
    ]

def one_trial(rng, n, delta_sd):
    rows = []
    delta = delta_sd * TRUE_SD
    err_sd = TRUE_SD * math.sqrt(1 - RHO ** 2)
    meas_sd = TRUE_SD * math.sqrt((1 - REL1) / REL1 / K_OCC)
    for arm in (1, 0):
        for _ in range(n):
            lat_b = rng.gauss(TRUE_MEAN, TRUE_SD)
            b = min(CEILING, max(0, round(lat_b + rng.gauss(0, meas_sd))))
            lat_y = (TRUE_MEAN + RHO * (lat_b - TRUE_MEAN) + delta * arm
                     + rng.gauss(0, err_sd))
            y = min(CEILING, max(0, round(lat_y + rng.gauss(0, meas_sd))))
            rows.append((arm, b, y))
    n2 = len(rows)
    mb = math.fsum(r[1] for r in rows) / n2
    X = [(1.0, float(r[0]), r[1] - mb) for r in rows]
    Y = [float(r[2]) for r in rows]
    S = [
        [math.fsum(x[i] * x[j] for x in X) for j in range(3)]
        for i in range(3)
    ]
    v = [math.fsum(x[i] * y for x, y in zip(X, Y)) for i in range(3)]
    inv = invert3(S)
    beta = [math.fsum(inv[i][j] * v[j] for j in range(3)) for i in range(3)]
    res = [
        y - math.fsum(bb * xx for bb, xx in zip(beta, x))
        for x, y in zip(X, Y)
    ]
    s2 = math.fsum(r * r for r in res) / (n2 - 3)
    df = n2 - 3
    z = Z(0.975)
    tcrit = z + (z ** 3 + z) / (4 * df)
    at_ceiling = sum(1 for r in rows if r[0] == 1 and r[2] == CEILING) / n
    return beta[1] / math.sqrt(s2 * inv[1][1]) > tcrit, at_ceiling

if __name__ == "__main__":
    rel = reliability(K_OCC)
    print(
        "outcome = mean of {} occasions; single-occasion reliability {:.2f}"
        " -> {:.3f}".format(K_OCC, REL1, rel)
    )
    n0 = n_formula(rho_xx=rel)
    print("normal theory: n = {:.3f} -> {} per arm (attenuated d = {:.3f})"
          .format(n0, math.ceil(n0), D * math.sqrt(rel)))

    rng = random.Random(5215)
    print(
        "\nsimulation with integer scores and a ceiling at {}:".format(
            CEILING
        )
    )
    chosen = None
    for n in sorted({math.ceil(n0), 195, 210, 225}):
        res = [one_trial(rng, n, D) for _ in range(1500)]
        pw = sum(r[0] for r in res) / len(res)
        se = math.sqrt(pw * (1 - pw) / len(res))
        ce = math.fsum(r[1] for r in res) / len(res)
        print(
            "   n = {:3d}/arm: power {:.3f} (s.e. {:.3f}); active arm at"
            " ceiling {:.1%}".format(n, pw, se, ce)
        )
        if chosen is None and pw - 2 * se >= 0.90:
            chosen = n
    if chosen is None:
        chosen = 210
    t1 = sum(one_trial(rng, chosen, 0.0)[0] for _ in range(1500)) / 1500
    print("   smallest n with power - 2 s.e. >= 0.90: {}".format(chosen))
    print(
        "   one-sided error rate with no effect: {:.3f} (nominal 0.025)"
        .format(t1)
    )

    print(
        "\nDrop-out in a six-week daily-dosing protocol is higher than in a"
    )
    print("questionnaire-only study; the plan allows 20 %:")
    plan = math.ceil(chosen / 0.80)
    print(
        "   {} analysable per arm; 20 % loss -> {} randomised per arm, {}"
        " in all".format(chosen, plan, 2 * plan)
    )

    print(
        "\nsensitivity, analysable per arm (normal theory, reliability"
        " {:.2f}):".format(rel)
    )
    print("   SESOI \\ rho        0.35    0.55    0.75")
    for d in (0.20, 0.30, 0.40):
        print("   {:4.2f} SD        ".format(d) + "".join(
            "{:8d}".format(math.ceil(n_formula(d=d, rho_xx=rel, rho=r)))
            for r in (0.35, 0.55, 0.75)))

    print(
        "\nThe trial is powered for the PRIMARY comparison only."
        " Programme p14"
    )
    print(
        "showed that the belief-stratified contrast, which is the analysis"
        " that"
    )
    print(
        "separates pharmacology from expectancy, would need several times"
        " this"
    )
    print(
        "sample if the blind does not hold; it is therefore a"
        " pre-specified key"
    )
    print(
        "secondary reported with its interval and is not powered. The blind-"
    )
    print(
        "integrity check at {} per arm can detect a correct-guess rate of"
        " about".format(chosen)
    )
    lo, hi = 0.5001, 0.95
    for _ in range(60):
        mid = 0.5 * (lo + hi)
        k = (
            (Z(0.975) * 0.5 + Z(0.90) * math.sqrt(mid * (1 - mid)))
            / (mid - 0.5)
        ) ** 2
        if k > chosen:
            lo = mid
        else:
            hi = mid
    print("   {:.3f}, which is the resolution the trial has on its own blind."
          .format(hi))

Single source and citation

Fan, Y. (2026). Biomathematical Models of Sub-Perceptual Tryptamine Pharmacokinetics, 5-HT2A Receptor Desensitisation and Neuroplastic Window Dynamics (Version 1.0.0), Chapter 8: Practice and a Pre-Registered Test. 5D Library. https://doi.org/10.5281/zenodo.24019347

DOI: 10.5281/zenodo.24019347 · Read the monograph · 5DL-B-054 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026054,
  author    = {Fan, Yafu},
  title     = {Biomathematical Models of Sub-Perceptual Tryptamine Pharmacokinetics, 5-HT2A Receptor Desensitisation and Neuroplastic Window Dynamics},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  doi       = {10.5281/zenodo.24019347},
  url       = {https://doi.org/10.5281/zenodo.24019347}
}

Other chapter answers in this book