Bayesian Quantile Regression

Statistics
Introduced by
Kozumi & Kobayashi; building on Yu & Moyeed (2001)
Year
2001–2011
Type
Bayesian semiparametric regression
Family
Regression / GLM

What does it do?

Bayesian Quantile Regression estimates the posterior distribution of regression coefficients at a chosen quantile of the outcome.

It combines an asymmetric Laplace working likelihood with prior distributions over the coefficients, giving uncertainty-quantified estimates of conditional quantiles such as the median, the 10th or the 90th percentile. The asymmetric Laplace likelihood is a device for quantile estimation, not an assumed error distribution, so the resulting credible intervals are approximate.

The intuition behind the method

Standard regression fits the conditional mean. Quantile regression instead fits a chosen quantile — say the 90th percentile — so you can model extremes, tails, or the spread of outcomes directly. The Bayesian version replaces point estimates with full posterior distributions: every coefficient becomes a credible interval rather than a single number. The trick that makes this computationally tractable is framing the quantile loss function as the likelihood of an asymmetric Laplace distribution, turning quantile estimation into a genuine probabilistic model that can be sampled with MCMC.

History

Quantile regression was introduced by Koenker and Bassett (1978). The Bayesian formulation based on the asymmetric Laplace likelihood is due to Yu and Moyeed (2001, Statistics & Probability Letters 54(4), 437–447). Yu and Zhang (2005) studied a three-parameter asymmetric Laplace distribution linked directly to quantile estimation. Kozumi and Kobayashi (2011) derived a Gibbs sampler based on a location-scale mixture representation and discussed extensions including a double-exponential prior and Tobit quantile regression. The method is implemented in R (bayesQR, brms/Stan) and Python (PyMC).

When to use it

Choose Bayesian quantile regression when the question concerns a specific part of the conditional distribution of a continuous outcome rather than its mean, for example when the outcome is skewed, heavy-tailed or heteroscedastic, or when the interest lies in extreme quantiles such as risk thresholds, top or bottom performers, or value-at-risk. It also suits settings where posterior uncertainty is wanted in place of asymptotic standard errors, or where prior knowledge or regularisation is needed in small or high-dimensional samples. Do not use it when the mean is the only target, when the sample is very large and computation time matters (MCMC is slower than frequentist quantile regression), or when the outcome is binary or nominal, where Bayesian logistic or multinomial regression is appropriate. Discrete or count outcomes with many ties violate the continuous working likelihood and need a dedicated method or careful sensitivity checks. Be cautious at very extreme quantiles relative to the sample size, since their posteriors can be highly sensitive to the prior.

Limitations and considerations

  • MCMC sampling is considerably slower than the linear-programming fitting used in classical quantile regression, which is a practical concern for large samples.
  • The asymmetric Laplace likelihood is a working device, not the true data-generating distribution; posterior credible intervals are approximately valid but not exact.
  • Results depend on the choice of prior, particularly for extreme quantiles or small samples — sensitivity analysis is essential.
  • Requires careful MCMC diagnostics (R-hat, effective sample size) to confirm convergence, adding analyst burden.
  • Simultaneous estimation at multiple quantiles does not automatically guarantee crossing-free quantile curves without additional constraints.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Estimates any conditional quantile of the outcome, making it suited to studying distributional tails rather than only the mean.
  • Full posterior inference provides credible intervals and predictive distributions for the coefficients, without relying on large-sample normal approximations.
  • Because the check loss grows linearly in the residual rather than quadratically, estimates are less driven by extreme residuals than least-squares fits; this is a property of the loss and does not guarantee robustness in every finite sample.
  • The prior distribution lets prior knowledge and regularisation enter the estimates, which can matter in small or high-dimensional samples.
  • Kozumi and Kobayashi (2011) discuss extending the Gibbs approach to Tobit (censored-outcome) quantile regression; other extensions, such as longitudinal structure, need separate model specification.

Applications

  • Modelling household income or wealth at the lower and upper tails to study inequality.
  • Financial risk management: estimating Value-at-Risk (VaR) as a conditional quantile of portfolio returns.
  • Clinical research: modelling the 10th percentile of birth weight or the 90th percentile of blood pressure as a function of risk factors.
  • Environmental science: estimating extreme precipitation or pollution quantiles conditional on meteorological covariates.
  • Educational research: studying achievement gaps at the lower quantiles of test score distributions rather than average scores.
  • Survival and reliability analysis when censoring interacts with quantile estimation and Bayesian regularisation aids small-sample inference.

How it works

How it works

1

The asymmetric Laplace distribution at quantile τ ∈ (0,1) is used as the working likelihood: L(β_τ, σ | y, X) = (τ(1−τ)/σ)^n exp(−Σ_i ρ_τ(y_i − x_iᵀβ_τ)/σ), with check function ρ_τ(e) = e(τ − 1(e < 0)). With σ held fixed, the dependence on β_τ is exp(−Σ ρ_τ(·)/σ), so maximising the likelihood over β_τ is equivalent to minimising the sum of check losses, the criterion that defines the τ-th conditional quantile. This links classical and Bayesian quantile regression.

