# Subscription lifecycle definitions (design, declared before any result)

Third part of the online retail study. Question: for a subscription product, how much do the activation, expansion and
churn numbers change with the definition chosen, and how wrong does a naive retention curve get when recent cohorts have
not had time to churn?

This file, the frozen protocol `protocol-saas.json` and the code that draws and measures the accounts
(`retail/subscription.py`, `saas_pipeline.py`) are committed before any reported seed is run. `saas_pipeline.py` pins
the protocol's SHA-256 and refuses to run if the protocol differs from the pin or, inside a git checkout, is not
committed unmodified.

## What the published parts already answer, and what this part adds

- Part one (`index.html`) asks which quiet customers of one online retailer are worth a win-back contact: how many came
  back with no contact recorded at two dates, where the lost revenue sat, and how to size a holdout.
- Part two (`lifecycle-cohorts.html`) splits each month's change in active buyers into new, retained, returning and
  lapsed buyers, scores twelve first-year statements on the second year, ranks three moments for a contact, and maps the
  accounting to a product's monthly active users in words only, with no product data.
- Neither has a subscription product, seats, plans, an activation definition, an expansion definition, a churn
  definition other than a missed month, a payback figure or any method for customers who have not yet had time to leave.
  Part two's retention table uses only cohorts old enough to be followed for three months.

This part adds, on explicitly synthetic accounts: several defensible definitions each of activation, expansion and
churn side by side, each against the generator's hidden truth where one exists; naive cohort retention against a
Kaplan-Meier estimate and a discrete-time hazard model, by cohort age, against each cohort's true retention; and
acquisition-cost payback under each churn definition.

## 1. Data: a synthetic product

Every rate is an assumption, listed in `protocol-saas.json` under `generator`, and shown on the page.

- Accounts start paying on a monthly plan in sign-up months 1 to 24: 300 in month 1, growing 3% a month (about 10,300).
  Two plans, basic at US$15 and pro at US$40 a seat a month (35% start on pro); seats at start are 1 plus a Poisson draw
  with mean 4; a quarter start with 30% off for their first three months.
- Hidden value state: an account reaches value or not. In the steady scenario 40% do in every sign-up month; in the
  improving scenario the share rises from 30% in month 1 to 50% in month 24, as if the product got better.
- First 30 days, day by day: a setup event within 7 days (85% of value accounts, 55% of the others), login days (35% and
  18% of days), and core-action days (50% of days once a value account on the core path has reached value; 4% of days
  otherwise). A fifth of value accounts reach value another way and use the core action no more than the rest.
- Each month after sign-up: a hazard of deciding to leave that falls with tenure (value accounts 1.8% a month at the
  floor, others 5%, both higher in the first months); after deciding, the account stops using the product at once but
  cancels after 0, 1, 2 or 3 months, or, for 10%, after 4 to 12 months of paying unused; idle months while staying (5%
  and 20%); seat adds and removals, upgrades and downgrades at stated monthly rates; and after a cancellation, a monthly
  chance of coming back for 12 months (5% and 2%), with one seat fewer.
- The analyst's data ends at the cutoff, month 24. The generator also follows every account for 120 months after
  sign-up; that full follow-up is the truth and is never used by an estimator.

Calibration: rates were set from plausibility, then adjusted on a pilot seed (seed 0, not reported) reading only two
figures, monthly logo churn by cancel date and net revenue retention, against targets of about 3% to 5% and 90% to 100%.
Three passes are recorded in the protocol; the third gave 3.8% and 93% and was kept.

## 2. Definitions (the arms)

Activation, sign-up months 1 to 23 (rates and agreement with truth) and 1 to 12 (12-month retention by activation):
- setup: the setup event within 7 days (event-based);
- engaged: active on 3 or more distinct days in the first 14 days (event-based);
- value: the core action on 4 or more distinct days in the first 30 days (value-based);
- truth: the hidden value state. Reported for each: the rate, the share of activated accounts that truly reached value,
  the share of value accounts it catches, and the 12-month retention gap between activated and not.

