# Active-driver planning (declared before scoring)

The study's published forecast builds revenue from trip drivers: trips, the shared-ride share, miles per trip, fare per
mile and charges per trip. This round asks the planning question one step further back. Does a plan built from the
people who supply the trips (new drivers each month, how earlier cohorts stay active, and trips per active driver)
forecast trips and revenue as well as the published forecast? And which piece explains each month's miss?

This file was written and committed after the drivers data was retrieved and described, and before any code that
forecasts or scores existed. The published results (`results/results.json`, `results/figures.json`) are unchanged; this
round writes new files only.

## Data

- **Trips and revenue:** the study's existing monthly table (`data/monthly.csv`), unchanged.
- **Drivers:** the City of Chicago's Transportation Network Providers drivers dataset (portal id `j6wf-834c`): one row
  per driver per month in which an operator reported the driver as eligible to give trips, with the month reported, the
  driver's start month (the earliest any operator reported) and that month's trip count. It has no driver id. Retrieved
  as counts grouped by month reported and start month, November 2018 to August 2026, through the portal's own query
  interface (`revfc/fetch_drivers.py`). The responses stay outside the repository because they hold small cells.
- **Committed tables** (`revfc/clean_drivers.py`): `data/drivers-cohorts.csv`, active and listed drivers by month and
  age (whole months since the start month, 0 to 35, then one row for 36 or more), and `data/drivers-monthly.csv`, the
  month's totals. A driver whose start month is missing, malformed or later than the month reported goes in the 36-or-more
  row.
- **Active driver:** a driver with at least one trip that month. The city blanks trip counts over 999 as suspected
  errors; those drivers count as active.
- **Small cells:** no published count lies between 1 and 9. An age row with a listed or active count from 1 to 9 is
  merged into its month's 36-or-more row, so monthly totals are unchanged. A check scans every committed and exported
  table for counts from 1 to 9, with a planted positive control.

What was looked at before declaring: monthly active, listed and new drivers, trips per active driver, the age rows, and
the gap between the two datasets' trip counts. No forecast or error had been computed.

## 1. The identity

For each month t:

    A(t) = N(t) + S(t)                     active drivers = new drivers + surviving drivers
    N(t) = active drivers at age 0         (drivers whose start month is t)
    S(t) = active drivers at ages 1 and over, including the 36-or-more row
    q(t) = T(t) / A(t)                     trips per active driver
    r(t) = R(t) / T(t)                     revenue per trip, the published study's identity
    R(t) = A(t) x q(t) x r(t) = T(t) x r(t)

T is trips and R is revenue from the trips data, exactly as in the published study, so both plans forecast the same
targets. Trips per active driver therefore divides the trips data's trips by the drivers data's active drivers; the two
datasets' own trip counts differ by about one percent at most, a data check reported apart, not part of the identity.
Test: the identity closes to the cent in every month, and a planted change to one piece breaks it.

## 2. Forecasts

Same origins, horizons, regimes and model family as the published study: rolling origin at every month from October
2020 to July 2026, fitted on every month from November 2018 up to the origin (expanding window), one to three months
ahead, scored only when the target month is in the data (to August 2026).

**(a) The cohort plan.**

- *New drivers* N: additive exponential smoothing with a twelve-month seasonal pattern on the log scale, the published
  model family and fitting code (`revfc/model.py`). Its form (with or without a damped trend) is chosen once by AICc on
  the data up to the first origin and frozen.
- *Retention:* one-month carry ratios by age, from the last 12 month-to-month transitions known at the origin:
  rho(a) = sum of active drivers at age a + 1 in month u + 1 over sum of active drivers at age a in month u, for a = 0
  to 34 and the 12 months u up to one month before the origin; for the 36-or-more row, rho(36+) = its sum in month
  u + 1 over the sums of age 35 and the 36-or-more row in month u. Twelve transitions so a full year's seasons average
  out.
