Skip to content

Diogo Travassos Data leadership · Analytics · Decision-making

Public dataAssumed costs

Forecast for a decision: daily capacity from a month-ahead forecast

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

Planning capacity above the forecast average cost about 13% less than planning at it, on Chicago transit demand in 2017 to 2019 at assumed costs.

In the base case a missed boarding is assumed to cost three times an empty place, which sets a plan at the 75th percentile, not a measured best; a plan at the 67th percentile saved about as much in 2017 to 2019 and did better in 2023 to 2025 and in the collapse. The 75th percentile plan cost about 4% less in 2023 to 2025 and about 13% more in the 2020 collapse; both differences could be zero.

Key figures for the selected cost setting
Normal years, 2017 to 201913% lowercost than the average plan, at the assumed cost; 95% interval 6% to 22% lowerNormal years, 2023 to 20254% lowercost than the average plan, at the assumed cost; 95% interval 7% higher to 13% lower, could be zeroCollapse, March to December 202013% highercost than the average plan, at the assumed cost; 95% interval 52% higher to 5% lower, could be zeroRe-plan check fired, 2020Mar 164 of the last 7 days outside the forecast's middle 90%; tested on one collapse, it also fired in 17 of 72 normal months

Main limitationThe two costs are assumptions, not transit-agency figures: a missed boarding is set to cost three times an empty place, and the answer moves with that ratio.

In plain words

Any operation that commits capacity before demand arrives faces the same choice: drivers on a ride-hailing app, agents in a support centre, pickers in a warehouse. Schedule too little and customers wait or leave; schedule too much and you pay for idle capacity. The forecast says what demand will probably be. The decision is how far above it to plan, and that depends on which mistake costs more.

The textbook rule: if running short costs three times running over, cover demand on three days in four, which means planning at the 75th percentile of the forecast. Many teams plan to the forecast average instead. I replayed both on Chicago transit boardings for every month from 2017 to 2025, planning each month from the last day of the month before, so the same rule meets two normal stretches and the 2020 collapse. The boardings stand in for the demand a marketplace or a service team plans against; they are public, so no customer data is shared.

The answer: planning above the average paid in 2017 to 2019; in 2023 to 2025 and in the 2020 collapse the difference could be zero. At the same assumed cost a plan at the 67th percentile did as well as one at the 75th in 2017 to 2019 and better later, so the 75th is the arithmetic of the assumed cost, not a measured best. A simple check of the forecast against actual demand fired in the first week of the one collapse tested, and also in some normal months.

Average plan
Enough capacity for the forecast's average day.
Percentile plan
Enough capacity to cover demand on a set share of days, set by the two costs: shortage cost divided by shortage plus surplus cost, so three to one gives the 75th percentile.
Capacity unit
A block of daily boarding places, 10,000 unless you change it below; not a vehicle or a shift.
95% interval
Where a result would likely land on another sample of months. When it spans zero, the difference could be zero.

What it is worth

The replay counts cost in empty places. To put it in dollars I assume an empty boarding place costs US$1, so a missed boarding at three times costs US$3; every dollar figure doubles at US$2 a place and halves at US$0.50.

Saving of the percentile plan against the average plan, at US$1 per empty place and 10,000 boardings per capacity unit
A missed boarding costsPlan at2017 to 2019, a year2023 to 2025, a year2020 collapse, ten months
US$267th percentileUS$11.8 million savedUS$0.6 million saved, could be zeroUS$1.4 million lost, could be zero
US$375th percentileUS$15.2 million savedUS$2.4 million saved, could be zeroUS$5.1 million lost, could be zero
US$480th percentileUS$20.2 million savedUS$6.1 million saved, could be zeroUS$8.6 million lost, could be zero
US$990th percentileUS$59.7 million savedUS$39.2 million savedUS$6.6 million lost, could be zero

In every row the percentile plan saved money in 2017 to 2019, and one year of that saving was more than its whole loss in the 2020 collapse, a loss that could be zero. In 2023 to 2025 the saving was smaller and clear only at nine times; at three times it would take about two years of it to cover the 2020 loss. So, as a policy to test on a team's own demand and measured costs, I would plan above the average whenever a missed customer costs more than idle capacity, and run the re-plan check beside it, because a collapse is where the rule can lose money; ten months of one collapse cannot tell that loss from zero.

