- Introduced by
- Arnold Zellner
- Year
- 1971
- Type
- Bayesian linear regression
- Family
- Econometrics / time series
What does it do?
Bayesian OLS combines the classical linear regression likelihood with prior distributions over the coefficients and error variance.
Rather than reporting point estimates, it produces full posterior distributions that quantify both estimated effects and their uncertainty. The approach is especially valuable when prior knowledge is available or when samples are small.
The intuition behind the method
In classical OLS you find the single best-fitting line and report a point estimate with a confidence interval. Bayesian OLS instead asks: given what we knew before seeing the data (the prior) and what the data tell us (the likelihood), what is the full range of plausible coefficient values, and how probable is each? The answer is a posterior distribution over every coefficient. With large, informative data the posterior concentrates near the classical OLS estimate; with scarce data it stays broader, honestly reflecting remaining uncertainty. Prior beliefs can encode expert knowledge or act as regularisation that shrinks noisy estimates toward sensible defaults.
History
Arnold Zellner's 1971 monograph is an early systematic treatment of Bayesian inference for the normal linear regression model in econometrics. Wider use of the method followed the development of Gibbs sampling and other MCMC algorithms in the 1990s, which made non-conjugate versions practical. Koop (2003) is a widely used later textbook treatment.
When to use it
Use Bayesian OLS when you have a continuous outcome and a linear model but also credible prior information (e.g., from earlier studies or theoretical constraints) that you want to incorporate formally. It is especially advantageous with small samples where OLS estimates are unstable, when you need coherent uncertainty quantification (credible intervals rather than frequentist confidence intervals), or when regularisation through an informative prior is preferable to ad-hoc penalty terms. Avoid it when the prior is hard to defend and reviewers may challenge subjectivity, or when the model is highly nonlinear and conjugacy breaks down — in that case full MCMC-based Bayesian regression is the proper extension. Do not use it simply to dress up classical OLS in Bayesian language without genuine prior elicitation.
Limitations and considerations
- Prior specification requires justification; poorly chosen priors can distort results, especially with small samples.
- Conjugate closed-form posteriors assume Gaussian errors; non-Gaussian likelihoods or hierarchical structures require MCMC sampling, which is computationally heavier.
- Results depend on the chosen prior, introducing subjectivity that may invite criticism in applied or regulatory contexts.
- Communicating posterior distributions and credible intervals to audiences trained in frequentist methods can be challenging.
- The model assumes independent, identically distributed Gaussian errors. For time-series data, serial correlation in the errors must be checked or modelled before the inference described here is used.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Produces full posterior distributions over coefficients, giving richer uncertainty quantification than point estimates and p-values alone.
- Formally incorporates prior information from theory or earlier studies, improving precision when samples are small.
- Under a diffuse prior, results are numerically close to classical OLS, providing a natural bridge between frequentist and Bayesian inference.
- Under the conjugate Normal-Inverse-Gamma specification, where the coefficient prior is Normal conditional on σ², the posterior has a closed form, so computation is fast without MCMC. The independent priors in the mechanics block generally require MCMC.
- Credible intervals have a direct probability interpretation: there is 95% posterior probability that β lies in the reported interval.
- Enables coherent Bayesian model comparison via Bayes factors or marginal likelihoods.
Applications
- Estimating economic relationships such as wage equations or demand functions when prior theory constrains plausible coefficient signs or magnitudes.
- Small-sample policy evaluation where classical OLS confidence intervals are too wide to be actionable and prior evidence from similar settings is available.
- Macroeconomic forecasting that combines the OLS likelihood with prior beliefs about parameter stability or sign restrictions.
- Finance research where prior shrinkage is used to temper noisy estimates of return or risk-premium coefficients.
- Clinical and health economics studies with limited data, where priors built from earlier trial results can narrow the posterior uncertainty.
- Bayesian model comparison across nested or non-nested linear regression specifications via Bayes factors or marginal likelihoods.
How it works
How it works
The model assumes y = Xβ + ε with errors ε ~ N(0, σ²I), identical to classical OLS. This Gaussian likelihood connects the observed data to the unknown coefficients β and variance σ², forming the data-driven component of the Bayesian update.
Formula
y \mid X, \beta, \sigma^2 \sim \mathcal{N}(X\beta,\, \sigma^2 I)Before observing data, beliefs about β are encoded as a Normal distribution N(β₀, V₀) and beliefs about σ² as an Inverse-chi-squared (equivalently, Inverse-Gamma) distribution. Diffuse priors let the data dominate, so results lie close to classical OLS.
Formula
\beta \sim \mathcal{N}(\beta_0, V_0),\quad \sigma^2 \sim \mathrm{Inv\text{-}\chi^2}(\nu_0, s_0^2)Bayes' theorem combines the likelihood and the priors: the joint posterior p(β, σ² | y, X) is proportional to the likelihood times the priors. Two prior structures are relevant and they behave differently. (a) Independent priors, as written in the mechanics block (β ~ N(β₀, V₀) and σ² ~ Inv-χ²(ν₀, s₀²)): the joint posterior generally has no closed form and is sampled by MCMC. (b) The conjugate Normal-Inverse-Gamma specification, in which β | σ² ~ N(β₀, σ²V₀) and σ² ~ Inv-Gamma(ν₀/2, ν₀s₀²/2): the joint posterior belongs to the same family as the prior, so closed-form results are available without numerical integration. The conjugate result is the one that gives closed-form inference; it should not be assumed for the independent priors.
Formula
p(\beta, \sigma^2 \mid y, X) \propto p(y \mid X, \beta, \sigma^2)\, p(\beta)\, p(\sigma^2)
Conditional on a known σ² with prior β ~ N(β₀, V₀), the posterior for β is Normal with covariance V̄ and mean β̄, where V̄⁻¹ = V₀⁻¹ + X'X/σ² and β̄ = V̄(V₀⁻¹β₀ + X'y/σ²). The posterior mean is a precision-weighted combination of the prior mean β₀ and the data term X'y/σ². The posterior precision adds the data information X'X/σ² to the prior precision V₀⁻¹. As the data information grows relative to the prior precision, β̄ moves toward the OLS estimate. With little data, the prior pulls the estimate toward β₀, which acts as shrinkage. Under the conjugate prior β | σ² ~ N(β₀, σ²V₀), the σ² terms cancel: V̄ = (V₀⁻¹ + X'X)⁻¹ and β̄ = V̄(V₀⁻¹β₀ + X'y).
Formula
\bar{\beta} = \bar{V}\bigl(V_0^{-1}\beta_0 + X^{\top}y/\sigma^2\bigr)Summaries from the posterior, such as means, medians, credible intervals and tail probabilities, are used in place of classical confidence intervals and p-values. To read a coefficient, report its posterior mean or median with a 95% equal-tailed or HPD interval. When sign or magnitude is the question, report the posterior probability directly, for example P(β_j > 0 | data), rather than a p-value. Under the conjugate prior (b), integrating out σ² gives a multivariate t marginal for β. Under the independent priors (a), marginal posteriors are obtained from MCMC draws. A credible interval is conditional on the chosen prior and model, so prior sensitivity should be reported alongside it. Unlike a p-value, a credible interval is a probability statement about the parameter given the data, not a statement about repeated sampling.
Common pitfalls
- Using a strongly informative prior without explicit justification — readers may question whether conclusions are driven by data or prior beliefs.
- Treating a 95% Bayesian credible interval as identical to a 95% frequentist confidence interval — they answer different questions and should not be conflated.
- Assuming that a diffuse prior is objective; improper flat priors can lead to improper posteriors in certain model structures.
- Forgetting posterior predictive checks — a well-specified prior does not guarantee a well-fitting model.
- Applying Bayesian OLS when the linearity assumption is violated without adding appropriate nonlinear terms to the model specification.
Frequently asked questions
How does Bayesian OLS differ from classical OLS?
Classical OLS produces a single point estimate for each coefficient and assesses uncertainty via sampling distributions under repeated experiments. Bayesian OLS treats coefficients as random variables, combines the likelihood with a prior, and reports a posterior distribution. Under a diffuse prior the posterior mean equals the OLS estimate, but uncertainty is quantified as a credible interval with a direct probability interpretation rather than a frequentist confidence interval.
What prior should I use if I have no strong prior beliefs?
A diffuse or non-informative prior, for example a flat prior on β and Jeffreys prior on σ², lets the data dominate and recovers results very close to classical OLS. If you have even weak theoretical knowledge about coefficient signs or magnitudes, encoding that as a mildly informative Normal prior typically improves precision without imposing strong constraints.
Is Bayesian OLS the same as ridge regression?
They are related but distinct. Ridge regression corresponds to Bayesian OLS with a zero-mean Normal prior on β whose variance is proportional to σ²/λ, where λ is the ridge penalty. Ridge is typically justified as a frequentist regularisation device and reports point estimates only, while Bayesian OLS explicitly reports the full posterior distribution and requires principled prior elicitation.
Do I need MCMC to run Bayesian OLS?
Not under the standard conjugate Normal-Inverse-Gamma specification, where the coefficient prior is conditional on σ² and the posterior is available in closed form. MCMC is needed when you use non-conjugate priors, include nonlinear terms, add hierarchical structure, or impose sign restrictions that make the posterior analytically intractable.
How do I compare competing Bayesian OLS models?
The standard tool is the Bayes factor, the ratio of marginal likelihoods of two models, which quantifies evidence in favour of one specification over another on a continuous scale. For model selection across many candidates, the Deviance Information Criterion (DIC) or Leave-One-Out cross-validation (LOO-CV) are practical alternatives that do not require computing marginal likelihoods directly.
Related methods
Sources
Zellner, A. (1971). An Introduction to Bayesian Inference in Econometrics. Wiley.
ISBN: 978-0471169376Koop, G. (2003). Bayesian Econometrics. Wiley-Interscience.
ISBN: 978-0470845677