What does Survival Analysis for Livestream Retention conclude, in numbers, about “Classical Sources East and West: Sunzi on Spirit and Graunt's Table of Mortality”?
Answer: Chapter 7 examines the Sunzi's "keen in the morning, slack at midday, homeward in the evening" and Graunt's mortality table of 1662 (hazard in the first six years 1.46 times the mid-life level).
Scope of the numbers: Its rooms, audiences, hazard parameters, hook effects and run sheets are illustrative; all calculations are generated by its programs; the book is not individual business advice. Marked boxes separate published evidence, runnable Python calculations (18 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: 1.46
| ages | deaths | ratio | hazard/yr |
|---|---|---|---|
| 0-6 | 36 | 0.640 | 0.0744 |
| 6-16 | 24 | 0.625 | 0.0470 |
| 16-26 | 15 | 0.625 | 0.0470 |
| 26-36 | 9 | 0.640 | 0.0446 |
| 36-46 | 6 | 0.625 | 0.0470 |
| 46-56 | 4 | 0.600 | 0.0511 |
| 56-66 | 3 | 0.500 | 0.0693 |
| 66-76 | 2 | 0.333 | 0.1099 |
| mean hazard ages 6-66: 0.0510 | opening 0-6: 0.0744 | ratio 1.46 | |
| expected years lived before 76: 18.17 | |||
| if ages 0-6 had the later hazard: 73.6 alive at 6, 20.45 years |
Show the full program
# Chapter 7. p72: Graunt's 1662 table read as a hazard curve.
# Survivors out of 100 at ages 0, 6, 16 and on to 76, as printed in
# Graunt's Observations (the infant figure was his estimate and the
# middle ages were filled in by a near-geometric rule). For each
# interval: deaths, the survival ratio, and the constant yearly hazard
# that reproduces it, -ln(S2 / S1) / years. Then the expected years
# lived before 76 (trapezoid rule) and the same quantity if the opening
# interval had the hazard of the later ones.
import math
AGES = [0, 6, 16, 26, 36, 46, 56, 66, 76]
ALIVE = [100, 64, 40, 25, 16, 10, 6, 3, 1]
def hazards(ages, alive):
out = []
for i in range(len(ages) - 1):
yrs = ages[i + 1] - ages[i]
r = alive[i + 1] / alive[i]
out.append((ages[i], ages[i + 1], alive[i] - alive[i + 1], r,
-math.log(r) / yrs))
return out
def years_lived(ages, alive):
parts = [(alive[i] + alive[i + 1]) / 2.0 * (ages[i + 1] - ages[i])
for i in range(len(ages) - 1)]
return math.fsum(parts) / alive[0]
rows = hazards(AGES, ALIVE)
print(" ages deaths ratio hazard/yr")
for a, b, d, r, h in rows:
print("%3d-%-3d %8d %5.3f %8.4f" % (a, b, d, r, h))
later = [h for _, _, _, _, h in rows[1:7]]
mid = math.fsum(later) / len(later)
print("mean hazard ages 6-66: %.4f opening 0-6: %.4f ratio %.2f"
% (mid, rows[0][4], rows[0][4] / mid))
print("expected years lived before 76: %.2f" % years_lived(AGES, ALIVE))
s6 = 100 * math.exp(-6 * mid)
flat = [100, s6] + [s6 * a / 64.0 for a in ALIVE[2:]]
print("if ages 0-6 had the later hazard: %.1f alive at 6, %.2f years"
% (s6, years_lived(AGES, flat)))Single source and citation
Fan, Y. (2026). Kaplan-Meier Retention Curves for Livestream Rooms: Locating Swipe-Away Hazard Spikes and Timing the Insertion of Hooks (Version 1.0.0), Chapter 7: Classical Sources East and West: Sunzi on Spirit and Graunt's Table of Mortality. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-277 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026277,
author = {Fan, Yafu},
title = {Kaplan-Meier Retention Curves for Livestream Rooms: Locating Swipe-Away Hazard Spikes and Timing the Insertion of Hooks},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · The Blind Spot of Average Viewing Time: Censoring and the Product Limit
- Chapter 2 · From Retention to Hazard: the Nelson-Aalen Estimator and the Entry Spike
- Chapter 3 · Two Clocks: Seconds since Entry, the Programme Clock and Delayed Entry
- Chapter 4 · Piecewise-Constant Hazards: Maximum Likelihood, Likelihood Ratios and Finding the Switches
- Chapter 5 · A Model of What a Hook Does: the Window, the Aftermath and Who Stays
- Chapter 6 · Dynamic Programming for Hook Insertion: the Best Seconds for K Hooks
- Chapter 8 · Closing the Loop: a Hazard Review after Every Show and a Plan to Falsify