Inferensys

Glossary

Quantile Regression

A statistical technique that estimates the conditional median or other quantiles of a response variable, used to build prediction intervals for demand at specific service levels.
Developer demonstrating multi-agent tool use, agent tool selection interface on laptop, casual tech demo moment.
PROBABILISTIC FORECASTING

What is Quantile Regression?

Quantile regression is a statistical technique that estimates the conditional median or other quantiles of a response variable, providing a complete view of the relationship between variables beyond the conditional mean.

Quantile regression is a statistical method that models the relationship between independent variables and a specified quantile (e.g., median, 90th percentile) of the dependent variable. Unlike ordinary least squares regression, which estimates the conditional mean, quantile regression estimates the conditional quantile function, providing a more comprehensive analysis of the relationship between variables, especially when the data exhibits heteroscedasticity or non-normal error distributions.

In supply chain demand forecasting, quantile regression is used to construct prediction intervals by estimating specific quantiles of future demand. For example, the 95th quantile forecast provides an upper bound where actual demand is expected to fall below 95% of the time, directly informing safety stock calculations. The model is trained by minimizing the pinball loss function, which asymmetrically penalizes over-prediction and under-prediction to target the desired quantile.

QUANTILE REGRESSION

Core Characteristics

The foundational statistical technique that enables probabilistic demand forecasting by modeling the conditional quantiles of a response variable, directly quantifying uncertainty at specific service levels.

01

Asymmetric Loss via Pinball Loss

Unlike ordinary least squares which minimizes symmetric squared errors, quantile regression minimizes the pinball loss (tilted absolute value) function. This asymmetric loss penalizes over-prediction and under-prediction differently based on the target quantile τ.

  • For the median (τ=0.5), the penalty is symmetric
  • For the 95th percentile (τ=0.95), under-prediction is penalized 19x more than over-prediction
  • This directly encodes the business cost of stockouts vs. overstocking into the model training objective
02

Distribution-Free Estimation

Quantile regression makes no parametric assumptions about the underlying error distribution. It does not require the residuals to be normally distributed, homoscedastic, or independent.

  • Works robustly with heavy-tailed demand distributions common in intermittent spare parts
  • Handles heteroscedasticity where forecast variance changes with the level of demand
  • Provides valid inference without needing to specify a likelihood function
03

Building Prediction Intervals

By fitting multiple quantile regressions simultaneously, you construct a prediction interval with a specified coverage probability. A 90% prediction interval is formed by the 5th and 95th conditional quantiles.

  • The width of the interval directly reflects the model's uncertainty at each point
  • Intervals can be asymmetric, capturing skewed demand distributions
  • Service level targets (e.g., 98% fill rate) map directly to specific quantiles
04

Interpretable Covariate Effects

Quantile regression reveals how covariates affect different parts of the demand distribution, not just the mean. A promotion might lift median demand by 10% but the 90th percentile by 40%.

  • Identifies predictors that increase demand volatility without shifting the mean
  • Detects heterogenous treatment effects across the distribution
  • Provides richer operational insights than mean regression for inventory decisions
05

Linear Programming Formulation

The quantile regression optimization problem can be expressed as a linear program, making it computationally tractable for large-scale supply chain datasets with thousands of SKUs.

  • Solved efficiently using simplex or interior-point methods
  • The dual formulation provides direct estimates of the conditional density
  • Extends naturally to regularized variants (Lasso, Ridge) for high-dimensional feature spaces
06

Connection to Expectile Regression

While quantile regression minimizes absolute asymmetric loss, expectile regression minimizes asymmetric squared loss. Expectiles are more sensitive to extreme values and provide an alternative characterization of the distribution.

  • Expectiles are coherent risk measures; quantiles are not
  • Useful when the cost of extreme errors grows quadratically
  • Both techniques can be combined for robust probabilistic forecasting ensembles
QUANTILE REGRESSION INSIGHTS

Frequently Asked Questions

Explore the core concepts behind quantile regression, a powerful statistical technique for modeling the conditional quantiles of a response variable, essential for building robust prediction intervals in probabilistic demand forecasting.

Quantile regression is a statistical technique that estimates the conditional median or other quantiles of a response variable, modeling the relationship between predictors and specific points in the outcome distribution. Unlike Ordinary Least Squares (OLS), which models the conditional mean and assumes a constant effect across the distribution, quantile regression provides a complete view of the covariate effects by allowing them to vary at different quantiles. It achieves this by minimizing an asymmetric loss function, such as the pinball loss, which penalizes over-prediction and under-prediction differently. This makes it inherently robust to outliers and heteroscedasticity, as it does not rely on the strict normality assumptions of OLS. For supply chain applications, this means you can directly model the 95th percentile of demand to set safety stock levels, rather than just forecasting the average demand.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.