What does Critical Coupling in Livestream Ordering conclude, in numbers, about “Closing the Loop: an A/B Test of the Unified Countdown, the Calculator and a Pre-Registered Protocol”?

Answer: Chapter 8 gives the A/B loop for a unified countdown, the Livestream Synchrony Order-Parameter Calculator, and a pre-registered protocol (26 sessions per arm under illustrative parameters, simulated power 0.907). Marked boxes separate published evidence, runnable Python calculations (20 programs), classical sources and the author's hypotheses.

Scope of the numbers: Chapter 8 gives the A/B loop for a unified countdown, the Livestream Synchrony Order-Parameter Calculator, and a pre-registered protocol (26 sessions per arm under illustrative parameters, simulated power 0.907). Marked boxes separate published evidence, runnable Python calculations (20 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: 0.907, 26

pilot: mean R2adj A 0.0728, B 0.0385
gap 0.0342, pooled sd 0.0438, z sum 2.8016
sessions per arm n26
simulated power at n26: 0.907
if the true gap were 0.02: n76 per arm
if the true gap were 0.03: n34 per arm
if the true gap were 0.05: n13 per arm
Show the full program
# Chapter 8. p82: How many sessions the pre-registered A/B test needs.
# Model: the unit is a session; the outcome is its R2adj (p81). Arm A
# (unified countdown) has a cluster share drawn from N(0.30, 0.08), arm B
# from N(0.20, 0.08), clipped to [0, 1]; each session has 150 orders.
# A pilot of 400 simulated sessions per arm estimates the mean gap and
# the sd of R2adj; the normal-approximation size per arm is
#   n = 2 (z_0.975 + z_0.80)^2 sd^2 / gap^2.
# 300 simulated trials at that size (two-sided z test, 5 %) check power.
# Shares, sizes and spreads are illustrative; fixed seed.
import math
import random
import statistics

PERIOD, LEN, ORDERS = 300, 3600, 150
rng = random.Random(20261124)


def session(share):
    share = min(1.0, max(0.0, share))
    ph = []
    for _ in range(ORDERS):
        if rng.random() < share:
            ph.append(rng.vonmisesvariate(2 * math.pi * 45 / PERIOD, 4.0))
        else:
            ph.append(rng.uniform(0, 2 * math.pi))
    x = math.fsum(math.cos(a) for a in ph) / ORDERS
    y = math.fsum(math.sin(a) for a in ph) / ORDERS
    return (ORDERS * (x * x + y * y) - 1) / (ORDERS - 1)


def arm(mean, k):
    return [session(rng.gauss(mean, 0.08)) for _ in range(k)]


pa, pb = arm(0.30, 400), arm(0.20, 400)
gap = statistics.fmean(pa) - statistics.fmean(pb)
sd = math.sqrt((statistics.variance(pa) + statistics.variance(pb)) / 2)
z = statistics.NormalDist()
za, zb = z.inv_cdf(0.975), z.inv_cdf(0.80)
n = math.ceil(2 * (za + zb) ** 2 * sd * sd / (gap * gap))
print("pilot: mean R2adj A %.4f, B %.4f" % (statistics.fmean(pa),
                                           statistics.fmean(pb)))
print("gap %.4f, pooled sd %.4f, z sum %.4f" % (gap, sd, za + zb))
print("sessions per arm n = %d" % n)
hits = 0
for _ in range(300):
    a, b = arm(0.30, n), arm(0.20, n)
    se = math.sqrt((statistics.variance(a) + statistics.variance(b)) / n)
    if abs(statistics.fmean(a) - statistics.fmean(b)) / se > za:
        hits += 1
print("simulated power at n = %d: %.3f" % (n, hits / 300))
for g2 in (0.02, 0.03, 0.05):
    print("if the true gap were %.2f: n = %d per arm"
          % (g2, math.ceil(2 * (za + zb) ** 2 * sd * sd / (g2 * g2))))

Single source and citation

Fan, Y. (2026). Kuramoto Coupled-Oscillator Synchrony: the Collective-Ordering Phase Transition in Hundred-Viewer Livestreams and the Critical Coupling of Rhythmic Entrainment (Version 1.0.0), Chapter 8: Closing the Loop: an A/B Test of the Unified Countdown, the Calculator and a Pre-Registered Protocol. 5D Library. DOI pending

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

BibTeX
@book{fan2026239,
  author    = {Fan, Yafu},
  title     = {Kuramoto Coupled-Oscillator Synchrony: the Collective-Ordering Phase Transition in Hundred-Viewer Livestreams and the Critical Coupling of Rhythmic Entrainment},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book