What does Ad-Library Prospecting and Inbox Physics conclude, in numbers, about “Days in Flight: Survival Curves in the Ad Library”?

Answer: Chapters 1 and 2 score brands with survival analysis and proportional hazards, and show the complaint rate rising to 0.298 % when the whole directory is contacted.

Scope of the numbers: A live ad in a public ad library is right-censored data and must be read with the Kaplan-Meier product-limit estimator; in a synthetic library the rule "live and at least 30 days old" raises the share of steady advertisers from 0.313 to 0.902. Parameters are illustrative and all calculations are generated by the book's programs.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python only

A. 600 ads, 129 still running on snapshot day (0.215)
day KM S(t) naive S(t) true S(t)
70.511 0.478 0.510
140.403 0.352 0.405
300.269 0.198 0.267
600.165 0.082 0.167
900.104 0.025 0.098
median days: KM 7.5 naive 6.3 true 7.5
B. by advertiser type (KM)
steady n188 running= 96 S(14)=0.796 S(30)=0.664
trial n412 running= 33 S(14)=0.223 S(30)=0.089
C. running and >30 days old: 61 ads, 55 steady (0.902)
base rate of steady among all ads0.313
log check: ln S_KM(30)-1.3123
Show the full program
# Chapter 1. p11: Kaplan-Meier survival of ads seen in a public ad library.
# Model (synthetic, illustrative): 600 ads start uniformly over the last
# 120 days. 30 % come from "steady" advertisers whose ads run a Weibull
# time (shape 0.9, scale 80 days); 70 % from "trial" advertisers (shape
# 0.6, scale 7 days). An ad still running on the snapshot day is
# right-censored at its age. We compare the Kaplan-Meier estimate with
# the naive reading that treats every ad as if it had already stopped.
import math
import random

RNG = random.Random(20261120)
N, WINDOW = 600, 120.0
STEADY_SHARE = 0.30


def draw_ads(rng):
    ads = []
    for _ in range(N):
        steady = rng.random() < STEADY_SHARE
        shape, scale = (0.9, 80.0) if steady else (0.6, 7.0)
        dur = rng.weibullvariate(scale, shape)
        start = rng.uniform(0.0, WINDOW)
        age = WINDOW - start
        if dur > age:
            ads.append((age, 0, steady, dur))      # censored
        else:
            ads.append((dur, 1, steady, dur))      # stopped
    return ads


def kaplan_meier(rows):
    rows = sorted(rows, key=lambda r: (r[0], -r[1]))
    at_risk, s, curve = len(rows), 1.0, []
    i = 0
    while i < len(rows):
        t = rows[i][0]
        d = c = 0
        while i < len(rows) and rows[i][0] == t:
            if rows[i][1]:
                d += 1
            else:
                c += 1
            i += 1
        if d:
            s *= 1.0 - d / at_risk
            curve.append((t, s))
        at_risk -= d + c
    return curve


def surv_at(curve, t):
    s = 1.0
    for ti, si in curve:
        if ti <= t:
            s = si
        else:
            break
    return s


def km_median(curve):
    for t, s in curve:
        if s <= 0.5:
            return t
    return float("nan")


if __name__ == "__main__":
    ads = draw_ads(RNG)
    cens = len([a for a in ads if a[1] == 0])
    print("A. {} ads, {} still running on snapshot day ({:.3f})".format(
        N, cens, cens / N))
    km = kaplan_meier([(a[0], a[1]) for a in ads])
    naive = kaplan_meier([(a[0], 1) for a in ads])
    true = kaplan_meier([(a[3], 1) for a in ads])
    print("   day   KM S(t)   naive S(t)   true S(t)")
    for t in (7, 14, 30, 60, 90):
        print("   {:>3}   {:>7.3f}   {:>10.3f}   {:>9.3f}".format(
            t, surv_at(km, t), surv_at(naive, t), surv_at(true, t)))
    print("   median days: KM {:.1f}  naive {:.1f}  true {:.1f}".format(
        km_median(km), km_median(naive), km_median(true)))
    print("B. by advertiser type (KM)")
    for flag, name in ((True, "steady"), (False, "trial")):
        sub = [(a[0], a[1]) for a in ads if a[2] == flag]
        c = kaplan_meier(sub)
        run = len([1 for a in ads if a[2] == flag and a[1] == 0])
        print("   {:<6} n={:>3} running={:>3}  S(14)={:.3f}  S(30)={:.3f}"
              .format(name, len(sub), run, surv_at(c, 14), surv_at(c, 30)))
    alive = [a for a in ads if a[1] == 0 and a[0] >= 30]
    st = len([a for a in alive if a[2]])
    print("C. running and >= 30 days old: {} ads, {} steady ({:.3f})".format(
        len(alive), st, st / len(alive)))
    print("   base rate of steady among all ads: {:.3f}".format(
        len([a for a in ads if a[2]]) / N))
    print("   log check: ln S_KM(30) = {:.4f}".format(
        math.log(surv_at(km, 30))))

Single source and citation

Fan, Y. (2026). Active Ad-Library Prospecting, B2B Outbound Deliverability Physics and High-Ticket Whitelist Deal Closing (Version 1.0.0), Chapter 1: Days in Flight: Survival Curves in the Ad Library. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-347 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026347,
  author    = {Fan, Yafu},
  title     = {Active Ad-Library Prospecting, B2B Outbound Deliverability Physics and High-Ticket Whitelist Deal Closing},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book