Skip to content

Quantile regression forecasting gives a p10 and p90 attendance number directly

Forecasting methodsUpdated 2026-08-238 min read

In short

Quantile regression estimates a chosen quantile of the outcome by minimising asymmetrically weighted absolute residuals, the pinball loss. Fitting at 0.1 and 0.9 returns a low and high attendance number with no distribution assumed. Koenker and Bassett (1978) introduced the estimator in Econometrica.

Finance needs a downside number. The hall-hire contract has a break clause tied to a floor area, catering is quoted per head with a commitment date, and somebody has to write a figure in a cell labelled "worst realistic case" by Friday.

What usually happens is that the team takes the point forecast, subtracts ten per cent, and calls that the low case. Quantile regression forecasting replaces that guess with an estimate of an actual quantile of the outcome, fitted from data, with no assumption that the errors are normal or even symmetric. Koenker and Bassett (1978) introduced the estimator in Econometrica, and the machinery has been sitting in every statistics package for thirty years.

The idea is one sentence long. Change the loss function so that over-forecasting and under-forecasting cost different amounts, and the fitted line stops chasing the mean and starts chasing a quantile.

What does minimising pinball loss actually do?

Ordinary least squares minimises squared error, and the value that minimises expected squared error is the mean. Minimise absolute error and you get the median. Both are special cases of a wider family.

Hyndman and Athanasopoulos (2021) define the quantile score in the third edition of "Forecasting: Principles and Practice" as two times (1 minus p) times the overshoot when the actual falls below the forecast, and two times p times the shortfall when the actual falls at or above it. They note it is sometimes called the pinball loss function, and that at p equal to 0.5 it reduces to absolute error.

Work the weights at p equal to 0.9. Forecast 12,000, actual comes in at 11,000. The actual is below the forecast, so the penalty is 2 times 0.1 times 1,000, which is 200. Now the same size of error the other way: forecast 12,000, actual 13,000. The penalty is 2 times 0.9 times 1,000, which is 1,800.

Nine to one. That ratio is what drags the fitted line upward until it sits above roughly nine tenths of the observations, because at that point the many small over-forecast penalties on the left balance the few large under-forecast penalties on the right. The fitted line is the conditional 0.9 quantile, and nobody had to assume anything about the shape of the distribution to get there.

Fit at 0.1 and the weights reverse, ten to one in the other direction, and the line settles below roughly one tenth of the observations.

Working a p10 and p90 from a pooled portfolio fit

Take a portfolio of eight shows with five editions each, so 40 rows. The predictor is cumulative registrations at 60 days before doors. The outcome is the final registered figure at show open.

Fit three quantile regressions on the same 40 rows, each with a show-level shift so the shows keep their own positions, and each estimating its own slope. Suppose the fits come back as follows. At the 0.1 level, intercept 420 and slope 1.48. At 0.5, intercept 380 and slope 1.69. At 0.9, intercept 310 and slope 1.95.

Your show holds 6,800 registrations at day minus 60. Push it through each fit.

The p10 is 420 plus 1.48 times 6,800, which is 420 plus 10,064, giving 10,484.

The p50 is 380 plus 1.69 times 6,800, which is 380 plus 11,492, giving 11,872.

The p90 is 310 plus 1.95 times 6,800, which is 310 plus 13,260, giving 13,570.

Now look at the shape of what came out. The distance from the median down to the p10 is 1,388, which is 11.7 per cent of the median. The distance up to the p90 is 1,698, which is 14.3 per cent. The interval is wider on the upside than the downside, by a fifth.

A symmetric band would have thrown that away, and it is the part finance actually needs, because it says the show is more likely to surprise upward than downward from where it currently sits. That asymmetry falls out of the estimation. Nobody specified it.

The slopes carry information too. The 0.9 slope of 1.95 against the 0.1 slope of 1.48 says that a show sitting higher at day minus 60 has a wider absolute spread of outcomes, which is what you would expect if late registration is roughly proportional to early registration. If the two slopes had come back nearly equal, the interval width would be constant in the predictor, and that would be worth investigating rather than accepting.

Why can five editions not give you a tail?

Try the same fit on one show alone and the arithmetic falls apart.

With five observations, the 0.9 quantile of the residual distribution is pinned by at most one point. Any line that sits above four of the five and below the fifth achieves nearly the same pinball loss, so the estimate ends up being a statement about which single edition happened to be the highest. Move that one edition and the whole p90 moves with it.

