Skip to content

Diogo TravassosData leadership · Analytics · Decision-making

Public data

Daily ridership forecasting

Part 1 of 2 in Transit demand, from forecast to capacity

After ridership collapsed in March 2020, repeating last week's count missed less than gradient boosting in every month, by about 45,000 boardings a day on average, but exponential smoothing missed less from August on.

The gap to gradient boosting is clear (95% range 20,000 to 82,000 a day). Before the collapse gradient boosting had the lowest average miss, though 60 days could not separate the four methods. One series and one shock cannot set a rule for every shock, so I would start on the simple forecast after a shock, make every model beat it on a weekly scorecard, and use two alarms to say when a model has earned its place back.

Key figures
Last week's count, after the collapse
49,000
boardings a day average miss, March to December
Gradient boosting, after the collapse
95,000
lowest average before it but no clear lead; clearly worse after it
Exponential smoothing, after the collapse
72,000
a gap that could be chance; it missed less than last week's count every month from August
Coverage in June (the year said 89.6%)
70%
share of days inside the 90% range, last week's count

Main limitation One city's transit counts and one shock. After the collapse last week's count had the lowest monthly miss from April to July and exponential smoothing from August on; in 2019, a normal year, gradient boosting led.

In plain words

A business that schedules supply a day ahead (drivers, couriers, support agents, buses) needs tomorrow's demand with an honest range: too high pays for idle supply, too low leaves customers waiting. The hard question is what to trust when demand changes overnight, and how quickly a team can tell that its model has stopped working.

I compared four ways to forecast tomorrow's count, from the simplest (repeat the count from the same weekday last week) to gradient boosting, on every day of 2020, each using only what was known the evening before. The data is the Chicago Transit Authority's daily boarding count, which collapsed in mid-March 2020 and stayed far below its January level for the rest of the year. It stands in for the daily demand a marketplace or delivery operation plans against; it is public, so no customer data is shared.

Terms used on this page
One-day-ahead forecast
Tomorrow's count, made after today closes.
Last week's count
Forecast Tuesday with last Tuesday's count (in textbooks, the weekly seasonal naive). Nothing to fit.
Exponential smoothing (ETS)
A running level plus a weekly pattern, updated every day.
Gradient boosting
A machine-learning model made of many small decision trees, here fed the calendar and recent counts.
Calendar regression
A model of weekday, holidays, season and trend only, with no recent counts.
Average miss (MAE)
How far off the forecast was on an average day, in boardings.
90% range
An interval meant to hold the real count nine days in ten. Coverage is the share of days it actually did.
Clear gap
A difference between two methods unlikely to be luck, under the test described in the method section.

The evidence

How far off each method was on an average day, before and after the March 2020 collapse.

Average miss per day (MAE), boardings, rounded to thousands. Lower is better.
MethodJanuary to FebruaryMarch to DecemberFull year
Last week's count114,00049,00060,000
Exponential smoothing (ETS)102,00072,00077,000
Gradient boosting80,00095,00092,000
Calendar regression102,000558,000483,000
Averaged over March to December, every method missed more than last week's count.

Extra boardings a day each method missed compared with last week's count, March to December, with a 95% range.

After the collapse: how much more each method missed than last week's countExponential smoothing (ETS): about 22,000 more boardings a day than last week's count, 95% range −3,000 to +47,000, not a clear gap; Gradient boosting: about 45,000 more boardings a day than last week's count, 95% range +20,000 to +82,000, clear gap; Calendar regression: about 509,000 more boardings a day than last week's count, 95% range +445,000 to +572,000, clear gap.−20K0+20K+40K+60K+80K+100KExponential smoothing (ETS), March to December: about 22,000 more boardings a day than last week's count, 95% range −3,000 to +47,000, not a clear gapExponential smoothing (ETS)not a clear gapGradient boosting, March to December: about 45,000 more boardings a day than last week's count, 95% range +20,000 to +82,000, clear gapGradient boostingclear gapCalendar regression, March to December: about 509,000 more boardings a day than last week's count, 95% range +445,000 to +572,000, clear gapCalendar regressionclear gapabout 509,000 more, off the scale← missed lessmissed more →
Show the data
March to December: extra boardings a day each method missed compared with last week's count, with a 95% range.
MethodExtra miss a day95% rangeAdjusted p
Exponential smoothing (ETS)22,000−3,000 to +47,0000.14
Gradient boosting45,000+20,000 to +82,0000.010
Calendar regression509,000+445,000 to +572,000<0.001
Every pair in every period. Difference is method A's average miss minus method B's, in boardings a day; negative favours A.
PeriodPair (A minus B)DifferenceTest statisticpAdjusted p95% range
Full yearLast week's count minus Calendar regression−424,000−11.76<0.001<0.001−498,000 to −347,000
Full yearLast week's count minus Gradient boosting−33,000−2.340.0200.059−65,000 to −9,000
Full yearLast week's count minus ETS−17,000−1.490.140.28−39,000 to +6,000
Full yearCalendar regression minus Gradient boosting+391,00012.23<0.001<0.001+326,000 to +457,000
Full yearCalendar regression minus ETS+407,00013.42<0.001<0.001+344,000 to +469,000
Full yearGradient boosting minus ETS+16,0001.000.320.32−14,000 to +50,000
January to FebruaryLast week's count minus Calendar regression+12,0000.390.701.00−41,000 to +82,000
January to FebruaryLast week's count minus Gradient boosting+34,0001.520.130.80−2,000 to +80,000
January to FebruaryLast week's count minus ETS+12,0000.400.691.00−34,000 to +69,000
January to FebruaryCalendar regression minus Gradient boosting+22,0001.180.241.00−14,000 to +54,000
January to FebruaryCalendar regression minus ETS0−0.020.981.00−51,000 to +38,000
January to FebruaryGradient boosting minus ETS−22,000−1.130.261.00−59,000 to +14,000
March to DecemberLast week's count minus Calendar regression−509,000−16.55<0.001<0.001−572,000 to −445,000
March to DecemberLast week's count minus Gradient boosting−45,000−2.950.0030.010−82,000 to −20,000
March to DecemberLast week's count minus ETS−22,000−1.830.0680.14−47,000 to +3,000
March to DecemberCalendar regression minus Gradient boosting+464,00016.14<0.001<0.001+405,000 to +525,000
March to DecemberCalendar regression minus ETS+487,00020.91<0.001<0.001+439,000 to +533,000
March to DecemberGradient boosting minus ETS+23,0001.270.210.21−12,000 to +63,000

