5D Library › Subscription Unit Economics, Net Revenue Retention and AI Inference Scaling Laws · 中文
Chapter 1. Lifetime Value Is Not Margin Divided by Churn
Projecting from the first six months
The practical question is what to do with a young cohort. The second program draws 1,000 customers from the heterogeneous population, watches them for six months, and fits two models to what it sees.
Calculation
# Chapter 1. Projecting a cohort from its first six months. 1,000 customers
# are drawn from a heterogeneous population (each with its own monthly churn
# theta ~ Beta(0.7, 8), as the first row of p01) and watched for 6 months. Two
# models are fitted to those six months by maximum likelihood (grid search)
# and asked to project survival at 12, 24 and 60 months and the discounted
# gross profit of the cohort over 60 months (100 a month per survivor, 1 % a
# month discount):
# geometric one churn rate for everybody
# shifted-beta-geometric (sBG) churn rates spread as Beta(a, b)
import math
import random
def lbeta(a, b):
return math.lgamma(a) + math.lgamma(b) - math.lgamma(a + b)
def sbg_s(a, b, t):
return math.exp(lbeta(a, b + t) - lbeta(a, b))
def simulate(n, a, b, months, rng):
# lost[t] = churned at end of month t (t = 1..months)
lost = [0] * (months + 1)
for _ in range(n):
th = rng.betavariate(a, b)
for t in range(1, months + 1):
if rng.random() < th:
lost[t] += 1
break
alive = n - sum(lost)
return lost, alive
def ll_sbg(a, b, lost, alive, months):
ll = 0.0
for t in range(1, months + 1):
p = sbg_s(a, b, t - 1) - sbg_s(a, b, t)
ll += lost[t] * math.log(p)
return ll + alive * math.log(sbg_s(a, b, months))
def value(surv_fn, months=60):
return sum(100 * surv_fn(t) / 1.01 ** t for t in range(months))
if __name__ == "__main__":
rng = random.Random(58002)
A, B, M = 0.7, 8.0, 6
lost, alive = simulate(1000, A, B, M, rng)
n_exposure = sum((1000 - sum(lost[:t])) for t in range(1, M + 1))
c_geo = sum(lost) / n_exposure
best = None
for i in range(1, 80):
for j in range(1, 160):
a, b = 0.05 * i, 0.25 * j
ll = ll_sbg(a, b, lost, alive, M)
if best is None or ll > best[0]:
best = (ll, a, b)
_, ah, bh = best
print(
"observed: {} of 1,000 still active after {} months".format(alive, M)
)
print(
"fitted geometric churn {:.4f}; fitted sBG a = {:.2f}, b = {:.2f}"
.format(c_geo, ah, bh)
)
print(
"\n survival at month 12 24 60 60-month value"
)
print(" per customer")
for name, fn in (("truth", lambda t: sbg_s(A, B, t)),
("sBG fit", lambda t: sbg_s(ah, bh, t)),
("geometric fit", lambda t: (1 - c_geo) ** t)):
print(
" {:<15} {:6.3f} {:6.3f} {:6.3f} {:7.0f}"
.format(name, fn(12), fn(24), fn(60), value(fn))
)
# observed: 681 of 1,000 still active after 6 months
# fitted geometric churn 0.0632; fitted sBG a = 0.70, b = 8.25
#
# survival at month 12 24 60 60-month value
# per customer
# truth 0.522 0.375 0.221 1966
# sBG fit 0.529 0.381 0.225 1991
# geometric fit 0.457 0.209 0.020 1364Both models fit six months of data. Their projections diverge immediately: at month 60 the geometric model, with one churn rate of 0.0632, predicts that 0.020 of the cohort remain; the beta model predicts 0.225; the truth is 0.221. The geometric model values the cohort at 1364 per customer against a true 1966; the beta model at 1991.
When the heterogeneity model is wrong too
That result is flattering to the beta model because the data were generated from it. The third program changes the truth.
Calculation
# Chapter 1. The same six-month projection when the truth is NOT a beta
# mixture. Two alternative truths, each with about the same six-month
# retention as p02:
# two segments 25 % loyal customers (monthly churn 0.01) and 75 % fickle
# (0.11) Weibull discrete Weibull survival S(t) = exp(-(t /
# 18)^0.55): every customer's
# hazard falls with tenure (habit formation), not only the
# mix
# 1,000 customers each, observed for 6 months, then the two models of p02 are
# fitted and projected. Value = discounted gross profit over 60 months, 100 a
# month, 1 %/month.
import math
import random
def lbeta(a, b):
return math.lgamma(a) + math.lgamma(b) - math.lgamma(a + b)
def sbg_s(a, b, t):
return math.exp(lbeta(a, b + t) - lbeta(a, b))
def weib(t):
return math.exp(-(t / 18.0) ** 0.55)
def seg(t):
return 0.25 * 0.99 ** t + 0.75 * 0.89 ** t
def draw(surv, n, months, rng):
lost = [0] * (months + 1)
for _ in range(n):
u = rng.random()
for t in range(1, months + 1):
if u > surv(t):
lost[t] += 1
break
return lost, n - sum(lost)
def fit(lost, alive, M):
expo = sum(1000 - sum(lost[:t]) for t in range(1, M + 1))
c = sum(lost) / expo
best = None
for i in range(1, 80):
for j in range(1, 160):
a, b = 0.05 * i, 0.25 * j
ll = sum(
lost[t] * math.log(sbg_s(a, b, t - 1) - sbg_s(a, b, t))
for t in range(1, M + 1)
)
ll += alive * math.log(sbg_s(a, b, M))
if best is None or ll > best[0]:
best = (ll, a, b)
return c, best[1], best[2]
def value(fn):
return sum(100 * fn(t) / 1.01 ** t for t in range(60))
if __name__ == "__main__":
rng = random.Random(58003)
for name, truth in (("two segments", seg), ("Weibull k = 0.55", weib)):
lost, alive = draw(truth, 1000, 6, rng)
c, a, b = fit(lost, alive, 6)
print("{}: {} of 1,000 active after 6 months;".format(name, alive))
print(" sBG fit a = {:.2f}, b = {:.2f}".format(a, b))
print(
" survival at month 12 24 60 60-month"
" value"
)
for lab, fn in (
("truth", truth),
("sBG fit", lambda t: sbg_s(a, b, t)),
("geometric fit", lambda t: (1 - c) ** t),
):
v = value(fn)
print(
" {:<15} {:6.3f} {:6.3f} {:6.3f} {:6.0f}"
" ({:+4.0%})".format(
lab, fn(12), fn(24), fn(60), v, v / value(truth) - 1
)
)
print()
print("Reading: one churn rate understates in both"
" worlds. The heterogeneity")
print("model is close when its assumption roughly"
" holds and overstates when the")
print("hazard itself falls with tenure. Six months"
" cannot tell these worlds")
print("apart, so a 60-month value should be"
" reported as a range across models,")
print("not as one number.")
# two segments: 605 of 1,000 active after 6 months;
# sBG fit a = 1.40, b = 13.75
# survival at month 12 24 60 60-month value
# truth 0.407 0.242 0.137 1513 ( +0%)
# sBG fit 0.419 0.246 0.097 1472 ( -3%)
# geometric fit 0.360 0.130 0.006 1099 (-27%)
#
# Weibull k = 0.55: 583 of 1,000 active after 6 months;
# sBG fit a = 0.25, b = 1.25
# survival at month 12 24 60 60-month value
# truth 0.449 0.310 0.144 1631 ( +0%)
# sBG fit 0.516 0.438 0.350 2170 (+33%)
# geometric fit 0.310 0.096 0.003 979 (-40%)
#
# Reading: one churn rate understates in both worlds. The heterogeneity
# model is close when its assumption roughly holds and overstates when the
# hazard itself falls with tenure. Six months cannot tell these worlds
# apart, so a 60-month value should be reported as a range across models,
# not as one number.With two segments — a quarter loyal, three quarters fickle — the beta model is still close (−3 %) and the geometric model is not (−27 %). With a Weibull truth, in which every customer’s hazard falls with tenure (habit formation rather than selection), the beta model overstates the 60-month value by +33 % while the geometric model understates it by −40 %. Six months of data cannot distinguish these worlds.
Note
What to report. A single lifetime value is a point estimate from a model whose structure the data cannot test early on. The honest report is a range across plausible models, the discount rate used, and the age of the data. A projection that does not say which model produced it is not a number but an assumption.
Hypothesis · not established
The author’s hypothesis (not established): in subscription businesses that report cohort retention, month-to-month retention rises with cohort age in the large majority of cohorts, and LTVs computed from first-quarter churn understate realised five-year cohort value, while LTVs computed from blended base churn overstate it for cohorts acquired through new channels. What would show it to be wrong: flat month-to-month retention in most cohorts, or no systematic sign in the errors.
Summary
“LTV = GP / churn” assumes every customer churns at the same rate. With heterogeneous customers, churn falls with cohort age, the error of any single-churn LTV changes sign with the age of the base it is taken from, and the common pitch-deck number — undiscounted, with a mature base’s churn — overstates value by 16 % to 48 % in the examples; when the Beta parameter , the expected lifetime is infinite and only discounting gives a finite value. A heterogeneity model projects far better than one churn rate when its structure is right, and overstates by a third when it is not; six months of data cannot tell, so lifetime value should be reported as a range across models.
References
Fan, Y. (2026). Subscription Unit Economics, Net Revenue Retention and AI Inference Scaling Laws: Cohort Survival Mixtures, Negative-Churn Differential Equations, Token Compute Margins and Metcalfe Congestion Limits [订阅制单位经济学、净收入留存与人工智能推理标度律] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090164 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).