关于「实证闭环:每场直播的风险曲线复盘与证伪方案」,《直播间留存的生存分析》给出的定量结论是什么?
结论:第八章给出每场复盘流程、划走尖峰钩子排程器与预注册检验方案,预期风险比 0.718。书中以标注框区分已发表的证据、可运行的 Python 计算(18 段程序)、原典与作者的假说。
数据口径:书中的直播间、观众数、风险参数、钩子效果与节目单均为示意;全部计算由书中程序生成;本书是非个人化经营建议,钩子只能是真实的内容或写明真实库存与真实截止时刻的福利,不用会重置的倒计时,不诱导未成年人消费,平台规则以官方公示为准。 第一章说明截尾让平均停留偏低:示意直播间里把下播当离开得 408.1 秒,只算已离开者得 278.0 秒,乘积极限估计的限定平均停留是 337.9 秒。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.718
| room R (p41): switch windows 311 exits / 45089 viewer-s, rest 781 / 1081624 | |||||
| mean window multiplier: arm S 0.700 | arm U 0.975 | HR 0.718 | |||
| HR | power | events | streams, both arms: ICC 0 | 0.005 | 0.02 | |
| 0.90 | 0.8 | 2829 | | 10 | 24 | 66 |
| 0.90 | 0.9 | 3787 | | 13 | 32 | 88 |
| 0.80 | 0.8 | 631 | | 3 | 6 | 15 |
| 0.80 | 0.9 | 845 | | 3 | 7 | 20 |
| 0.72 | 0.8 | 291 | | 1 | 3 | 7 |
| 0.72 | 0.9 | 390 | | 2 | 4 | 10 |
| 0.60 | 0.8 | 121 | | 1 | 1 | 3 |
| 0.60 | 0.9 | 162 | | 1 | 2 | 4 |
查看完整验算程序
# Chapter 8. p82: how many streams does the pre-registered test need?
# Contrast: settled-viewer exits inside the five switch windows, under
# the scheduled hooks (arm S) versus hooks every 20 minutes at a random
# phase (arm U). Expected hazard ratio from the hook model: arm S covers
# 3 of 5 windows at rho = 0.5; arm U covers a window only when a hook
# happens to run through it. Events needed (Schoenfeld 1983, equal
# arms): d = 4 (z_a + z_b)^2 / (ln HR)^2. Streams, not viewers, are
# randomised, so d is inflated by the design effect 1 + (m - 1) ICC,
# m = switch-window exits per stream (311 in room R, from p41).
import math
import statistics
SWITCH = [180, 900, 1260, 1980, 2700] # 环节切换秒数(示意)
SPIKE_LEN, W, RHO = 30, 60, 0.5
M = 311 # 每场切换窗口退出数(p41)
COUNTS = (311, 45089, 781, 1081624) # p41 两档的离开数与人秒
nd = statistics.NormalDist()
def covered(starts, s):
# 钩子窗口与切换窗口重叠的秒数占比
sec = [t for t in range(s, s + SPIKE_LEN)
if any(a <= t < a + W for a in starts)]
return len(sec) / SPIKE_LEN
def mult(starts):
return math.fsum(1.0 - RHO * covered(starts, s)
for s in SWITCH) / len(SWITCH)
arm_s = mult([870, 1230, 1950])
arm_u = math.fsum(mult([ph, ph + 1200, ph + 2400])
for ph in range(0, 1200)) / 1200.0
hr = arm_s / arm_u
print("room R (p41): switch windows %d exits / %d viewer-s, rest %d / %d"
% COUNTS)
print("mean window multiplier: arm S %.3f arm U %.3f HR %.3f"
% (arm_s, arm_u, hr))
def events(h, power, alpha=0.05):
za = nd.inv_cdf(1 - alpha / 2)
zb = nd.inv_cdf(power)
return 4.0 * (za + zb) ** 2 / math.log(h) ** 2
print(" HR power events | streams, both arms: ICC 0 0.005 0.02")
for h in (0.9, 0.8, round(hr, 2), 0.6):
for pw in (0.8, 0.9):
d = events(h, pw)
row = [math.ceil(d * (1 + (M - 1) * icc) / M)
for icc in (0.0, 0.005, 0.02)]
print("%5.2f %5.1f %6d | %24d %5d %4d"
% (h, pw, math.ceil(d), row[0], row[1], row[2]))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《直播间留存卡普兰迈耶生存曲线、划走风险尖峰定位与福利钩子插入秒数母典》第 8 章「实证闭环:每场直播的风险曲线复盘与证伪方案」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 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}
}