Download findings.json

The best method changed month by month: exponential smoothing missed least from August on.

Average miss by month, boardings a day, on a log scale so all four methods fit. Monthly winners are descriptive only.

Last week's countCalendar regressionGradient boostingETS

Monthly average error by model, 2020Monthly mean absolute error in boardings a day, log scale. Last week's count: Jan 158,000, Feb 67,000, Mar 231,000, Apr 15,000, May 28,000, Jun 50,000, Jul 21,000, Aug 21,000, Sep 29,000, Oct 19,000, Nov 30,000, Dec 47,000; Calendar regression: Jan 113,000, Feb 90,000, Mar 522,000, Apr 935,000, May 697,000, Jun 635,000, Jul 533,000, Aug 540,000, Sep 529,000, Oct 457,000, Nov 380,000, Dec 363,000; Gradient boosting: Jan 117,000, Feb 41,000, Mar 439,000, Apr 41,000, May 59,000, Jun 90,000, Jul 81,000, Aug 58,000, Sep 45,000, Oct 46,000, Nov 36,000, Dec 48,000; ETS: Jan 136,000, Feb 67,000, Mar 168,000, Apr 188,000, May 167,000, Jun 54,000, Jul 26,000, Aug 17,000, Sep 21,000, Oct 15,000, Nov 27,000, Dec 34,00010K30K100K300K1MJFMAMJJASONDMarch 2020 collapseJanuary 2020, average miss in boardings a day: last week's count 158,000; calendar regression 113,000; gradient boosting 117,000; ETS 136,000February 2020, average miss in boardings a day: last week's count 67,000; calendar regression 90,000; gradient boosting 41,000; ETS 67,000March 2020, average miss in boardings a day: last week's count 231,000; calendar regression 522,000; gradient boosting 439,000; ETS 168,000April 2020, average miss in boardings a day: last week's count 15,000; calendar regression 935,000; gradient boosting 41,000; ETS 188,000May 2020, average miss in boardings a day: last week's count 28,000; calendar regression 697,000; gradient boosting 59,000; ETS 167,000June 2020, average miss in boardings a day: last week's count 50,000; calendar regression 635,000; gradient boosting 90,000; ETS 54,000July 2020, average miss in boardings a day: last week's count 21,000; calendar regression 533,000; gradient boosting 81,000; ETS 26,000August 2020, average miss in boardings a day: last week's count 21,000; calendar regression 540,000; gradient boosting 58,000; ETS 17,000September 2020, average miss in boardings a day: last week's count 29,000; calendar regression 529,000; gradient boosting 45,000; ETS 21,000October 2020, average miss in boardings a day: last week's count 19,000; calendar regression 457,000; gradient boosting 46,000; ETS 15,000November 2020, average miss in boardings a day: last week's count 30,000; calendar regression 380,000; gradient boosting 36,000; ETS 27,000December 2020, average miss in boardings a day: last week's count 47,000; calendar regression 363,000; gradient boosting 48,000; ETS 34,000
Show the data
Average miss by month, boardings a day, rounded to thousands
MonthLast week's countCalendar regressionGradient boostingETSLowest
January158,000113,000117,000136,000Calendar regression
February67,00090,00041,00067,000Gradient boosting
March231,000522,000439,000168,000ETS
April15,000935,00041,000188,000Last week's count
May28,000697,00059,000167,000Last week's count
June50,000635,00090,00054,000Last week's count
July21,000533,00081,00026,000Last week's count
August21,000540,00058,00017,000ETS
September29,000529,00045,00021,000ETS
October19,000457,00046,00015,000ETS
November30,000380,00036,00027,000ETS
December47,000363,00048,00034,000ETS

Download results.json

How far to trust the ranges

Planners set their buffer from the range. Over the year every method's 90% range held close to 90% of days. Month by month it swung, and every method fell below 75% in at least one month: for last week's count the range held every day in April and 70% of days in June, against 89.6% over the year. A team that checks coverage once a year would never see it.

Coverage swung from month to month.

Share of each month's days inside the 90% range. Solid: the ranges as reported. Dashed: the same ranges rescaled to ridership (log scale), described under what went wrong. Dotted line: the 90% target.