At three times that is about US$0.03 a boarding in 2017 to 2019, on a system averaging about 1.3 million boardings a day; scale it by volume for a smaller operation.

The evidence

Change the two assumptions here. The hero and every chart below follow them, except the re-plan check and the forecast comparison, which do not depend on them.

A missed boarding costs this many empty places
Boardings per capacity unit (daily places)

Normal years against the 2020 collapse

Cost of the percentile plan against the average plan, by period; 95% month-block bootstrap interval
PeriodMonthsCost against the average plan95% intervalMonths cheaperDays within plan
Normal, 2017 to 20193613% lower6% to 22% lower21 of 3673%
Normal, 2023 to 2025364% lower7% higher to 13% lower15 of 3676%
Collapse, March to December 20201013% higher52% higher to 5% lower2 of 1081%
Recovery, 2021 to 20222413% lower1% higher to 25% lower15 of 2478%

The 75th percentile plan aims to cover demand on 75% of days; the last column shows how often it did. In the 2021 to 2022 recovery it cost about 13% less, a difference that could be zero. Its worst months were October 2020 (about 2.9 times the cost), September 2020 (91% more) and October 2017 (88% more), when demand came in below the plan and the extra capacity sat empty.

Show the monthly replay as a table
Realized cost by month, million cost units (1 cost unit = one empty boarding place)
MonthPercentile planAverage planSaved by percentile plan
How far above the forecast: plans at four percentiles against the average plan, all at the assumed three-to-one cost and 10,000 boardings per unit; 95% interval in brackets
Plan at2017 to 20192023 to 20252020 collapse
Median4% lower (2% higher to 10% lower, could be zero)about the same (6% higher to 5% lower, could be zero)3% lower (4% higher to 8% lower, could be zero)
67th percentile13% lower (7% to 21% lower)6% lower (1% to 11% lower)about the same (13% higher to 10% lower, could be zero)
75th percentile13% lower (6% to 22% lower)4% lower (7% higher to 13% lower, could be zero)13% higher (52% higher to 5% lower, could be zero)
80th percentile10% lower (0% to 20% lower)1% higher (19% higher to 12% lower, could be zero)29% higher (1% to 98% higher)

All four plans are scored at the same assumed cost of three to one. The 75th percentile is the textbook rule for that cost; the 67th percentile saved as much in 2017 to 2019 and did better later, so the replay supports planning somewhat above the average, not one exact percentile.

Why plan above the forecast: one month up close

December 2025: the 75th percentile plan, 43 to 82 units a day

One capacity unit is 10,000 daily boarding places. The model expected it to cost about 7% less than the average plan (40 to 76 units); it always expects a saving, so only the outcome counts. In fact it cost 11% less than the average plan, and demand fit within it on 8 of 31 days.

The widest miss was Thursday, December 25, about 489,000 boardings below planned capacity.

Forecast method this month: exponential smoothing on log boardings with a weekly pattern, chosen on the 12 months before the cutoff.

Show the daily plan as a table
Daily plan for December 2025: forecast draws in thousands of boardings, units of 10,000 boardings.
DayLow (5%)Forecast averageHigh (95%)Plan unitsAverage plan unitsActualActual vs plan
Mon Dec 13856629757066986above plan
Tue Dec 26437351,05578741,070above plan
Wed Dec 36477461,08478751,102above plan
Thu Dec 46387381,05377741,007above plan
Fri Dec 56267321,0447673991above plan
Sat Dec 64705527845755660above plan
Sun Dec 73634266064443514above plan
Mon Dec 85856889627169983above plan
Tue Dec 96267611,06378761,075above plan
Wed Dec 106287641,04879761,072above plan
Thu Dec 116177521,03178751,069above plan
Fri Dec 1260474099777741,000above plan
Sat Dec 134565567535856606above plan
Sun Dec 143514305824543433within plan
Mon Dec 155646929347269877above plan
Tue Dec 166237601,03279761,026above plan
Wed Dec 176387591,02979761,060above plan
Thu Dec 186177391,0127674978above plan
Fri Dec 196047199917472892above plan
Sat Dec 204535377245654679above plan
Sun Dec 213514115484341518above plan
Mon Dec 225246518506965797above plan
Tue Dec 235327119217771813above plan
Wed Dec 245367169277772593within plan
Thu Dec 254707079307771281within plan
Fri Dec 264156909107669630within plan
Sat Dec 273125196845752586above plan
Sun Dec 282414045894440423within plan
Mon Dec 293876589487166674within plan
Tue Dec 304287381,0537974739within plan
Wed Dec 315347511,0548275740within plan

