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.
| Normal years, 2017 to 201913% lowercost than the average plan, at the assumed cost; 95% interval 6% to 22% lower | Normal years, 2023 to 20254% lowercost than the average plan, at the assumed cost; 95% interval 7% higher to 13% lower, could be zero | Collapse, March to December 202013% highercost than the average plan, at the assumed cost; 95% interval 52% higher to 5% lower, could be zero | Re-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.
| A missed boarding costs | Plan at | 2017 to 2019, a year | 2023 to 2025, a year | 2020 collapse, ten months |
|---|---|---|---|---|
| US$2 | 67th percentile | US$11.8 million saved | US$0.6 million saved, could be zero | US$1.4 million lost, could be zero |
| US$3 | 75th percentile | US$15.2 million saved | US$2.4 million saved, could be zero | US$5.1 million lost, could be zero |
| US$4 | 80th percentile | US$20.2 million saved | US$6.1 million saved, could be zero | US$8.6 million lost, could be zero |
| US$9 | 90th percentile | US$59.7 million saved | US$39.2 million saved | US$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.
Normal years against the 2020 collapse
| Period | Months | Cost against the average plan | 95% interval | Months cheaper | Days within plan |
|---|---|---|---|---|---|
| Normal, 2017 to 2019 | 36 | 13% lower | 6% to 22% lower | 21 of 36 | 73% |
| Normal, 2023 to 2025 | 36 | 4% lower | 7% higher to 13% lower | 15 of 36 | 76% |
| Collapse, March to December 2020 | 10 | 13% higher | 52% higher to 5% lower | 2 of 10 | 81% |
| Recovery, 2021 to 2022 | 24 | 13% lower | 1% higher to 25% lower | 15 of 24 | 78% |
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
| Month | Percentile plan | Average plan | Saved by percentile plan |
|---|
| Plan at | 2017 to 2019 | 2023 to 2025 | 2020 collapse |
|---|---|---|---|
| Median | 4% 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 percentile | 13% lower (7% to 21% lower) | 6% lower (1% to 11% lower) | about the same (13% higher to 10% lower, could be zero) |
| 75th percentile | 13% 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 percentile | 10% 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
| Day | Low (5%) | Forecast average | High (95%) | Plan units | Average plan units | Actual | Actual vs plan |
|---|---|---|---|---|---|---|---|
| Mon Dec 1 | 385 | 662 | 975 | 70 | 66 | 986 | above plan |
| Tue Dec 2 | 643 | 735 | 1,055 | 78 | 74 | 1,070 | above plan |
| Wed Dec 3 | 647 | 746 | 1,084 | 78 | 75 | 1,102 | above plan |
| Thu Dec 4 | 638 | 738 | 1,053 | 77 | 74 | 1,007 | above plan |
| Fri Dec 5 | 626 | 732 | 1,044 | 76 | 73 | 991 | above plan |
| Sat Dec 6 | 470 | 552 | 784 | 57 | 55 | 660 | above plan |
| Sun Dec 7 | 363 | 426 | 606 | 44 | 43 | 514 | above plan |
| Mon Dec 8 | 585 | 688 | 962 | 71 | 69 | 983 | above plan |
| Tue Dec 9 | 626 | 761 | 1,063 | 78 | 76 | 1,075 | above plan |
| Wed Dec 10 | 628 | 764 | 1,048 | 79 | 76 | 1,072 | above plan |
| Thu Dec 11 | 617 | 752 | 1,031 | 78 | 75 | 1,069 | above plan |
| Fri Dec 12 | 604 | 740 | 997 | 77 | 74 | 1,000 | above plan |
| Sat Dec 13 | 456 | 556 | 753 | 58 | 56 | 606 | above plan |
| Sun Dec 14 | 351 | 430 | 582 | 45 | 43 | 433 | within plan |
| Mon Dec 15 | 564 | 692 | 934 | 72 | 69 | 877 | above plan |
| Tue Dec 16 | 623 | 760 | 1,032 | 79 | 76 | 1,026 | above plan |
| Wed Dec 17 | 638 | 759 | 1,029 | 79 | 76 | 1,060 | above plan |
| Thu Dec 18 | 617 | 739 | 1,012 | 76 | 74 | 978 | above plan |
| Fri Dec 19 | 604 | 719 | 991 | 74 | 72 | 892 | above plan |
| Sat Dec 20 | 453 | 537 | 724 | 56 | 54 | 679 | above plan |
| Sun Dec 21 | 351 | 411 | 548 | 43 | 41 | 518 | above plan |
| Mon Dec 22 | 524 | 651 | 850 | 69 | 65 | 797 | above plan |
| Tue Dec 23 | 532 | 711 | 921 | 77 | 71 | 813 | above plan |
| Wed Dec 24 | 536 | 716 | 927 | 77 | 72 | 593 | within plan |
| Thu Dec 25 | 470 | 707 | 930 | 77 | 71 | 281 | within plan |
| Fri Dec 26 | 415 | 690 | 910 | 76 | 69 | 630 | within plan |
| Sat Dec 27 | 312 | 519 | 684 | 57 | 52 | 586 | above plan |
| Sun Dec 28 | 241 | 404 | 589 | 44 | 40 | 423 | within plan |
| Mon Dec 29 | 387 | 658 | 948 | 71 | 66 | 674 | within plan |
| Tue Dec 30 | 428 | 738 | 1,053 | 79 | 74 | 739 | within plan |
| Wed Dec 31 | 534 | 751 | 1,054 | 82 | 75 | 740 | within 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
| Units scheduled | Expected cost | Above the cheapest choice | Marked |
|---|
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
| Period | Days | Days outside | Days the check fired | Months with a firing | First firing |
|---|---|---|---|---|---|
| Normal, 2017 to 2019 | 1095 | 153 (14%) | 101 | 8 of 36 | January 12, 2017 |
| Collapse, March to December 2020 | 306 | 36 (12%) | 23 | 2 of 10 | March 16, 2020 |
| Recovery, 2021 to 2022 | 730 | 86 (12%) | 56 | 7 of 24 | June 3, 2021 |
| Normal, 2023 to 2025 | 1096 | 146 (13%) | 97 | 9 of 36 | January 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
| Period | Model | Error a day | Share of an average day | Minus repeat-last-week | Reading |
|---|---|---|---|---|---|
| Normal, 2017 to 2019 | Repeating last week | 144k | 11% | reference | |
| Normal, 2017 to 2019 | Calendar regression | 82k | 6% | −61k (−96k to −31k) | smaller error |
| Normal, 2017 to 2019 | Gradient boosting | 87k | 7% | −57k (−86k to −31k) | smaller error |
| Normal, 2017 to 2019 | Exponential smoothing | 136k | 11% | −8k (−26k to +13k) | could be zero |
| Normal, 2017 to 2019 | The plan's own forecast | 143k | 11% | −1k (−15k to +17k) | could be zero |
| Normal, 2023 to 2025 | Repeating last week | 88k | 10% | reference | |
| Normal, 2023 to 2025 | Calendar regression | 56k | 7% | −31k (−48k to −15k) | smaller error |
| Normal, 2023 to 2025 | Gradient boosting | 77k | 9% | −11k (−24k to +1k) | could be zero |
| Normal, 2023 to 2025 | Exponential smoothing | 76k | 9% | −11k (−21k to −3k) | smaller error |
| Normal, 2023 to 2025 | The plan's own forecast | 80k | 9% | −8k (−18k to +2k) | could be zero |
| Collapse, March to December 2020 | Repeating last week | 85k | 21% | reference | |
| Collapse, March to December 2020 | Calendar regression | 401k | 98% | +316k (+183k to +474k) | larger error |
| Collapse, March to December 2020 | Gradient boosting | 104k | 25% | +19k (+2k to +37k) | larger error |
| Collapse, March to December 2020 | Exponential smoothing | 98k | 24% | +13k (−6k to +40k) | could be zero |
| Collapse, March to December 2020 | The plan's own forecast | 83k | 20% | −2k (−10k to +4k) | could be zero |
| Recovery, 2021 to 2022 | Repeating last week | 66k | 11% | reference | |
| Recovery, 2021 to 2022 | Calendar regression | 202k | 33% | +136k (+70k to +208k) | larger error |
| Recovery, 2021 to 2022 | Gradient boosting | 73k | 12% | +7k (−6k to +20k) | could be zero |
| Recovery, 2021 to 2022 | Exponential smoothing | 57k | 10% | −8k (−17k to 0k) | could be zero |
| Recovery, 2021 to 2022 | The plan's own forecast | 58k | 10% | −7k (−16k to +1k) | could be zero |
What went wrong or was missed
- In the collapse the plan sat above a forecast that was already too high: from March to December 2020 the forecast ran about 39,000 boardings a day above demand on average, and the percentile added empty places on top. Re-planning after the check fired was not simulated, so how much of the loss it would have saved is unknown.
- The plan uses the weaker forecast. Its two methods were fixed before the comparison above existed. Feeding it calendar regression, with the check switching it to repeating last week after a break, is the next run I would do.
- Part of the normal-year saving may come from a forecast that ran low: about 49,000 boardings a day below demand in 2017 to 2019 and 14,000 below in 2023 to 2025, where the saving was smaller. I did not separate the two.
- Januaries fell short of the 75% target in every normal year: 6, 3 and 7 of 31 days in 2017 to 2019 and 5, 18 and 5 in 2023 to 2025. Each January is forecast from the holiday weeks of late December, a likely cause I did not test.
Show coverage by month
Days on which actual boardings fit within the percentile plan, by replayed month Month Days within plan Share of days Target
What I would use when
| Approach | Use it for | Watch out for |
|---|---|---|
| Plan to the forecast average | Hardly 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 forecast | A stopgap while the two costs are agreed. | It ignores the cost ratio and each day's uncertainty. Not tested here. |
| The re-plan check | Beside 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