As reportedRescaled90% target

Share of days inside the 90% range, by month and modelMonthly coverage, January to December 2020, against the 90% target. Last week's count: as reported 96.8%, 100.0%, 80.6%, 100.0%, 100.0%, 70.0%, 100.0%, 93.5%, 73.3%, 93.5%, 93.3%, 74.2%; rescaled 96.8%, 100.0%, 54.8%, 100.0%, 100.0%, 70.0%, 100.0%, 93.5%, 93.3%, 93.5%, 86.7%, 77.4%; Calendar regression: as reported 100.0%, 96.6%, 38.7%, 83.3%, 100.0%, 100.0%, 100.0%, 100.0%, 100.0%, 100.0%, 100.0%, 100.0%; rescaled 100.0%, 96.6%, 38.7%, 36.7%, 100.0%, 93.3%, 100.0%, 96.8%, 100.0%, 100.0%, 96.7%, 96.8%; Gradient boosting: as reported 90.3%, 100.0%, 41.9%, 100.0%, 100.0%, 56.7%, 100.0%, 100.0%, 100.0%, 96.8%, 90.0%, 80.6%; rescaled 83.9%, 100.0%, 41.9%, 100.0%, 100.0%, 93.3%, 100.0%, 100.0%, 100.0%, 96.8%, 86.7%, 80.6%; ETS: as reported 90.3%, 100.0%, 71.0%, 86.7%, 100.0%, 100.0%, 100.0%, 96.8%, 96.7%, 93.5%, 86.7%, 74.2%; rescaled 96.8%, 100.0%, 51.6%, 56.7%, 80.6%, 100.0%, 100.0%, 100.0%, 96.7%, 93.5%, 90.0%, 71.0%Last week's count0%50%100%Last week's count, January 2020: 96.8% of days inside the 90% range as reported, 96.8% rescaledLast week's count, February 2020: 100.0% of days inside the 90% range as reported, 100.0% rescaledLast week's count, March 2020: 80.6% of days inside the 90% range as reported, 54.8% rescaledLast week's count, April 2020: 100.0% of days inside the 90% range as reported, 100.0% rescaledLast week's count, May 2020: 100.0% of days inside the 90% range as reported, 100.0% rescaledLast week's count, June 2020: 70.0% of days inside the 90% range as reported, 70.0% rescaledLast week's count, July 2020: 100.0% of days inside the 90% range as reported, 100.0% rescaledLast week's count, August 2020: 93.5% of days inside the 90% range as reported, 93.5% rescaledLast week's count, September 2020: 73.3% of days inside the 90% range as reported, 93.3% rescaledLast week's count, October 2020: 93.5% of days inside the 90% range as reported, 93.5% rescaledLast week's count, November 2020: 93.3% of days inside the 90% range as reported, 86.7% rescaledLast week's count, December 2020: 74.2% of days inside the 90% range as reported, 77.4% rescaledCalendar regression0%50%100%Calendar regression, January 2020: 100.0% of days inside the 90% range as reported, 100.0% rescaledCalendar regression, February 2020: 96.6% of days inside the 90% range as reported, 96.6% rescaledCalendar regression, March 2020: 38.7% of days inside the 90% range as reported, 38.7% rescaledCalendar regression, April 2020: 83.3% of days inside the 90% range as reported, 36.7% rescaledCalendar regression, May 2020: 100.0% of days inside the 90% range as reported, 100.0% rescaledCalendar regression, June 2020: 100.0% of days inside the 90% range as reported, 93.3% rescaledCalendar regression, July 2020: 100.0% of days inside the 90% range as reported, 100.0% rescaledCalendar regression, August 2020: 100.0% of days inside the 90% range as reported, 96.8% rescaledCalendar regression, September 2020: 100.0% of days inside the 90% range as reported, 100.0% rescaledCalendar regression, October 2020: 100.0% of days inside the 90% range as reported, 100.0% rescaledCalendar regression, November 2020: 100.0% of days inside the 90% range as reported, 96.7% rescaledCalendar regression, December 2020: 100.0% of days inside the 90% range as reported, 96.8% rescaledGradient boosting0%50%100%Gradient boosting, January 2020: 90.3% of days inside the 90% range as reported, 83.9% rescaledGradient boosting, February 2020: 100.0% of days inside the 90% range as reported, 100.0% rescaledGradient boosting, March 2020: 41.9% of days inside the 90% range as reported, 41.9% rescaledGradient boosting, April 2020: 100.0% of days inside the 90% range as reported, 100.0% rescaledGradient boosting, May 2020: 100.0% of days inside the 90% range as reported, 100.0% rescaledGradient boosting, June 2020: 56.7% of days inside the 90% range as reported, 93.3% rescaledGradient boosting, July 2020: 100.0% of days inside the 90% range as reported, 100.0% rescaledGradient boosting, August 2020: 100.0% of days inside the 90% range as reported, 100.0% rescaledGradient boosting, September 2020: 100.0% of days inside the 90% range as reported, 100.0% rescaledGradient boosting, October 2020: 96.8% of days inside the 90% range as reported, 96.8% rescaledGradient boosting, November 2020: 90.0% of days inside the 90% range as reported, 86.7% rescaledGradient boosting, December 2020: 80.6% of days inside the 90% range as reported, 80.6% rescaledETS0%50%100%ETS, January 2020: 90.3% of days inside the 90% range as reported, 96.8% rescaledETS, February 2020: 100.0% of days inside the 90% range as reported, 100.0% rescaledETS, March 2020: 71.0% of days inside the 90% range as reported, 51.6% rescaledETS, April 2020: 86.7% of days inside the 90% range as reported, 56.7% rescaledETS, May 2020: 100.0% of days inside the 90% range as reported, 80.6% rescaledETS, June 2020: 100.0% of days inside the 90% range as reported, 100.0% rescaledETS, July 2020: 100.0% of days inside the 90% range as reported, 100.0% rescaledETS, August 2020: 96.8% of days inside the 90% range as reported, 100.0% rescaledETS, September 2020: 96.7% of days inside the 90% range as reported, 96.7% rescaledETS, October 2020: 93.5% of days inside the 90% range as reported, 93.5% rescaledETS, November 2020: 86.7% of days inside the 90% range as reported, 90.0% rescaledETS, December 2020: 74.2% of days inside the 90% range as reported, 71.0% rescaledJFMAMJJASOND
Show the data
90% ranges for every method, both versions, all 366 days. Width and Winkler score in boardings; the Winkler score charges for width and for misses, so lower is better.
MethodVersionCoverageMonthly rangeMean widthWinkler score
Last week's countAs reported89.6%70.0% to 100.0%462,000686,000
Last week's countRescaled (log scale)88.8%54.8% to 100.0%452,000729,000
Calendar regressionAs reported93.2%38.7% to 100.0%1,407,0002,086,000
Calendar regressionRescaled (log scale)88.0%36.7% to 100.0%2,554,0003,213,000
Gradient boostingAs reported88.0%41.9% to 100.0%457,0001,058,000
Gradient boostingRescaled (log scale)90.2%41.9% to 100.0%449,0001,050,000
ETSAs reported91.3%71.0% to 100.0%392,000522,000
ETSRescaled (log scale)86.3%51.6% to 100.0%20,988,984,00020,989,287,000

