Think Build Implement Repeat
London, UK +44 7367 067226
WhatsApp FOLLOW f in X
  1. Home
  2. Blog
  3. Quantile Forecasts: Predicting the Range You Need to Cover
AI & Machine Learning

Quantile Forecasts: Predicting the Range You Need to Cover

Stock decisions need a level you can cover most of the time, not an average. How quantile forecasting works and why it beats an average plus a buffer.

Updated 2 min readBy SpiderHunts Technologies

Free estimateNo obligation

Get a free estimate

Tell us what you need. A senior engineer reads every enquiry.

Takes under a minute. We never share your details.

  • Free consultation
  • No commitment
  • NDA on request

Prefer to talk? Book a free 30-minute call →

Quick answer — TL;DR

Ordering to the average means running out roughly half the time. Quantile forecasting predicts the level you need to cover a chosen share of outcomes directly, which handles varying uncertainty far better than a flat safety-stock percentage.

Why the average is the wrong target

A forecast that predicts the average is right on average and short about half the time. For anything where running out has a cost, that is not the number to order to.

The usual workaround is an average plus a safety percentage. That works where uncertainty is uniform, and it is not - some products are far more variable than others, and a flat 20% over-orders the predictable ones while still failing on the erratic ones.

Predicting a percentile directly

Quantile forecasting trains the model to predict a chosen percentile rather than the middle. Ask for the 90th percentile and it predicts the level actual demand will fall below about nine times in ten.

The advantage over a flat buffer is that the model learns how much extra each item needs. A stable product gets a small uplift; a volatile one gets a large one, automatically, from its own history.

PercentileMeaningSuits
50thMiddle - short half the timeWhere shortage costs little
80thCovered four times in fiveGeneral stock holding
95thCovered nineteen times in twentyCritical items, high shortage cost
20thDeliberately conservativePerishables, where excess is worse

Choosing the percentile from costs

The percentile is a business decision derived from the ratio between the cost of being short and the cost of holding excess. Where shortage costs far more, aim higher; where excess spoils or must be marked down, aim lower.

Illustrative arithmetic: if being short costs roughly four times what holding a spare unit costs, an 80% service level is a reasonable target. The exact figure matters less than the reasoning being written down and owned by someone.

It can also differ by item. Critical spares justify a much higher percentile than ordinary consumables, and letting the percentile vary by category is usually more valuable than improving the underlying forecast.

A whole distribution is better than one number

Predicting several percentiles gives the shape of the uncertainty. That supports conversations no point forecast can: what would it take to be safe nineteen times in twenty, and what does that cost in stock?

It also exposes asymmetry. Demand that is usually modest but occasionally very large produces percentiles far apart at the top end, which is exactly the situation where an average plus buffer fails worst.

Presenting it without confusing people

Percentiles confuse if presented as forecasts. 'The 90th percentile forecast is 340' invites the question of what happened to the real forecast.

Frame it as a decision instead: 'order 340 to cover demand in about nine weeks out of ten; 280 covers about seven in ten'. That is immediately usable and makes the trade-off visible to whoever owns the money.

Order to the average and you will be short about half the time. That is arithmetic, not bad luck.

FAQ

Frequently asked questions

The questions readers ask us after this guide.

Still have a question?

Ask us directly — a senior engineer will get back to you.

Ask about your project

Is this the same as safety stock?

It achieves the same goal more precisely. Safety stock adds a flat buffer; a quantile forecast learns how much buffer each item actually needs.

Which percentile should we use?

Derive it from the ratio of shortage cost to holding cost, and allow it to vary by item criticality.

Can any model produce quantiles?

Many can, with an appropriate objective. Some approaches produce a full distribution naturally.

How do we measure quantile forecast accuracy?

Check coverage - a 90th percentile forecast should be exceeded about 10% of the time. Consistent deviation means it needs recalibrating.

Keep reading

More on AI & Machine Learning

Start here

Want machine learning project details from us?

Tell us what you are trying to predict and roughly what data you hold. We will come back with an honest view on whether machine learning is the right tool, what the work would involve and a realistic cost range. If a spreadsheet would do the job, we will say so.

  1. You tell us what you needTwo minutes on the form, or a message on WhatsApp.
  2. A senior engineer reviews itAnd comes back with questions, a realistic range and an honest view on fit.
  3. Free 30-minute scoping callWe talk through scope, options and a realistic estimate — with no obligation.
Free estimateNo obligation

Talk to someone who builds this

Send a short brief and we will come back with an honest view and a realistic range.

Takes under a minute. We never share your details.

  • Free consultation
  • No commitment
  • NDA on request

Prefer to talk? Book a free 30-minute call →