- Introduced by
- Arnold Zellner (econometric formulation); broader development by Harold Jeffreys and Gelman et al.
- Year
- 1971
- Type
- Bayesian parametric regression
- Family
- Regression / GLM
What does it do?
Bayesian Multiple Linear Regression models a continuous outcome as a linear combination of several predictors and returns a full posterior distribution over the regression coefficients and the error variance rather than a single point estimate.
The posterior makes uncertainty explicit, and prior information from theory or earlier studies enters the analysis through the prior on the coefficients. All inferences are conditional on the stated likelihood and priors, so both need to be checked.
The intuition behind the method
Classical OLS gives you one best-guess line through the data. Bayesian regression instead gives you a probability distribution over all plausible lines, weighted by how well each one explains the data and how consistent each is with your prior beliefs. Wider distributions mean more uncertainty; as data grow the posterior tightens. The result is not just a coefficient and a p-value, but a complete probabilistic statement: 'Given the data and priors, the slope for variable X lies in this range with 95% probability.'
History
The regression framework used here was set out by Arnold Zellner in his 1971 book on Bayesian inference in econometrics. The g-prior, which is often used with this model, is a later construction by Zellner and is not part of the specification given on this page. Applied use became much broader with later Bayesian computation software, including Stan, JAGS and BUGS.
When to use it
Use Bayesian multiple linear regression when the outcome is continuous, there are several predictors, and you need full uncertainty statements about the coefficients rather than point estimates alone. It is particularly useful when (1) the sample is small relative to the number of predictors and prior knowledge from theory or earlier studies can stabilise the estimates, (2) you want credible intervals and do not want to rely on asymptotic approximations, or (3) you need to compare candidate models with posterior predictive criteria. Avoid it when computation time is a binding constraint and MCMC runs would be too slow for the model size, or when the team cannot justify its prior choices, since poorly chosen informative priors can bias results without an obvious warning.
Limitations and considerations
- Every parameter needs a prior; diffuse priors still carry assumptions, for example about the scale of the coefficients.
- The prior on β is expressed in the units of each predictor, so results depend on whether predictors are standardised before the prior is applied.
- With the independent normal and inverse-chi-squared priors in the mechanics, the posterior has no closed form, so MCMC sampling is needed and can be slow for large datasets or many predictors.
- The likelihood assumes normal errors with constant variance; if this is violated, the posterior is conditioned on a misspecified model and its intervals can be misleading.
- Diagnostics such as Rhat, effective sample size and trace plots are more involved than OLS residual checks, and interpreting posterior summaries requires Bayesian literacy.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- The posterior over β and σ² supports direct probability statements about individual coefficients, such as P(β > 0 | data), which OLS does not provide.
- The normal prior on β shrinks coefficients toward μ0, which stabilises estimates when the sample is small relative to the number of predictors.
- Predictive distributions integrate over the posterior, so prediction intervals include uncertainty in the coefficients as well as residual noise.
- Prior beliefs about the direction or size of an effect can be stated directly in the prior on β rather than imposed through model restrictions.
- WAIC and LOO-CV compare models on their predictive performance without requiring the models to be nested.
Applications
- Clinical and epidemiological studies with small cohorts, where prior information from earlier trials is incorporated.
- Economic forecasting in which theoretical constraints, such as a positive price elasticity, are encoded in informative priors.
- Marketing mix modelling, where prior knowledge about channel effectiveness helps estimate effects of correlated spend variables.
- Educational research predicting continuous outcomes such as test scores while propagating measurement uncertainty.
- Psychometric studies that combine new data with effect-size priors taken from earlier meta-analyses.
How it works
How it works
The data model assumes the outcome y is normally distributed around the linear predictor Xβ with constant variance σ². This is the same structural assumption as OLS but stated probabilistically, forming the likelihood function that scores how probable the observed data are under each candidate (β, σ²) pair. The model also assumes independent observations and a mean that is linear in the predictors (transformed or interaction terms may be included as columns of X).
Formula
y \mid X, \beta, \sigma^2 \sim \mathcal{N}(X\beta,\, \sigma^2 I)Before seeing the data, beliefs about β are encoded in a normal prior centred at μ0 with covariance Σ0, which is commonly set to theoretically expected values. An inverse-chi-squared prior is placed on σ². The hyperparameters (μ0, Σ0, ν0, σ0²) must be chosen and justified by the analyst, and because the prior on β is expressed in the units of each predictor, its scale should be considered together with how the predictors are scaled. Diffuse priors on β make the posterior centre close to the OLS estimate, while informative priors pull estimates toward the prior centre, more strongly when the sample is small.
Formula
\beta \sim \mathcal{N}(\mu_0, \Sigma_0),\quad \sigma^2 \sim \text{Inv-}\chi^2(\nu_0, \sigma_0^2)Applying Bayes' theorem multiplies the likelihood by the priors and normalises the result to give the posterior distribution over (β, σ²). A closed-form posterior requires a conjugate joint prior in which β given σ² is normal with covariance scaled by σ² (β | σ² ~ N(μ0, σ²Σ0)) and σ² has an inverse-chi-squared prior; the posterior is then normal-inverse-chi-squared (normal-inverse-gamma). The independent priors written in the mechanics do not form that pair, so the posterior is in general sampled with Markov chain Monte Carlo (MCMC) methods such as Gibbs or Hamiltonian Monte Carlo.
Formula
p(\beta, \sigma^2 \mid y, X) \propto p(y \mid X, \beta, \sigma^2)\, p(\beta)\, p(\sigma^2)
From the posterior, point summaries (posterior mean or median), credible intervals (the central 95% posterior mass), and model comparison metrics such as WAIC or LOO-CV are derived. Predictions for new observations integrate over the full posterior, so parameter uncertainty is carried into the predictive distribution.
Common pitfalls
- Using strongly informative priors without documenting or testing their influence; in small samples the posterior can reflect the prior more than the data.
- Declaring convergence without inspecting Rhat and effective sample sizes for all parameters, not only the coefficients of interest.
- Reading a 95% credible interval as a frequentist confidence interval; it is a probability statement about the parameter given the prior and data.
- Skipping posterior predictive checks: a model can sample well and still fit the observed data poorly if the likelihood is misspecified.
- Choosing the prior or model after seeing the posterior, which makes the reported intervals optimistic.
- Ignoring strong multicollinearity among predictors: individual coefficient posteriors become wide and strongly correlated, and are then driven largely by the prior.
Frequently asked questions
How is Bayesian multiple regression different from OLS?
OLS returns a single coefficient vector that minimises squared residuals, with uncertainty assessed via asymptotic standard errors and p-values. Bayesian regression returns a probability distribution over all plausible coefficient vectors, conditioned on the data and the prior. Credible intervals have a direct probability interpretation (the parameter lies in this range with 95% posterior probability) that confidence intervals do not.
What prior should I use if I have no strong prior knowledge?
A weakly informative prior is usually preferable to a flat one. For standardised predictors, a normal prior centred at zero is a common choice, with a scale wide enough to allow substantial effects but narrow enough to give little weight to implausibly large ones; the recommendations in Gelman et al. (2013) discuss this choice. Avoid truly flat (improper) priors on σ², which can cause numerical problems.
Can I use Bayesian regression with many predictors?
Yes, but prior choice becomes critical when the number of predictors is large relative to the sample. Horseshoe or spike-and-slab priors are designed for sparse settings and shrink irrelevant coefficients toward zero, in a way analogous to the LASSO but within a fully probabilistic framework.
Does a normal prior make this model equivalent to ridge regression?
With σ² held fixed and β ~ N(0, τ²I), the posterior mean equals the ridge estimate with penalty λ = σ²/τ². Because σ² is also estimated in this model, the correspondence is not exact, so the two methods should not be treated as interchangeable. Prefer the Bayesian route when credible intervals on individual coefficients matter, when external prior knowledge should be included, or when posterior predictive distributions are needed for decisions.
How do I assess model fit in Bayesian regression?
Run posterior predictive checks: simulate datasets from the fitted posterior and compare their summary statistics (mean, spread, skewness) with those of the observed data. Compute LOO-CV or WAIC for model comparison, and inspect Rhat and effective sample size to confirm that MCMC has converged.
Related methods
Sources
Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A., & Rubin, D. B. (2013). Bayesian Data Analysis (3rd ed.). CRC Press.
ISBN: 978-1439840955Zellner, A. (1971). An Introduction to Bayesian Inference in Econometrics. Wiley.
ISBN: 978-0471980650Mathematics for Machine Learning, Section 9.3 (Bayesian Linear Regression)