Exponential smoothing's rescaled mean width of about 21 billion boardings comes from May, June and July. The days its ranges for those months learned from included forecasts of zero against real weekend counts, an enormous miss on a log scale, so the upper end of those ranges reached more than 200,000 times the forecast. It is one reason the rescaled ranges failed.

Monthly coverage of the 90% range
MonthLast week's count, as reportedLast week's count, rescaledCalendar regression, as reportedCalendar regression, rescaledGradient boosting, as reportedGradient boosting, rescaledETS, as reportedETS, rescaled
January96.8%96.8%100.0%100.0%90.3%83.9%90.3%96.8%
February100.0%100.0%96.6%96.6%100.0%100.0%100.0%100.0%
March80.6%54.8%38.7%38.7%41.9%41.9%71.0%51.6%
April100.0%100.0%83.3%36.7%100.0%100.0%86.7%56.7%
May100.0%100.0%100.0%100.0%100.0%100.0%100.0%80.6%
June70.0%70.0%100.0%93.3%56.7%93.3%100.0%100.0%
July100.0%100.0%100.0%100.0%100.0%100.0%100.0%100.0%
August93.5%93.5%100.0%96.8%100.0%100.0%96.8%100.0%
September73.3%93.3%100.0%100.0%100.0%100.0%96.7%96.7%
October93.5%93.5%100.0%100.0%96.8%96.8%93.5%93.5%
November93.3%86.7%100.0%96.7%90.0%86.7%86.7%90.0%
December74.2%77.4%100.0%96.8%80.6%80.6%74.2%71.0%

Download findings.json

What went wrong or was missed

Each method failed in a way that follows from what it remembers.

Every forecast against the real count, day by day.

Daily boardings, 2020: the observed count in grey behind each method's one-day-ahead forecast. Values above 2 million are drawn at the top edge.

Observed boardingsLast week's countCalendar regressionGradient boostingETS