The cost of each choice on the busiest planned day

On Wednesday, December 31, the peak planned day, 82 units has the lowest expected cost. Covering only the forecast average (75 units) costs about 13% more that day.

The same curve measured from its lowest point, zoomed to the units around the two plans.

Show the cost curve as a table
Expected cost on Wednesday, December 31 by number of units scheduled, in cost units (1 cost unit = one empty boarding place)
Units scheduledExpected costAbove the cheapest choiceMarked

When to re-plan

The check needs only what a planner sees each day: did demand land outside the middle 90% of that day's forecast? When it did on 4 of the last 7 days, re-plan. In 2020 it fired on the fourth day that demand fell outside the range. In normal years it also fired in 17 of 72 months, 13 of them December to February, when the holidays threw the forecast off too.

Demand fell outside the middle 90% on 14% of days in 2017 to 2019 and 13% in 2023 to 2025, against 10% if the ranges were right: the ranges are too narrow, which is why the check also fires in normal months.

Show the check by period
Days outside the middle 90% of the forecast and firings of the re-plan check (4 of the last 7 days outside), by period
PeriodDaysDays outsideDays the check firedMonths with a firingFirst firing
Normal, 2017 to 20191095153 (14%)1018 of 36January 12, 2017
Collapse, March to December 202030636 (12%)232 of 10March 16, 2020
Recovery, 2021 to 202273086 (12%)567 of 24June 3, 2021
Normal, 2023 to 20251096146 (13%)979 of 36January 10, 2023

Which forecast to plan from

A month ahead in normal years, calendar regression (weekday, holidays, a trend and the annual cycle) had the smallest error: about 82,000 boardings a day off in 2017 to 2019 against 144,000 for repeating last week, and 56,000 against 88,000 in 2023 to 2025. In the 2020 collapse it had the largest error, off by 98% of an average day, because it keeps forecasting the old level; repeating last week had the smallest.

The capacity plan used neither: each month it chose between repeating last week and smoothing on log boardings. Its error was not clearly different from repeating last week in either normal period.

Show the forecast errors as a table
Average daily forecast error a month ahead (MAE, boardings), as a share of an average day, and the difference from repeating last week with its 95% month-block bootstrap interval
PeriodModelError a dayShare of an average dayMinus repeat-last-weekReading
Normal, 2017 to 2019Repeating last week144k11%reference
Normal, 2017 to 2019Calendar regression82k6%−61k (−96k to −31k)smaller error
Normal, 2017 to 2019Gradient boosting87k7%−57k (−86k to −31k)smaller error
Normal, 2017 to 2019Exponential smoothing136k11%−8k (−26k to +13k)could be zero
Normal, 2017 to 2019The plan's own forecast143k11%−1k (−15k to +17k)could be zero
Normal, 2023 to 2025Repeating last week88k10%reference
Normal, 2023 to 2025Calendar regression56k7%−31k (−48k to −15k)smaller error
Normal, 2023 to 2025Gradient boosting77k9%−11k (−24k to +1k)could be zero
Normal, 2023 to 2025Exponential smoothing76k9%−11k (−21k to −3k)smaller error
Normal, 2023 to 2025The plan's own forecast80k9%−8k (−18k to +2k)could be zero
Collapse, March to December 2020Repeating last week85k21%reference
Collapse, March to December 2020Calendar regression401k98%+316k (+183k to +474k)larger error
Collapse, March to December 2020Gradient boosting104k25%+19k (+2k to +37k)larger error
Collapse, March to December 2020Exponential smoothing98k24%+13k (−6k to +40k)could be zero
Collapse, March to December 2020The plan's own forecast83k20%−2k (−10k to +4k)could be zero
Recovery, 2021 to 2022Repeating last week66k11%reference
Recovery, 2021 to 2022Calendar regression202k33%+136k (+70k to +208k)larger error
Recovery, 2021 to 2022Gradient boosting73k12%+7k (−6k to +20k)could be zero
Recovery, 2021 to 2022Exponential smoothing57k10%−8k (−17k to 0k)could be zero
Recovery, 2021 to 2022The plan's own forecast58k10%−7k (−16k to +1k)could be zero

