What does Branching Ratios of Comment Cascades conclude, in numbers, about “Paid Reach Posing as Word of Mouth: Non-Stationary Outside Rates and Apparent Criticality”?
Answer: Chapter 6 shows the apparent criticality of paid reach posing as word of mouth: a pushed post with a true branching ratio of 0.3 is estimated naively as 0.864 and as 0.276 once the push window enters the model, the naive fit overstating the push's yield 5.15-fold.
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: 0.276, 0.3, 0.864
| posts | true n | comments | naive n | window n | push ratio r |
|---|---|---|---|---|---|
| boosted | 0.3 | 216.0 | 0.864 | 0.276 | 6.65 |
| organic | 0.6 | 129.6 | 0.487 | 0.439 | 0.28 |
| true push ratio for boosted posts: r = 6.0 |
Show the full program
# Chapter 6. p61: Paid reach mistaken for word of mouth.
# Posts: background outside rate 0.5 per minute, beta = 0.1, T = 120.
# "Boosted" posts get extra outside traffic of 3.0 per minute from
# minute 30 to minute 60 (a paid push) and have a true n of 0.3.
# "Organic" posts get no push and have n = 0.6. Two fits, beta fixed:
# naive constant mu (p42 estimator)
# window mu0 (1 + r 1[30 <= t < 60]): the push window, which the
# operator knows from the ad log, enters as a covariate;
# mu0 from the compensator identity, r and n by golden search.
# Filimonov and Sornette (2015) show that ignored regime shifts bias n
# upward. Means of 30 posts per row; fixed seed; illustrative.
import math
import random
BETA, T, BASE, PUSH, A, B = 0.1, 120.0, 0.5, 3.0, 30.0, 60.0
G = (math.sqrt(5) - 1) / 2
def simulate(n, boosted, rng):
t, excess, times = 0.0, 0.0, []
top = BASE + (PUSH if boosted else 0.0)
while True:
bound = top + excess
w = rng.expovariate(bound)
t += w
if t > T:
return times
excess *= math.exp(-BETA * w)
mu = BASE + (PUSH if boosted and A <= t < B else 0.0)
if rng.random() * bound <= mu + excess:
times.append(t)
excess += n * BETA
def stats(times, beta, horizon):
a, prev, out = 0.0, None, []
for t in times:
if prev is not None:
a = math.exp(-beta * (t - prev)) * (1 + a)
out.append(a)
prev = t
s = math.fsum(1 - math.exp(-beta * (horizon - t)) for t in times)
return out, s
def loglik(mu, n, beta, a_list, s, horizon):
terms = [math.log(mu + n * beta * a) for a in a_list]
return math.fsum(terms) - mu * horizon - n * s
def golden_max(f, lo, hi, iters=40):
x1, x2 = hi - G * (hi - lo), lo + G * (hi - lo)
f1, f2 = f(x1), f(x2)
for _ in range(iters):
if f1 < f2:
lo, x1, f1 = x1, x2, f2
x2 = lo + G * (hi - lo)
f2 = f(x2)
else:
hi, x2, f2 = x2, x1, f1
x1 = hi - G * (hi - lo)
f1 = f(x1)
x = (lo + hi) / 2
return x, f(x)
def fit_n(times, beta, horizon):
a_list, s = stats(times, beta, horizon)
cnt = len(times)
hi = min(0.999, cnt / s - 1e-9)
n, ll = golden_max(lambda v: loglik((cnt - v * s) / horizon, v, beta,
a_list, s, horizon), 0.0, hi)
return n, (cnt - n * s) / horizon, ll
def fit_window(times):
a_list, s = stats(times, BETA, T)
flag = [1.0 if A <= t < B else 0.0 for t in times]
cnt = len(times)
def ll_r(r):
expo = T + r * (B - A)
def ll_n(n):
mu0 = (cnt - n * s) / expo
terms = [math.log(mu0 * (1 + r * f) + n * BETA * a)
for a, f in zip(a_list, flag)]
return math.fsum(terms) - mu0 * expo - n * s
return golden_max(ll_n, 0.0, min(0.999, cnt / s - 1e-9), 30)
r, _ = golden_max(lambda x: ll_r(x)[1], 0.0, 20.0, 30)
return ll_r(r)[0], r
rng = random.Random(20261113)
print("posts true n comments naive n window n push ratio r")
for label, n, boosted in (("boosted", 0.3, True), ("organic", 0.6, False)):
cnt, nv, wn, rs = [], [], [], []
for _ in range(30):
ts = simulate(n, boosted, rng)
cnt.append(len(ts))
nv.append(fit_n(ts, BETA, T)[0])
w, r = fit_window(ts)
wn.append(w)
rs.append(r)
print("%-8s %.1f %6.1f %.3f %.3f %.2f"
% (label, n, math.fsum(cnt) / 30, math.fsum(nv) / 30,
math.fsum(wn) / 30, math.fsum(rs) / 30))
print("true push ratio for boosted posts: r = %.1f" % (PUSH / BASE))Single source and citation
Fan, Y. (2026). Hawkes Self-Exciting Point Processes: Branching-Ratio Criticality in Comment Cascades and the Aftershock Half-Life of Livestream Herd Buying (Version 1.0.0), Chapter 6: Paid Reach Posing as Word of Mouth: Non-Stationary Outside Rates and Apparent Criticality. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-234 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026234,
author = {Fan, Yafu},
title = {Hawkes Self-Exciting Point Processes: Branching-Ratio Criticality in Comment Cascades and the Aftershock Half-Life of Livestream Herd Buying},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · Hits Are Aftershocks: the Branching Ratio and the 1/(1-n) Multiplier
- Chapter 2 · Exogenous and Endogenous: Three Decay Classes under Power-Law Memory and the Half-Life of the Exponential Kernel
- Chapter 3 · Thinning and Time Rescaling: Simulating a Comment Stream, Then Auditing It
- Chapter 4 · Log-Likelihood, Grid and Golden Section: How Precisely Two Hours Pin Down the Branching Ratio
- Chapter 5 · Half-Life and the Stock of Aftershocks: Forecasting the Tail of a Post
- Chapter 7 · Eastern and Western Sources Examined: "Zeng Shen Has Killed a Man" and Omori's Aftershock Law
- Chapter 8 · Closing the Loop: Estimate the Branching Ratio in the First Two Hours, Then Decide Whether to Push