Each forecast against the observed daily count, 2020Daily observed boardings for 2020 drawn behind each model's one-day-ahead forecast. Boardings fall sharply in mid-March and stay far below their January level for the rest of the year. Exact values are in predictions.csv.Last week's count01M2MLast week's count, January 2020: average miss 158,000 boardings a day, about 104,000 too low on averageLast week's count, February 2020: average miss 67,000 boardings a day, about 1,000 too low on averageLast week's count, March 2020: average miss 231,000 boardings a day, about 219,000 too high on averageLast week's count, April 2020: average miss 15,000 boardings a day, about 2,000 too high on averageLast week's count, May 2020: average miss 28,000 boardings a day, about 3,000 too low on averageLast week's count, June 2020: average miss 50,000 boardings a day, about 24,000 too low on averageLast week's count, July 2020: average miss 21,000 boardings a day, about 7,000 too low on averageLast week's count, August 2020: average miss 21,000 boardings a day, about 1,000 too low on averageLast week's count, September 2020: average miss 29,000 boardings a day, about 5,000 too low on averageLast week's count, October 2020: average miss 19,000 boardings a day, about 4,000 too high on averageLast week's count, November 2020: average miss 30,000 boardings a day, about 25,000 too high on averageLast week's count, December 2020: average miss 47,000 boardings a day, about 4,000 too high on averageCalendar regression01M2MCalendar regression, January 2020: average miss 113,000 boardings a day, about 93,000 too low on averageCalendar regression, February 2020: average miss 90,000 boardings a day, about 85,000 too low on averageCalendar regression, March 2020: average miss 522,000 boardings a day, about 505,000 too high on averageCalendar regression, April 2020: average miss 935,000 boardings a day, about 935,000 too high on averageCalendar regression, May 2020: average miss 697,000 boardings a day, about 697,000 too high on averageCalendar regression, June 2020: average miss 635,000 boardings a day, about 635,000 too high on averageCalendar regression, July 2020: average miss 533,000 boardings a day, about 533,000 too high on averageCalendar regression, August 2020: average miss 540,000 boardings a day, about 540,000 too high on averageCalendar regression, September 2020: average miss 529,000 boardings a day, about 529,000 too high on averageCalendar regression, October 2020: average miss 457,000 boardings a day, about 457,000 too high on averageCalendar regression, November 2020: average miss 380,000 boardings a day, about 380,000 too high on averageCalendar regression, December 2020: average miss 363,000 boardings a day, about 344,000 too high on averageGradient boosting01M2MGradient boosting, January 2020: average miss 117,000 boardings a day, about 31,000 too low on averageGradient boosting, February 2020: average miss 41,000 boardings a day, about 5,000 too high on averageGradient boosting, March 2020: average miss 439,000 boardings a day, about 435,000 too high on averageGradient boosting, April 2020: average miss 41,000 boardings a day, about 4,000 too low on averageGradient boosting, May 2020: average miss 59,000 boardings a day, about 36,000 too low on averageGradient boosting, June 2020: average miss 90,000 boardings a day, about 60,000 too low on averageGradient boosting, July 2020: average miss 81,000 boardings a day, about 72,000 too low on averageGradient boosting, August 2020: average miss 58,000 boardings a day, about 26,000 too low on averageGradient boosting, September 2020: average miss 45,000 boardings a day, about 22,000 too low on averageGradient boosting, October 2020: average miss 46,000 boardings a day, about 20,000 too low on averageGradient boosting, November 2020: average miss 36,000 boardings a day, about 27,000 too high on averageGradient boosting, December 2020: average miss 48,000 boardings a day, about 32,000 too high on averageETS01M2METS, January 2020: average miss 136,000 boardings a day, about 33,000 too low on averageETS, February 2020: average miss 67,000 boardings a day, about 2,000 too high on averageETS, March 2020: average miss 168,000 boardings a day, about 104,000 too high on averageETS, April 2020: average miss 188,000 boardings a day, about 81,000 too high on averageETS, May 2020: average miss 167,000 boardings a day, about 23,000 too high on averageETS, June 2020: average miss 54,000 boardings a day, about 10,000 too low on averageETS, July 2020: average miss 26,000 boardings a day, about 2,000 too low on averageETS, August 2020: average miss 17,000 boardings a day, about 2,000 too low on averageETS, September 2020: average miss 21,000 boardings a day, about 2,000 too low on averageETS, October 2020: average miss 15,000 boardings a day, about 2,000 too high on averageETS, November 2020: average miss 27,000 boardings a day, about 7,000 too high on averageETS, December 2020: average miss 34,000 boardings a day, about 1,000 too high on averageJFMAMJJASOND
Show the data

All 1,464 daily forecasts, with observed counts and both interval bounds, are in the downloads.

Download predictions.csv (ranges as reported) and findings.json (rescaled ranges).

The monitoring rule I would ship

This rule was written after seeing 2020. How each step would be applied, and what to expect, was declared before the replay; the next section shows what it did, unchanged, on 2020 and on 2019.

  1. The baseline always runs. Last week's count is forecast every day beside every model. It costs nothing.
  2. A weekly scorecard. Every Monday, each model's average miss over the last four weeks is compared with the baseline's. Planning runs on the model with the lowest four-week miss, and a model that loses to the baseline is not used, however well it did last quarter.
  3. A break alarm. When the real count falls outside the forecast's 90% range three days in a row, the forecast owner calls a break that day. Planning moves to the baseline, with a wider buffer for the first week because the baseline still repeats the week before the break. A model returns only after beating the baseline on four weeks of post-break days.
  4. A range alarm. Coverage is measured over the last four weeks instead of the whole year. Below 80%, the forecast goes out flagged and planners add buffer until coverage recovers.

The rule, replayed

Run unchanged on 2020, the break alarm fired 2 days after ridership collapsed. In 2019, a year with no break, it fired 5 times, 4 of them around holidays. The rule was written after seeing 2020, so 2020 only shows it fits the year it came from; 2019 and 2018 are the real tests.

2020. Ridership first fell more than 20% below the week before on 14 March. Planning was on gradient boosting, chosen by the scorecard in February; its range missed three days running, the break alarm fired on 16 March and planning moved to last week's count. The range alarm followed on 19 March; neither alarm fired in January or February. Later break alarms: 9 June, 26 December and 31 December. Following the rule missed about 46,000 a day from March to December, against 49,000 for always using last week's count; exponential smoothing won the scorecard back from 17 August.

2019. The break alarm fired about 0.4 times a month (Memorial Day, Thanksgiving, the week after it, Christmas, and once in July). The range alarm fired 2 times and was on for 16% of days. Gradient boosting had the lowest average miss (about 78,000) and last week's count the highest (about 124,000). Following the rule missed about 108,000 and changed model 23 times: better than always using last week's count, worse than staying on gradient boosting.