What went wrong or was missed

What I would use when

Where each way of turning a forecast into capacity fits
ApproachUse it forWatch out for
Plan to the forecast averageHardly ever: with equal costs the right target is the median.At equal costs the median plan was cheaper in 2017 to 2019 and in the collapse, at every unit size; at higher shortage costs the percentile plan was cheaper in 2017 to 2019 at every setting.
A percentile set by the two costs (the newsvendor rule, as here)Capacity committed ahead: shifts, fleet, contracted hours.It needs an honest forecast range, and it can lose money when demand breaks downward (one break tested; the difference could be zero).
A fixed buffer on top of the forecastA stopgap while the two costs are agreed.It ignores the cost ratio and each day's uncertainty. Not tested here.
The re-plan checkBeside any plan, as a candidate monitor: tested on one collapse, it needs more breaks and normal months before routine use.It also fires in some normal months; tune it on the team's own history.
Scheduling or workforce software (shift rostering, linear programming)When shift rules and contracts are the hard part.It optimises whatever demand number it is given: feed it the percentile.

For a first version I would plan at the percentile the two costs set, run the re-plan check beside it and fall back to repeating last week after a break: a monthly Python job that writes plan and range next to actuals, with no licence cost. Scheduling software comes later, once shift rules are the constraint.

How I would roll this out with a team

Owners. The operations planning lead owns the plan and decides what a firing changes. Finance owns the two costs, agreed once and reviewed each quarter. A data scientist owns the forecast, its range, the replay and the check; an analytics engineer owns the pipeline, the plan table and the dashboard.

First two weeks (about one engineer-week, plus one meeting with finance and operations). Agree the two costs, which set the percentile, and replay current planning on two or three years of the team's own data.

Weeks three and four (about two engineer-weeks). A monthly job writes each day's range, the percentile plan and the average plan beside actuals; a dashboard shows cost against the average plan and days covered against the target.

Week five (about half an engineer-week). The check runs daily and alerts the planning lead by name, with the response agreed in advance: re-plan the rest of the month on the simple forecast with a wider range.

Every month. Thirty minutes with the planning lead and finance on cost, coverage and every firing, false or real.

When the check fires. The planning lead hears it from the forecast owner the same day. The executive gets one line, written as a decision: demand broke from the forecast this week, we are re-planning on the simple forecast, and capacity costs more until demand settles.

In all, on my estimates: about four engineer-weeks over five weeks and no licence cost, then the monthly review. The hard part is getting finance and operations to agree the two costs; after that the plan is a formula. The first hire is a data scientist who owns forecast and plan together, paired with the planning lead.

Where AI fits

Ask an AI assistant how many drivers or agents to schedule next month and it gives a confident number with no range and no track record. Those are the dangerous errors: plausible numbers with no error attached. 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 build that judgment into hard checks the models follow.

Here the 108 replayed months are the known answers and the average plan is the control. An agent drafting a capacity plan should state the costs behind its percentile, beat the average plan on the replay before anyone sees it, and hand over to a person when the check fires. A live sibling study, agent-ready data marts, tests the step before: how much documentation a model needs to answer correctly from a company's tables.

The replay is scored by period, with the collapse as its own stress test. Only realized costs count as evidence, because the modeled saving cannot be negative by construction.

Method and checks

