关于「两只钟:入场秒数、节目时钟与延迟进入」,《直播间留存的生存分析》给出的定量结论是什么?

结论:第三章区分两只钟:坐稳观众在节目时钟上的切换风险比平均 8.52 倍,混入新观众后被压到 4.23 倍。

数据口径:书中的直播间、观众数、风险参数、钩子效果与节目单均为示意;全部计算由书中程序生成;本书是非个人化经营建议,钩子只能是真实的内容或写明真实库存与真实截止时刻的福利,不用会重置的倒计时,不诱导未成年人消费,平台规则以官方公示为准。 第一章说明截尾让平均停留偏低:示意直播间里把下播当离开得 408.1 秒,只算已离开者得 278.0 秒,乘积极限估计的限定平均停留是 337.9 秒。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 4.23, 8.52

audience at switches180:256 900:346 1260:353 1980:402 2700:421
switch | all: pre spike ratio | settled: pre spike ratio
180 | 0.00244 0.008203.4 | 0.00089 0.00638 7.2
900 | 0.00172 0.007784.5 | 0.00068 0.00709 10.4
1260 | 0.00223 0.008113.6 | 0.00108 0.00635 5.9
1980 | 0.00178 0.008444.7 | 0.00079 0.00725 9.2
2700 | 0.00163 0.007954.9 | 0.00072 0.00717 10.0
mean ratio: all viewers 4.23 settled viewers 8.52
settled hazard 2000-2600 s0.00078 per s model base 0.00167
查看完整验算程序
# Chapter 3. p31: the programme clock with delayed entry.
# Same illustrative room R. A viewer who enters at second e and stays d
# seconds is at risk at programme seconds e to e + d - 1 and, if the
# exit is observed, leaves in second e + d - 1. The risk set at second t
# is everyone present then (late entrants join it when they arrive).
# For each run-sheet switch s the hazard in [s, s + 30) is compared with
# the two minutes before it, for all viewers and for settled viewers
# (at least 60 s since their own entry).
import math
import random

T_END = 3600
SWITCH = [180, 900, 1260, 1980, 2700]   # 环节切换秒数(示意)
SPIKE_LEN, B_SW = 30, 0.012
LAM0 = 1.0 / 600.0
A_OPEN, TAU = 0.12, 6.0
SHAPE = 2.0
SETTLE = 60


def prog_hazard(horizon):
    h = [LAM0] * horizon
    for s in SWITCH:
        for t in range(s, s + SPIKE_LEN):
            h[t] = LAM0 + B_SW
    return h


def open_int(u):
    return A_OPEN * TAU * (math.exp(-u / TAU) - math.exp(-(u + 1) / TAU))


def simulate(seed, horizon=T_END):
    rng = random.Random()
    rng.seed(seed)
    ent = [rng.randrange(0, 60) for _ in range(400)]
    ent += [rng.randrange(0, 3300) for _ in range(2600)]
    ent.sort()
    ph = prog_hazard(horizon)
    rows = []
    for e in ent:
        z = rng.gammavariate(SHAPE, 1.0 / SHAPE)
        need = rng.expovariate(1.0)
        cum, t = 0.0, e
        while t < horizon:
            cum += z * (ph[t] + open_int(t - e))   # step
            t += 1
            if cum >= need:
                break
        if cum >= need:
            rows.append((e, t - e, 1))
        else:
            rows.append((e, horizon - e, 0))
    return rows


def clock_tables(rows, settle):
    # 每秒在场人数与退出数(差分数组,整数)
    pres = [0] * (T_END + 1)
    exits = [0] * T_END
    for e, d, ev in rows:
        start = e + settle
        if start >= e + d:
            continue
        pres[start] += 1
        pres[e + d] -= 1
        if ev:
            exits[e + d - 1] += 1
    run, at = 0, []
    for t in range(T_END):
        run += pres[t]   # step
        at.append(run)
    return at, exits


def rate(at, exits, lo, hi):
    return math.fsum(exits[lo:hi]) / math.fsum(at[lo:hi])


rows = simulate(20261113)
all_at, all_ex = clock_tables(rows, 0)
st_at, st_ex = clock_tables(rows, SETTLE)
print("audience at switches: " + "  ".join(
    "%d:%d" % (s, all_at[s]) for s in SWITCH))
print("switch | all: pre    spike   ratio | settled: pre  spike   ratio")
ratios = []
for s in SWITCH:
    a0, a1 = rate(all_at, all_ex, s - 120, s), rate(all_at, all_ex, s,
                                                    s + SPIKE_LEN)
    b0, b1 = rate(st_at, st_ex, s - 120, s), rate(st_at, st_ex, s,
                                                  s + SPIKE_LEN)
    ratios.append((a1 / a0, b1 / b0))
    print("%6d | %.5f %.5f %5.1f   | %.5f %.5f %5.1f"
          % (s, a0, a1, a1 / a0, b0, b1, b1 / b0))
print("mean ratio: all viewers %.2f   settled viewers %.2f"
      % (math.fsum(r[0] for r in ratios) / 5.0,
         math.fsum(r[1] for r in ratios) / 5.0))
quiet = rate(st_at, st_ex, 2000, 2600)
print("settled hazard 2000-2600 s: %.5f per s   model base %.5f"
      % (quiet, LAM0))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《直播间留存卡普兰迈耶生存曲线、划走风险尖峰定位与福利钩子插入秒数母典》第 3 章「两只钟:入场秒数、节目时钟与延迟进入」(版本 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}
}

本书其他章节结论