Two bars, set first. Catch the break within a week: held (2 days). Stay quiet in a normal year, with at most 0.5 break alarms a month and the range alarm on at most 15% of days: failed (on for 16%). The rule stays as written; a holiday calendar for the alarms and a longer hold before switching models are the next test, on data from after 2020.

The 14 predictions I wrote down before the replay (13 held)
  1. Held. Ridership would first fall more than 20% below the same day a week earlier between 12 and 17 March 2020. The drop came on 14 March.
  2. Held. Each method's own break alarm would fire within 4 days of that drop. Last week's count after 4 days, calendar regression 1, gradient boosting 2, exponential smoothing 4.
  3. Held. Planning would be on gradient boosting at the drop, and the rule's break alarm would fire within 4 days. Gradient boosting; the alarm fired after 2 days.
  4. Held. After the drop the range alarm would never fire before the break alarm, and would fire within 10 days. The rule's range alarm fired 5 days after the drop; for every series it came after the break alarm.
  5. Failed. After the break call, planning would stay on last week's count for at least 70% of the rest of 2020. 57% of days: exponential smoothing won the scorecard from 17 August.
  6. Held. Following the rule would beat always using last week's count over 2020, and stay within 10% of it from March to December. About 46,000 a day against 49,000 from March to December; about 56,000 against 60,000 over the year.
  7. Held. At most one break alarm in 2020 before the drop. None fired.
  8. Held. In 2019 gradient boosting would have the lowest average miss, and last week's count would not. Gradient boosting about 78,000, last week's count about 124,000.
  9. Held. In 2019 the scorecard would put planning on a model other than last week's count on more than half of the days. 63% of days.
  10. Held. In 2019 the break alarm would fire 1 to 6 times, at least half of them around holidays. 5 times, 4 around holidays.
  11. Held. In 2019 last week's count would trip the break alarm more often than gradient boosting. 3 against 2.
  12. Held. In 2019 the range alarm would fire at most 4 times and be on for at most 20% of days. 2 times, on for 16% of days.
  13. Held. In 2019 every method's 90% range would hold between 84% and 95% of days. 88.2% to 90.1%.
  14. Held. In 2018 last week's count would trip the break alarm within 3 times of its 2019 count. 3 in 2018, 3 in 2019.

What I would use when

Where each method fits
MethodUse it forWatch out for
Last week's countThe baseline every forecast must beat, and the plan of record in the weeks after a shock. Nothing to fit, nothing to break.Blind for the first week after a break.
Exponential smoothing (for example statsmodels)One or a few series with a steady weekly rhythm; it updates its level every day.Store the weekly pattern as a share of the level, or it can hit zero after a collapse.
Gradient boosting on calendar and recent counts (for example LightGBM or scikit-learn)Many related series with real drivers to feed it: weather, events, prices, promotions.Slow to let go of the old pattern after a break.
Calendar regressionPlanning weeks or months ahead (schedules, budgets), where recent counts do not exist yet.A shock breaks it first and longest.
Packaged forecasting tools (for example Prophet or a cloud forecasting service)Hundreds of series with holidays and seasonality handled for you.They still learn from history, so a break needs the same baseline and alarms, and a tool makes it easier to skip the backtest.

For a first forecast I would ship last week's count with the monitoring rule, then add exponential smoothing as the first challenger. Gradient boosting comes later, once there are drivers to feed it and many series to learn across. One series runs in a scheduled Python job with statsmodels and scikit-learn at no licence cost, writing tomorrow's forecast and range next to yesterday's actual in the warehouse, so the planning dashboard shows both. A forecasting platform waits until there are hundreds of series.

How I would roll this out with a team

Four owners. The operations planning lead owns the plan and decides what an alarm changes in it. One named data scientist owns the forecast and the scorecard. An analytics engineer owns the pipeline, the forecast table and the dashboard. Finance agrees what an hour of supply costs, so the scorecard reads in money as well as boardings.

What it is worth

The measured part: after the collapse, gradient boosting, which had the lowest average miss before it, missed by about 45,000 boardings a day more than last week's count, a clear gap. Pricing it needs two assumptions that nothing in the study measured, so the table tries a low, middle and high setting of each. They are not CTA figures.

What the average March to December gap costs, and how many days of planning on the baseline recover a US$15,000 build (about three engineer-weeks at US$5,000 each)
SettingSupply cost per boardingShare of the missCost of the gap a dayDays to recover the build
LowUS$0.2025%US$2,3007 days
MiddleUS$150%US$23,0001 day
HighUS$2100%US$91,0001 day

The conclusion holds in every row: even the low setting recovers the build within about a week of planning on the baseline instead of gradient boosting after a shock. At the low end of the gap's 95% range (20,000 a day) the low setting takes 15 days. So I would build the rule before the next shock.

Where AI fits

Ask an AI assistant how many people will ride tomorrow and it answers with a plausible number, no range, and no record of how it would have done before. When I use AI on numbers, I ask it for answers I already know, compare it with a simple control the way an experiment would, and turn that judgment into hard checks that the models and agents then follow.

A backtest is a set of answers already known, and last week's count is the control group. So the rule I would give an agent that builds or runs a forecast is the scorecard above: nothing reaches a planner unless it beats the baseline on the backtest and on the last four weeks, and its 90% range holds about nine days in ten. A sibling study, agent-ready data marts, tests the step before: how much documentation an AI model needs to answer correctly from a company's tables.