How the replay works
  • Data. Chicago Transit Authority systemwide daily boardings from the City of Chicago Data Portal (dataset 6iiy-9s97). The study reads 2001 to 2025; the 2026 rows in the file are not used. Boardings count trips taken, not people, and they cannot show trips lost to crowding.
  • One cutoff per month. Every month from January 2017 to December 2025 is planned from the last day of the month before. No actual from inside the month is used, including its earlier days.
  • Forecast for the plan. Two simple methods compete each month: repeating the last observed week, and exponential smoothing on log boardings with a damped trend and weekly pattern. Each is rerun from the 12 previous month-ends; the one with the smaller error over those months is used.
  • Uncertainty. Those 12 earlier runs give signed errors by days ahead. Each planned day applies the errors from within three days of its own horizon, up to 84 equally weighted draws. With only 12 origins the tails are coarse, and a sudden break such as March 2020 is not anticipated.
  • Decision rule. For capacity q against demand D, expected cost is C(q) = co E[max(q − D, 0)] + cu E[max(D − q, 0)]. The cheapest plan is the lower empirical quantile at cu / (cu + co). Whole units are chosen by comparing the two neighbouring unit counts in C itself; ties go to fewer units.
  • Comparison. The average plan covers the average of the same draws, rounded to the nearest unit. The modeled saving cannot be negative by construction, so only realized costs against actual boardings count as evidence.
  • Periods, fixed before the run. Normal years 2017 to 2019 and 2023 to 2025; the collapse, March to December 2020, as a separate stress test; the 2021 to 2022 recovery reported on its own. January and February 2020 are replayed and belong to no period. Each period's 95% interval resamples its months with replacement (10,000 replicates, seed 20261011). A result whose interval reaches zero is reported as possibly zero.
  • Re-plan check, fixed before the run. A day is outside when boardings fall below the 5th or above the 95th percentile of its forecast draws; the check fires when 4 of the last 7 days are outside. Re-planning itself and its cost are not simulated.
  • Forecast comparison. Four models rebuilt to forecast a whole month from the same cutoffs: repeating last week; calendar regression (weekday, US federal holidays, a linear trend and the annual cycle); gradient boosting on the same calendar plus recent lags, fed its own forecasts; and exponential smoothing on boardings. Each fits the 730 days before the cutoff and picks between two settings by its error on the month before. Ridge and gradient boosting are written in numpy.
  • Assumptions, not findings. Costs are relative: an empty boarding place costs 1 cost unit and a missed boarding costs the chosen multiple. A capacity unit is a block of daily boarding places, not a vehicle, route or shift. Holidays, weather and events are not modeled in the plan. This is a replay on a current data vintage, assuming each day is known at its close; it is not an operational plan.
Run settings and checks
  • Planned months: 108 (January 2017 to December 2025), 25 settings each: 2,700 states. Bootstrap: 10,000 replicates, seed 20261011, one set of month resamples per period shared by every setting and model.
  • Source quirk: the 31 rows of July 2012 carry a 07:00 time and are read as calendar dates; no fit reaches back to 2012.
  • Tests perturb or delete everything after a cutoff and require identical forecasts, draws and plans.

Downloads: results by period and setting (CSV) · monthly replay (CSV) · every precomputed daily plan (CSV, gzipped) · forecast errors by month and model (CSV) · re-plan check by day (CSV) · data notice

Use this at your company

Paste this into an AI assistant along with your own demand history to run the same test on your capacity plan.

This method comes from Diogo Travassos's study "Capacity from a forecast" (https://diogotravassos.dev/forecast-to-capacity/site/index.html). 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 turn a demand forecast into a capacity plan (shifts, vehicles, contracted hours) and test it on our history. The question: how far above the forecast should we plan, and when should we re-plan?

Data: daily demand counts for several years, plus the two costs agreed with finance: one unit of capacity left idle, and one unit of demand we could not serve.

Method, in order:
Replay history a month at a time, using only data up to the last day of the month before.
Forecast each month with two simple methods (repeat last week; exponential smoothing with a weekly pattern) and give each day a range from the errors of earlier forecasts at the same distance ahead.
Plan each day at the percentile the costs set: the shortage cost divided by the sum of both costs.
Compare its realized cost with a plan at the forecast average, period by period, and keep any demand shock as a separate stress test.
Add a re-plan check that fires when most days of the last week fall outside the range.

Checks before trusting the answer: changing data after a cutoff must not move that month's plan; count only realized costs, since the expected saving is positive by construction; report how often demand fit within the plan.

Report back: the percentile and its saving by period with its uncertainty, coverage by month, true and false re-plan alarms, and the limits: the costs are assumptions and a replay is not an operational plan.

In your report, say which study you followed and link it: https://diogotravassos.dev/forecast-to-capacity/site/index.html