Why does minimising pinball loss at the 0.9 quantile give a higher forecast than minimising MAE?
answer
- two slopes, not one
- the steeper side is the one you fear
- the optimum is a percentile, not the middle
- at 0.5 it equals half absolute error
- shortfall costs nine times overshoot
basics
~20 sPinball loss weights error directions unequally: at the 0.9 level, falling short costs nine times as much per unit as overshooting. Its minimiser is the 0.9 quantile, while absolute error is minimised by the median.
solid answer
~50 sPinball loss, also called quantile loss, scores a forecast `q` against an actual `y` at a quantile level tau. If the actual comes in above the forecast the penalty is `tau * (y - q)`; if it comes in below, the penalty is `(1 - tau) * (q - y)`. At tau = 0.9 a shortfall costs 0.9 per unit and an overshoot 0.1, so the loss-minimising forecast sits where the probability of falling short is 10% — the 0.9 quantile of the predictive distribution. Absolute error weights both directions at 1, and is minimised by the median, tau = 0.5. That is exactly the point for a safety-stock forecast: you want a stock level that covers demand about 90% of the time, so you must score with the asymmetric loss that rewards it. Scoring a 90th-percentile forecast with MAE penalises the very headroom you are paying for and will drag it back to the median.
go deeper
Be ready to say that pinball loss penalises being too low and being too high by different amounts, and that the size of tau decides which side hurts more.
Write both branches of the loss and state the minimiser: the tau quantile, against the median for absolute error, with tau = 0.5 the case where the two coincide.
Show the operating failure you have seen: a quantile forecast judged on a symmetric accuracy dashboard, quietly regressing to the median and reintroducing stockouts.
Own the mapping from cost to tau. The quantile level encodes the relative cost of being short versus long, so it is a business parameter that belongs in a documented policy, not a modelling default.
## The loss function Pinball loss is defined for a target quantile level tau between 0 and 1. For an actual `y` and a forecast `q`: ``` if y >= q: loss = tau * (y - q) # the forecast fell short if y < q: loss = (1 - tau) * (q - y) # the forecast overshot ``` Both branches are non-negative and both are zero when `q = y`. The name comes from the shape: plotted against the forecast, the loss is a V with two different slopes, like the trajectory of a ball off a pinball flipper. Which slope is steeper is the entire content of the metric. At tau = 0.5 the two slopes are equal at 0.5, so the loss is exactly half the absolute error. Ranking forecasts by pinball loss at 0.5 and by mean absolute error therefore gives the same answer, and both are minimised by the median. Every other tau tilts the V. ## Why the minimiser is the quantile Think about moving the forecast up by one unit. Every future outcome that lies above the current forecast becomes one unit less short, saving tau per unit; every outcome below it becomes one unit more over, costing (1 - tau) per unit. Writing p for the probability that the actual exceeds the forecast, the expected change is `-tau * p + (1 - tau) * (1 - p)`. Raising the forecast is worth it while that is negative, and it stops being worth it exactly when `p = 1 - tau`. So at tau = 0.9 the optimum sits where the actual exceeds the forecast 10% of the time — the 90th percentile of the predictive distribution. At tau = 0.5 it sits where the actual is above and below equally often, which is the median. The asymmetric weights are not a fudge factor; they are precisely what pins the optimum to a chosen point of the distribution. ## Why this matters for a safety-stock forecast Suppose you hold stock for a part and want demand covered about nine times out of ten. The quantity you need is not the typical demand, it is the demand level that is exceeded only 10% of the time. A model tuned and scored on absolute error will hand you the median, and a median stock level runs out roughly half the time. The reverse mistake is just as common and harder to spot: a team produces a sensible 90th-percentile forecast and then evaluates it on the accuracy dashboard, which reports mean absolute error. The high forecast looks terrible there, because on most days it sits well above the actual and absolute error charges full price for that headroom. The forecast is then "improved" back toward the median and the stockouts return. Metric and target must agree; a quantile forecast has to be scored with the loss that defines it. The choice of tau itself is an economic decision, not a statistical one: it comes from the relative cost of being short versus being long. If a shortfall costs nine times what a unit of excess costs, the level that balances them is 0.9. Stating tau and stating why are part of the answer. ## Reading and reporting pinball loss Pinball loss is in the units of the series, and its magnitude also depends on tau, so a raw number carries no absolute meaning. Compare it only across forecasts of the same series at the same tau, or normalise it — for instance by the pinball loss of a naive benchmark producing the same quantile — before averaging across series. Averaging raw pinball losses over a catalogue lets the highest-volume series dominate. Averaging pinball loss across a grid of quantile levels for the same forecast gives a score of the whole predictive distribution rather than a single quantile, and as the grid gets finer that average approaches the continuous ranked probability score. That is the natural summary when a model emits a full distribution rather than one quantile. Pinball loss and interval coverage answer different questions. Coverage asks whether a stated level is honest; pinball loss is a proper score that rewards being honest and sharp at the same time, and unlike coverage it cannot be gamed by making the forecast extreme. A forecast pushed far above the 0.9 quantile never misses low, but it pays 0.1 per unit of excess on almost every period and its pinball loss gets worse, not better. ## What a strong answer sounds like Write the two branches, say which direction carries the larger weight at a high tau, and state the minimiser: the tau quantile, versus the median for absolute error. Then close the loop to the decision — the tau you pick encodes the cost asymmetry of the business problem, and scoring that forecast with a symmetric metric silently undoes it.
- What is the relationship between pinball loss at 0.5 and mean absolute error?At tau = 0.5 both branches carry weight 0.5, so the loss equals half the absolute error for every observation. The two metrics rank forecasts identically and share the same minimiser, the median of the predictive distribution. Every other tau breaks that equivalence by making one direction of error more expensive than the other.
- Can a forecaster game pinball loss by forecasting extremely high at tau = 0.9?No. A forecast far above the 0.9 quantile almost never falls short, but it pays 0.1 per unit of overshoot on nearly every period, and those small charges accumulate faster than the avoided shortfalls save. The expected loss is minimised exactly at the 0.9 quantile, so exaggeration is penalised. That is what makes it a proper scoring rule rather than a target to be beaten.
- How would you summarise a forecast that emits many quantiles rather than one?Average the pinball loss across a grid of quantile levels for the same forecast. That scores the whole predictive distribution instead of one point on it, rewards forecasts that are both calibrated and sharp, and approaches the continuous ranked probability score as the grid gets finer. Report it per horizon, and normalise before averaging across series so high-volume series do not dominate.
Missing a flight costs you far more than arriving early, so you leave for the airport at a time that is late only one trip in ten. Pinball loss is that reasoning written as a scoring rule.
saying these in an interview costs you the question
- Says pinball loss is just absolute error with a constant factor
- Puts the heavier weight on overshoot at a high quantile level
- Evaluates a 90th-percentile forecast with mean absolute error
- Averages raw pinball losses across series of different scale
- Thinks a deliberately inflated forecast scores better at tau 0.9