Method and checks

Replayed unchanged on 2019, a normal year, against bars written down first, the range alarm was on for 16% of days against a 15% bar; that is a failure, and the page reports it.

What was compared

Each forecast is made after the close of one day for the next, for every day of 2020, in twelve monthly blocks. Before each month, every model is fitted on data up to the last day of the previous month: the final 120 training days hold a 60-day tuning block and a 60-day calibration block, and the earlier history fits the candidates. Parameters stay fixed for the month; daily lags and the smoothing state still update with each observed day. Calendar features and US federal holidays may describe the target day because they are known in advance. The protocol, the four methods and their candidate settings were written down before the first run, and no setting was chosen using 2020 outcomes.

  • Last week's count: the count from the same weekday a week earlier.
  • Calendar regression: ridge regression on weekday, holiday, trend and yearly cycle features, scaled inside each fit window.
  • Gradient boosting: the same calendar features plus the counts 1, 7, 14 and 28 days earlier and 7 and 28 day means; tree depth chosen in the tuning block.
  • Exponential smoothing: level, trend and a weekly pattern, all in boardings; damping chosen in the tuning block.

Every forecast passes a check that changing every count after its origin leaves that forecast, its preprocessing, its chosen settings, its fitted parameters and its range unchanged.

How the gaps were tested

A gap is clear when its adjusted p is below 0.05: adjusted p is how often a gap this large would appear by chance if two methods were equally good, corrected for making six comparisons at once. The tests and their settings were written down before they ran, after the first comparison of average misses. Loss is the absolute error. For each pair of methods, d is the daily difference in absolute error. The Diebold-Mariano statistic divides the mean of d by a Newey-West standard error, which allows for errors that run in streaks (Bartlett kernel, bandwidth floor(4 × (T/100)^(2/9)): 5 lags for the full year and for March to December, 3 for January to February), times the small-sample factor √((T − 1)/T), against Student t with T − 1 degrees of freedom, two-sided. p values are Holm-adjusted over the six pairs in each period. A circular block bootstrap with 7-day blocks and 10,000 replicates gives the 95% range for the mean difference (the ranges on the gap chart) as a second check. The January to February and March to December periods were written down before the backtest ran; no other split was tested.

The two kinds of 90% range

As reported: the radius is the 55th smallest of the 60 absolute errors in the calibration block (rank ceil((n + 1) × 0.9)), and the range is the forecast plus or minus that radius, floored at zero. Rescaled (log scale): the same calibration fit and days, the same rank rule, applied to |log(1 + actual) − log(1 + forecast)|; the range runs from (1 + forecast) × e^−r − 1 to (1 + forecast) × e^r − 1. The Winkler score is the width plus 20 times any miss distance (alpha 0.1), averaged over days.

Reference tables: every period, every method

Average miss (MAE), bias and width in boardings a day, rounded to thousands; bias is forecast minus observed. MAPE excludes zero targets (denominator shown). Coverage and width use the ranges as reported. Exact values, and the scaled error MASE, are in results.json.

