Stop Adding Eight Minutes to Every Order.
← Chapter 193
Capstone 31 · Delivery Operations
Plain-language Brief

Stop Adding Eight Minutes to Every Order.

The flat buffer hits the service target on average and misses it for one order in four when the zone is busy. A buffer that varies costs the same and keeps the promise to everybody.

To  Head of Delivery Operations
From  Analysis
Re  Eighty-four days of orders, one city zone, 41,410 deliveries
Where this comes from
Chapter Chapter 193 · Gradient Boosting for Tabular Regression
Part Part XXXI · Capstone Projects: Machine Learning
Dataset capstone-gradient-boosting-regression.xlsx
Notebook View the analysis

Recommendation

Bottom line

Replace the flat 8-minute buffer with one the model sets per order. Easy orders get about 2 minutes, hard ones about 12, and the average across all orders is slightly less than the 8 you add today. The overall late rate barely moves. What changes is who is late, and that is the part customers experience.

What is wrong with the current number

The app shows a prediction plus 8 minutes for every order. Overall, 11.8 percent of orders arrive after the displayed time, comfortably inside your 15 percent target. That headline figure is hiding the problem.

Table 1. Share of orders arriving after the displayed time, under the current flat 8-minute buffer.
Kind of orderArrive late today
Off peak, short distance1.9%
Peak hours, short distance13.1%
Peak hours, longer distance17.0%
Heavy rain19.8%
Busy zone (over 2 orders per courier)21.8%

The customers who order at dinner time, live further out, or order when it is raining are late three to eleven times as often as everybody else. They are the same customers every week, and the average across the zone tells you nothing about them.

Paired bars of late rate across five kinds of order. A flat buffer ranges from 3 to 25 percent; a per-order buffer stays between 15 and 17.
Figure 1. Both policies pad by the same 6.7 minutes on average and both land near 15 percent overall. The flat buffer keeps its promise to easy orders and breaks it for the hard ones.

Why a fixed buffer cannot fix it

Eight minutes is roughly right for a typical order and wrong at both ends. Our model is accurate to about 5 minutes on a quiet afternoon and about 12 when the zone has more than two pending orders per courier. That is not a flaw we can train away, it is a fact about deliveries: some are simply less predictable than others.

The comparison that settles it

We set a flat buffer to the same average padding as the model's per-order buffer, so both spend exactly the same amount of promised time. Overall late rate: 15.0 percent for the flat buffer, 15.4 for the per-order one. Effectively identical. Across the six kinds of order above, the flat buffer's late rate ranges over 22 percentage points and the per-order one over three.

What we would change

Show the model's per-order estimate. It gives about 2 minutes of padding to the easiest tenth of orders, about 7 to a typical one and about 12 to the hardest tenth. Nothing is padded arbitrarily; the padding tracks how confident the model actually is.

There is one decision we cannot make for you. Being late costs about three times what being early costs, and on that basis the cheapest policy leaves 25 percent of orders late and saves about 13 percent against today's cost. Your service target of 15 percent costs slightly more than the cheapest option. Both are defensible; the gap between them is what the service promise is worth to the business.

Bar chart in seconds of prediction error removed: four engineered features 101 seconds, changing model family 17 seconds, twenty hyperparameter configurations 4 seconds.
Figure 2. Where the accuracy actually came from. The three decisions are usually made in the reverse of the order that matters.

Two things worth knowing before this ships

Longer quoted times may lose orders. A customer told 65 minutes may order elsewhere. That effect is real, it is not in this dataset, and it is measurable with a small experiment. It is the single most important thing to test before a full rollout.

This is one season. Eighty-four days, no winter, no holiday peak. The model should be re-measured on a schedule rather than when somebody notices it drifting.

From Statistics, Data Science and AI: A Visual Handbook by John Fisher. Every statistic, table, and figure in this report is reproduced by the companion notebook.