- *Projection:* starting from the origin's age rows, each age moves one row older each month times its ratio, and age
  0 is the new-driver forecast. Active drivers = the sum of the projected rows; surviving drivers = all rows but age 0.
- *Trips per active driver* q: the same model family on log q, form chosen the same way.
- *Trips* = projected active drivers x forecast trips per active driver.
- *Revenue* = trips x revenue per trip, where revenue per trip is the published driver forecast's own at the same
  origin and horizon (its revenue divided by its trips). The two plans therefore differ only in how they get trips.

**(b) The published trip-driver forecast**, unchanged: recomputed with the published code and frozen forms, and
required to reproduce the published forecasts file's revenue to the cent at every origin and horizon. Its trips
forecast is its own forecast of trips.

**(c) The naive baseline**, unchanged: last year's same month times the growth of the last three months over the
same three months a year earlier. For revenue it is the published one; for trips, the same formula on trips.

## 3. Scoring

- Lines: trips and revenue. The head-to-head is on revenue, as in the published study; trips is reported beside it.
- Absolute and signed percentage error per forecast. Per method, horizon and regime: mean absolute percentage error
  (MAPE) and mean signed error.
- Regimes by target month, never pooled: recovery (November 2020 to December 2022) and settled (January 2023 to August
  2026). The collapse is not scored.
- Intervals exactly as published: moving-block bootstrap over target months within a regime (block length 3, 2,000
  resamples, seed 20261021, one random stream per regime and horizon as published), 95% percentile intervals for each
  MAPE and for the paired differences cohort minus trip-driver, cohort minus naive and trip-driver minus naive (the same
  resampled months for both methods).

## 4. The bridge

Plan = the cohort plan one month ahead (also reported three months ahead, as a second table). Each month's revenue miss,
actual minus plan, splits into four pieces:

    new drivers      = (N_actual − N_plan) x q_plan x r_plan
    retention        = (S_actual − S_plan) x q_plan x r_plan
    trips per driver = A_actual x (q_actual − q_plan) x r_plan
    revenue per trip = T_actual x (r_actual − r_plan)

They sum exactly to the miss. That is bookkeeping, true by construction, not evidence, and the page says so. Reported:
per regime, how often each piece is the largest in absolute size, the typical (mean absolute) size of each, and the
three biggest misses in percent with their pieces.

## 5. The declared prediction

**The cohort plan beats the published trip-driver forecast on revenue three months ahead in the settled years.**
Reason: active drivers move slowly, so carrying the driver stock forward should hold the level three months out better
than a trips model that behaves like last month plus a seasonal shape.

Scored on revenue, settled regime, three months ahead, paired difference in MAPE (cohort minus trip-driver):

- *supported:* the 95% interval lies entirely below zero;
- *direction only:* the point estimate is below zero and the interval includes zero;
- *not supported:* the point estimate is zero or above.

Reported whatever it shows, in the page's first screen.

## 6. Declared sweep

The retention window, the cohort plan's own choice expected to move it most: the last 12 transitions (main), the last 6
and the last 24. Same everything else. Reported beside the main result, never replacing it.

## 7. Descriptive, not scored

Cohort retention curves: for each start year from 2019 to 2025, active drivers at each age as a share of the same
cohorts' active drivers at age 1 (age 0 is a partial month), summed over the year's monthly cohorts observed at both
ages, up to age 35.

## 8. Limits declared before scoring

- Final data, not the data known at the time. Both datasets are the portal's current versions; operators report
  drivers quarterly, so at a real origin the last months would not yet have been in hand.
- Imperfect matching. The city combines a driver reported by two operators in a month, but says the matching is
  imperfect, so some drivers may count twice.
- A driver counts as active with a single trip; a plan built on drivers listed (eligible) instead is not tested.

## Frozen-results check

The new results file is pinned by sha256 in its tests, and a re-run from the committed tables, with no network,
reproduces it byte for byte.