Formula
L(\beta_\tau, \sigma \mid y, X) = \left(\frac{\tau(1-\tau)}{\sigma}\right)^{n} \exp\left\{-\frac{1}{\sigma}\sum_{i=1}^{n} \rho_\tau(y_i - x_i^\top \beta_\tau)\right\}, \quad \rho_\tau(e) = e\,(\tau - \mathbf{1}(e<0))
2

Prior distributions are placed over the quantile-specific coefficient vector β_τ. Common choices include weakly informative Gaussian or Laplace priors; horseshoe or spike-and-slab priors are used for sparse high-dimensional settings. The prior expresses pre-data beliefs about effect magnitudes.

3

Bayes' theorem combines the asymmetric Laplace likelihood with the prior to yield the posterior p(β_τ | y, X) ∝ L(β_τ | y, X) p(β_τ). Because the posterior has no closed form in general, it is explored via MCMC, yielding posterior draws that represent the uncertainty about each coefficient at quantile τ.

Formula
p(\beta_\tau \mid y, X) \propto L(\beta_\tau \mid y, X) \, p(\beta_\tau)
4

Kozumi and Kobayashi (2011) use a location-scale mixture representation of the asymmetric Laplace distribution to build a simple Gibbs sampler; the conditional draws come from normal or generalized inverse Gaussian distributions. They also discuss extensions, including a scale parameter, a double-exponential prior, and Bayesian Tobit (censored-outcome) quantile regression. Hamiltonian Monte Carlo (Stan, brms) is also used, especially for higher-dimensional problems.

5

From the posterior draws, users report posterior means or medians as point estimates and 95% credible intervals for each β_τ. Because the asymmetric Laplace likelihood is a working model, information criteria such as WAIC, which assume a correctly specified likelihood, are unreliable for comparison; prefer quantile-specific checks such as the calibration of posterior predictive quantile coverage. Multiple quantiles can be fit separately (or jointly) to map how the conditional distribution of y shifts with predictors.

Common pitfalls

  • Reporting only one quantile (e.g., the median) and ignoring other quantiles defeats the purpose — always plot coefficients across a range of τ values to reveal distributional heterogeneity.
  • Skipping MCMC convergence diagnostics: divergent transitions or low effective sample size invalidate all posterior summaries.
  • Using flat (improper) priors in sparse data settings: the asymmetric Laplace posterior can be diffuse at extreme quantiles, producing unreliable credible intervals without regularisation.
  • Confusing the posterior credible interval with a frequentist confidence interval — their interpretations differ; be explicit in reporting.
  • Treating the working asymmetric Laplace likelihood as the true model and drawing causal conclusions without appropriate identification assumptions.

Frequently asked questions

Is Bayesian Quantile Regression the same as classical quantile regression?

They target the same estimand — conditional quantiles of y given X — but differ in inference. Classical quantile regression solves a linear programme and uses asymptotic standard errors. Bayesian quantile regression uses MCMC to obtain full posterior distributions, enabling exact finite-sample uncertainty quantification and prior regularisation.

Why is the asymmetric Laplace distribution used as the likelihood?

Maximising the asymmetric Laplace log-likelihood at quantile τ, with the scale held fixed, is equivalent to minimising the check-function (pinball) loss that defines the τ-th quantile. This equivalence is what allows the quantile estimation problem to be embedded in a proper probabilistic model.

Can I estimate multiple quantiles jointly?

You can fit separate Bayesian QR models for each τ independently. Joint quantile models can also be specified to share information across quantile levels, but non-crossing of the fitted quantile curves is not automatic and has to be imposed or checked explicitly.

How many observations do I need?

More data are needed than in classical mean regression, because extreme quantiles are determined by relatively few observations. Central quantiles (near τ = 0.5) are estimated more stably than tail quantiles; the adequate sample size should be judged from posterior precision and sensitivity analysis rather than from a fixed rule of thumb.

Which software implements Bayesian Quantile Regression?

In R: the bayesQR package provides dedicated Gibbs samplers; brms with family = asym_laplace() uses Stan under the hood for flexible model specifications. In Python: PyMC supports custom asymmetric Laplace likelihoods. Stan can implement any formulation directly.

Related methods

Sources

  1. Kozumi, H., & Kobayashi, G. (2011). Gibbs sampling methods for Bayesian quantile regression. Journal of Statistical Computation and Simulation, 81(11), 1565–1578.

    Open DOI reference
  2. Yu, K., & Zhang, J. (2005). A three-parameter asymmetric Laplace distribution and its extension. Communications in Statistics – Theory and Methods, 34(9–10), 1867–1879.

    Open DOI reference