Full year 2020
ModelPeriodMAEBiasMAPEMAPE nCoverageMean widthInterval n
Last week's countFull year60,000+9,00013.2%36689.6%462,000366
Calendar regressionFull year483,000+449,000131.1%36693.2%1,407,000366
Gradient boostingFull year92,000+19,00024.6%36688.0%457,000366
ETSFull year77,000+14,00022.3%36691.3%392,000366
Before and after the March collapse
ModelPeriodMAEBiasMAPEMAPE nCoverageMean widthInterval n
Last week's countJanuary to February114,000−54,00010.1%6098.3%1,252,00060
Last week's countMarch to December49,000+22,00013.8%30687.9%307,000306
Calendar regressionJanuary to February102,000−89,0008.6%6098.3%667,00060
Calendar regressionMarch to December558,000+555,000155.1%30692.2%1,552,000306
Gradient boostingJanuary to February80,000−13,0008.2%6095.0%487,00060
Gradient boostingMarch to December95,000+26,00027.8%30686.6%452,000306
ETSJanuary to February102,000−16,00010.7%6095.0%688,00060
ETSMarch to December72,000+20,00024.5%30690.5%334,000306
Every monthly block
ModelPeriodMAEBiasMAPEMAPE nCoverageMean widthInterval n
Last week's countJanuary158,000−104,00013.9%3196.8%1,306,00031
Last week's countFebruary67,000−1,0006.1%29100.0%1,195,00029
Last week's countMarch231,000+219,00050.9%3180.6%785,00031
Last week's countApril15,000+2,0005.5%30100.0%734,00030
Last week's countMay28,000−3,00012.2%31100.0%751,00031
Last week's countJune50,000−24,00016.7%3070.0%106,00030
Last week's countJuly21,000−7,0005.6%31100.0%174,00031
Last week's countAugust21,000−1,0005.1%3193.5%146,00031
Last week's countSeptember29,000−5,0007.4%3073.3%74,00030
Last week's countOctober19,000+4,0004.5%3193.5%100,00031
Last week's countNovember30,000+25,00011.1%3093.3%100,00030
Last week's countDecember47,000+4,00018.2%3174.2%96,00031
Calendar regressionJanuary113,000−93,0009.7%31100.0%728,00031
Calendar regressionFebruary90,000−85,0007.5%2996.6%603,00029
Calendar regressionMarch522,000+505,000151.1%3138.7%352,00031
Calendar regressionApril935,000+935,000337.1%3083.3%2,137,00030
Calendar regressionMay697,000+697,000231.1%31100.0%2,209,00031
Calendar regressionJune635,000+635,000190.6%30100.0%2,071,00030
Calendar regressionJuly533,000+533,000120.6%31100.0%1,762,00031
Calendar regressionAugust540,000+540,000123.5%31100.0%1,553,00031
Calendar regressionSeptember529,000+529,000114.1%30100.0%1,538,00030
Calendar regressionOctober457,000+457,00097.6%31100.0%1,461,00031
Calendar regressionNovember380,000+380,00093.3%30100.0%1,282,00030
Calendar regressionDecember363,000+344,00095.4%31100.0%1,178,00031
Gradient boostingJanuary117,000−31,00012.6%3190.3%489,00031
Gradient boostingFebruary41,000+5,0003.5%29100.0%484,00029
Gradient boostingMarch439,000+435,000126.4%3141.9%355,00031
Gradient boostingApril41,000−4,00017.0%30100.0%1,258,00030
Gradient boostingMay59,000−36,00022.4%31100.0%1,261,00031
Gradient boostingJune90,000−60,00026.4%3056.7%216,00030
Gradient boostingJuly81,000−72,00018.2%31100.0%324,00031
Gradient boostingAugust58,000−26,00014.2%31100.0%340,00031
Gradient boostingSeptember45,000−22,00010.4%30100.0%260,00030
Gradient boostingOctober46,000−20,00010.7%3196.8%202,00031
Gradient boostingNovember36,000+27,00012.6%3090.0%155,00030
Gradient boostingDecember48,000+32,00017.9%3180.6%148,00031
ETSJanuary136,000−33,00015.1%3190.3%690,00031
ETSFebruary67,000+2,0005.9%29100.0%685,00029
ETSMarch168,000+104,00044.2%3171.0%460,00031
ETSApril188,000+81,00072.5%3086.7%578,00030
ETSMay167,000+23,00063.3%31100.0%579,00031
ETSJune54,000−10,00019.8%30100.0%662,00030
ETSJuly26,000−2,0006.6%31100.0%545,00031
ETSAugust17,000−2,0004.2%3196.8%174,00031
ETSSeptember21,000−2,0005.6%3096.7%116,00030
ETSOctober15,000+2,0003.7%3193.5%79,00031
ETSNovember27,000+7,00010.6%3086.7%72,00030
ETSDecember34,000+1,00015.3%3174.2%82,00031
US federal holidays (including observed) and other days; descriptive only
ModelPeriodMAEBiasMAPEMAPE nCoverageMean widthInterval n
Last week's countHolidays215,000+177,00067.4%1060.0%497,00010
Last week's countOther days56,000+5,00011.6%35690.4%461,000356
Calendar regressionHolidays189,000+63,00062.5%1090.0%1,105,00010
Calendar regressionOther days492,000+460,000133.0%35693.3%1,415,000356
Gradient boostingHolidays128,000+23,00045.5%1060.0%390,00010
Gradient boostingOther days91,000+19,00024.0%35688.8%459,000356
ETSHolidays240,000+240,00079.0%1030.0%373,00010
ETSOther days72,000+8,00020.7%35693.0%393,000356
Data and limits

These are boardings, not unique riders or the demand that went unserved. The data is the current published version; the replay assumes each day is known at its close and does not rebuild historical publication delays or revisions. All of 2020 is kept, including the pandemic months; March is a descriptive split, not a causal date. No weather data are used. Holiday comparisons are descriptive. The study is unaffiliated with the Chicago Transit Authority and the City of Chicago, and uses no employer data.

Use this at your company

To run the same test on your own demand, paste this prompt into an AI assistant along with your daily counts.

This method comes from Diogo Travassos's study "Daily demand forecasting" (https://diogotravassos.dev/daily-demand-forecasting/). If you can open links, read it first: it works the method through end to end, with its checks. The steps below stand on their own if you can't.

Help me find which next-day forecast of our daily demand survives a sudden break, and set a rule that says when a forecast has stopped working.

Data: at least three years of one daily count we plan on (orders, tickets or rides), with dates, our holiday calendar and any forecasts we stored at the time.

Steps:
1. Before running anything, write down the methods, settings and bars for success.
2. Replay a past year day by day. Refit each method monthly on earlier data only, and give each forecast a 90% range sized from its recent misses.
3. Include last week's count for the same weekday as the baseline every method must beat.
4. Compare average misses before and after any sudden break, and say whether each gap is clear or could be chance, allowing for the number of comparisons.
5. Test this rule: each Monday, plan on the method with the lowest miss over the last four weeks; call a break when the count falls outside the range three days running; flag the forecast when four-week range coverage drops below 80%.

Checks: change every count after a forecast's date and confirm the forecast stays put; check range coverage month by month; replay the rule on a normal year and count false alarms.

Report: each method's average miss by period, whether the gaps are clear, monthly range coverage, how fast the alarms fired after a real break and how often they fired without one, and the limits: one series and one break prove little alone.

In your report, say which study you followed and link it: https://diogotravassos.dev/daily-demand-forecasting/