The parameter budget makes it worse. A single-show fit with an intercept and a slope spends two parameters on five points at each quantile level, and you are fitting three levels. Pooling to 40 rows and adding seven show dummies plus an intercept and a slope spends ten parameters, but it spends them on 40 rows, which is four rows per parameter instead of two and a half, and more importantly the slope is now estimated from all eight shows at once.

The assumption you are buying with that pooling is that the shows share a slope, meaning the proportional relationship between the day minus 60 count and the final count is common across the portfolio while the level is not. That is testable. Fit the pooled model, then fit a version that lets each show have its own slope, and compare the total pinball loss out of sample. If the show-specific slopes do not reduce it, the pooling assumption is doing no harm.

Quantile crossing, and the cheap fix

Because each level is fitted separately, nothing in the estimation forces the 0.1 line to stay below the 0.9 line. At some values of the predictor they can cross, and you will hand somebody a p10 that is larger than the p90.

On the fits above, the 0.1 line is 420 plus 1.48x and the 0.9 line is 310 plus 1.95x. Set them equal: 110 equals 0.47x, so x equals 234. Below 234 registrations at day minus 60 the lines are crossed and the output is nonsense. In this case the crossing point sits so far below any real show's day minus 60 count that it never bites, which is the common situation, and checking it takes one line of arithmetic.

When crossing does occur inside the range you care about, the standard repair is rearrangement: at each value of the predictor, sort the fitted quantile values into increasing order and use the sorted set. It is crude and it works, and it changes nothing at the points where the fits were already monotone.

Checking the quantiles are calibrated

A fitted 0.9 quantile is a claim, and the claim is checkable by counting.

Hold out editions the fit never saw, push each through the p90 line, and count how many actuals came in below it. If the model is calibrated, about nine in ten should. With 40 held-out rows you expect 36 below and 4 above. Getting 40 below means the p90 is too high and you are handing out an upside case that is really a p98. Getting 30 below means it is too low, and the number in the cell marked upside is doing no work.

The count is the honest test at this sample size. Any attempt to attach a confidence statement to it runs into the same small-sample problem the interval itself has, which is the subject of what a nominal coverage level really delivers in O20.

There is a second option worth knowing about. You can take the quantile fits above, treat them as a black-box model, and wrap them in a conformal calibration step that restores a finite-sample coverage guarantee. The quantile fitting is this post's subject; the calibration wrapper belongs to O21.

Where this stops

Quantile regression estimates the quantile you ask for, and it has no opinion about which quantile you should be asking for.

That is not a small gap. The p10 and p90 pair is a convention, and conventions are where money leaks. If a seat short costs you three times what a seat spare costs, the number you should be committing against is the 0.75 quantile, and the p10 you put in the downside cell is irrelevant to the decision. Picking the level from the cost of being wrong in each direction is a separate calculation and belongs to O24.

The other limit is the one the estimator cannot argue its way out of. Extreme quantiles need observations in the tail, and 40 rows contain roughly four observations above the 0.9 line. Estimating anything at 0.95 or 0.99 from this data is arithmetic without content, and a fitted 0.99 quantile on 40 rows should be read as the maximum of the sample dressed up in a regression.

Start by fitting three quantile levels on whatever pooled table you already have. Most teams already keep a sheet with one row per show-edition and a column for the day minus 60 count, which is all you need. Fit 0.1, 0.5 and 0.9, push your current show through all three, and compare the spread you get to the plus-or-minus-ten-per-cent figure that has been going into the board pack. If the two disagree by more than a couple of hundred registrations, the convention was costing you something. The rest of the forecasting methods work is downstream of that comparison.

Questions people ask about quantile regression forecasting

What is pinball loss in forecasting?
Pinball loss weights an over-forecast by two times one minus the quantile level and an under-forecast by two times the level. At a level of 0.9 an under-forecast costs nine times as much as an over-forecast of the same size, which pushes the fitted line up until roughly nine tenths of the observations sit below it.
Can you fit quantile regression to five annual editions?
Not at extreme quantiles. A 0.9 quantile estimated from five points is effectively the maximum of those five, which is a statistic with enormous sampling variability. Pool the editions across the portfolio, include a show-level shift so each show keeps its own position, and estimate the quantile slope from the combined rows.
What is quantile crossing and how do you fix it?
Fitting each quantile level separately means nothing forces the 0.1 line to stay below the 0.9 line, so at some values of the predictor they cross and the low estimate exceeds the high one. The standard repair is rearrangement: sort the fitted values at each point into increasing order, which restores monotonicity.

Related reading

All forecasting methods articles