Expansion, accounts paying in month 12 followed to month 24:
- seat: paying in both months with more seats in month 24;
- revenue: paying in both months with higher monthly revenue in month 24;
- net revenue retention of the month-12 payers, lost accounts at zero, and net seat retention.

Churn, monthly over months 13 to 23, pooled as a ratio of sums:
- logo by cancel date: paying last month, not this month, over last month's payers;
- logo by last activity: active last month and inactive this month and next, over last month's active accounts;
- gross revenue churn: revenue lost to cancellation and contraction among last month's payers, over their revenue;
- net revenue churn: losses minus expansion among last month's payers, over their revenue;
- truth: hidden leave decisions in the month over accounts paying and not yet leaving at its start.
Also: the share of activity churn in months 13 to 18 that is active again by month 24, and, for the rest that cancel by
month 24, how many months activity churn runs ahead of the cancellation.

## 3. Censoring

Event: first cancellation. Survival at age k: not yet cancelled k months after sign-up. At the cutoff a cohort that
signed up in month s has been followed for 24 - s months.
- naive: a cohort's share with no cancellation seen by the cutoff, so accounts not yet k months old count as retained;
- mature only: at each age, only cohorts old enough to have reached it;
- Kaplan-Meier: pooled over all cohorts, each account leaving the risk set at the cutoff;
- discrete-time hazard: a logistic model on account-months with age bins (1, 2, 3, 4 to 6, 7 to 12, 13 and over) and a
  linear sign-up month term, fitted by iteratively reweighted least squares; a cohort's survival is the product of its
  predicted monthly hazards.
- truth: each cohort's own survival from the full follow-up.

Scored: the 12-month retention estimate for cohorts aged 0 to 2, 3 to 5, 6 to 8 and 9 to 11 months at the cutoff, minus
those cohorts' true 12-month retention (size-weighted), in points; and the pooled curves at ages 1 to 23. For cohorts 12
months or older, naive and mature-only equal the cohort's own observed survival, so their bias is zero by construction
and is not reported as evidence.

The generator's leave hazard is not a logistic function of age bins, and it has no sign-up month term in the steady
scenario; in the improving scenario the drift comes through the value share, not through the hazard's form. The hazard
model is still a model I chose knowing the generator, so its result is a check of the method under conditions I set,
not evidence about a real product.

## 4. Payback

Acquisition cost US$1,200 per paying account in the base case, swept at US$800 and US$2,000; gross margin 80% (moving
the margin moves payback exactly as moving the cost does, so the cost sweep covers both). ARPA is the mean first-month
revenue of accounts signing up in months 13 to 24. Under each churn definition, payback is the first month T where
ARPA x margin x (1 - churn)^t summed over t = 0 to T - 1 reaches the acquisition cost; none within 120 months is
reported as not within ten years. Also the simple payback (cost over ARPA x margin, no churn). Truth: sign-up months 1 to
12 with the full follow-up, the first month where cumulative margin per account acquired reaches the cost.

## 5. Runs, summaries and stopping

- Two scenarios (steady is the base case; improving is the stress on cohort drift), 20 seeds each (1 to 20), fixed
  before any result. No seed is added or dropped after the results, and every metric above is reported.
- Each figure is the mean over the 20 seeds, with the lowest and highest seed. The seed range is the spread of the
  synthetic draw; it is not a confidence interval about any real product.
- No models are called; there is no step limit and no per-item run count beyond the seeds.
- Worked example: seed 1, steady scenario, accounts in sign-up order, the first that signed up in months 1 to 6, counts
  as activated by setup and engaged but not by value, and has a first cancellation by month 24 at least 3 months after
  its first two-month gap in activity; if none, drop the activation condition.
- Anything added after the results is labelled as such on the page.

## 6. Limits declared now

A synthetic product and synthetic behaviour: the rates are mine, so the size of every gap between definitions is a
property of the rates. What carries to a real product is the method: compute each definition side by side, date churn
both ways, and estimate retention with the censoring handled.
