What does Koopman Modes for Audience Turning Points conclude, in numbers, about “Closing the Empirical Loop: a Mode Fit Every Five Minutes, a Cooling Warning and a Pre-Registered Test”?
Answer: Chapter 8 gives the five-minute fitting procedure, the Online-Curve Turning-Point Early Warner and a pre-registered test plan: a lead difference of 3 minutes needs 51 sessions and the false-alarm test needs 68. Marked boxes separate published evidence, runnable Python calculations (19 programs), classical sources and the author's hypotheses.
Scope of the numbers: Marked boxes separate published evidence, runnable Python calculations (19 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: 19, 51, 68
| Test 1: paired lead gain, sd 7.58 min | |
| delta 2 min: n | 113 sessions (23 weeks at 5 a week) |
| delta 3 min: n | 51 sessions (11 weeks at 5 a week) |
| delta 5 min: n | 19 sessions (4 weeks at 5 a week) |
| Test 2: premature share < 0.15 if true share is 0.055 | |
| n | 68 sessions; reject when at most 5 are premature |
| size 0.0465, power 0.8296 |
Show the full program
# Chapter 8. p82: how many sessions a pre-registered test needs.
# Test 1 (lead time): paired difference "DMD lead minus 12-minute-average
# lead" per session; planning sd 7.58 minutes taken from p51 output;
# two-sided alpha 0.05, power 0.8, normal approximation
# n = ((z(0.975) + z(0.8)) * sd / delta)^2 for delta = 2, 3, 5 minutes.
# Test 2 (premature warnings): one-sided exact binomial test that the
# share of warnings more than 15 minutes early is below 0.15, if its true
# value is 0.055 (p51); smallest n with power 0.8 at alpha 0.05.
import math
import statistics
z = statistics.NormalDist()
za, zb = z.inv_cdf(0.975), z.inv_cdf(0.8)
sd = 7.58
print("Test 1: paired lead gain, sd %.2f min" % sd)
for delta in (2.0, 3.0, 5.0):
n = math.ceil(((za + zb) * sd / delta) ** 2)
print(" delta %.0f min: n = %d sessions (%d weeks at 5 a week)"
% (delta, n, math.ceil(n / 5)))
def cdf(k, n, p):
return math.fsum(math.comb(n, i) * p ** i * (1 - p) ** (n - i)
for i in range(k + 1))
p0, p1 = 0.15, 0.055
for n in range(10, 400):
k = -1
while k + 1 <= n and cdf(k + 1, n, p0) <= 0.05:
k += 1
if k >= 0 and cdf(k, n, p1) >= 0.8:
break
print("Test 2: premature share < %.2f if true share is %.3f" % (p0, p1))
print(" n = %d sessions; reject when at most %d are premature" % (n, k))
print(" size %.4f, power %.4f" % (cdf(k, n, p0), cdf(k, n, p1)))Single source and citation
Fan, Y. (2026). Koopman Operators and Dynamic Mode Decomposition: Linearising Nonlinear Cash-Flow Swings and Forecasting Turning Points in Livestream Audience Curves (Version 1.0.0), Chapter 8: Closing the Empirical Loop: a Mode Fit Every Five Minutes, a Cooling Warning and a Pre-Registered Test. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-238 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026238,
author = {Fan, Yafu},
title = {Koopman Operators and Dynamic Mode Decomposition: Linearising Nonlinear Cash-Flow Swings and Forecasting Turning Points in Livestream Audience Curves},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · Two or Three Modes: the Low-Rank Structure of a Livestream Audience Curve and the Built-In Lag of Moving Averages
- Chapter 2 · The Koopman Operator: Lifting Nonlinear Dynamics into Linear Ones, and the Limits of the Lift
- Chapter 3 · Jacobi Rotations: Symmetric Eigendecomposition and the Singular Value Decomposition with the Standard Library Alone
- Chapter 4 · Dynamic Mode Decomposition: Eigenvalues, Amplitudes and the False Decay Caused by Noise
- Chapter 5 · Lead Time at the Turning Point: a Mode-Based Warning Every Five Minutes against Moving Averages
- Chapter 6 · Cash Flow: Linearising Daily, Weekly and Monthly Swings with Modes, and Choosing the Observable
- Chapter 7 · East and West in the Sources: "Knowing the Incipient" in the Book of Changes and Fourier's Analysis of Heat