Bayesian Linear Regression

bayesianregressionnoninformative-priorstudent-tdouble-tnormal-inverse-gammaconjugate-priorbehrens-fishermultivariate-regressioneconometrics

Definition

Bayesian linear regression applies Bayes's theorem to the normal linear model y=Xβ+εy = X\beta + \varepsilon, εN(0,σ2I)\varepsilon \sim \mathcal{N}(0, \sigma^2 I), combining the likelihood with a prior distribution on (β,σ)(\beta, \sigma) to produce a posterior distribution over the regression coefficients. The form of the posterior depends critically on what is assumed about the error variance(s) and on the choice of prior. When a second sample shares the same β\beta but has an independent unknown variance, the posterior is a product of two multivariate t-distributions — the "double-t" distribution (Tiao-Zellner 1964).

Key Ideas

How It Works

Noninformative Prior (Single Sample)

The likelihood for the regression model y=Xβ+εy = X\beta + \varepsilon with εN(0,σ2I)\varepsilon \sim \mathcal{N}(0,\sigma^2 I) is:

(β,σy)=(1σ2π)Texp ⁣{12σ2[νs2+Q(β,β^,Z)]}\ell(\beta,\sigma|y) = \left(\frac{1}{\sigma\sqrt{2\pi}}\right)^T \exp\!\left\{-\frac{1}{2\sigma^2}\left[\nu s^2 + Q(\beta,\hat\beta,Z)\right]\right\}

where Z=XXZ = X'X, β^=Z1Xy\hat\beta = Z^{-1}X'y, ν=Tp\nu = T-p, s2=(yXβ^)(yXβ^)/νs^2 = (y-X\hat\beta)'(y-X\hat\beta)/\nu, and Q(β,η,A)(βη)A(βη)Q(\beta,\eta,A) \equiv (\beta-\eta)'A(\beta-\eta).

Under p(β)1p(\beta) \propto 1, p(σ)1/σp(\sigma) \propto 1/\sigma, the joint posterior is:

p(β,σy)σ(T+1)exp ⁣{12σ2[νs2+Q(β,β^,Z)]}p(\beta,\sigma|y) \propto \sigma^{-(T+1)}\exp\!\left\{-\frac{1}{2\sigma^2}\left[\nu s^2 + Q(\beta,\hat\beta,Z)\right]\right\}

Integrating out σ\sigma gives the marginal posterior of β\beta:

p(βy){1+Q(β,β^,Z)νs2}12(ν+p)p(\beta|y) \propto \left\{1 + \frac{Q(\beta,\hat\beta,Z)}{\nu s^2}\right\}^{-\frac{1}{2}(\nu+p)}

This is a multivariate t-distribution with ν=Tp\nu = T-p degrees of freedom, mean β^\hat\beta, and precision matrix Z/s2Z/s^2. The marginal posterior of any single element βi\beta^i is univariate t with TpT-p degrees of freedom.

Conjugate (Normal-Inverse-Gamma) Prior

With βσ2N(β0,σ2V0)\beta|\sigma^2 \sim \mathcal{N}(\beta_0, \sigma^2 V_0) and σ2IG(a0/2,b0/2)\sigma^2 \sim \text{IG}(a_0/2, b_0/2), the posterior is:

βσ2,yN(βn,σ2Vn),σ2yIG(an/2,bn/2)\beta|\sigma^2, y \sim \mathcal{N}(\beta_n, \sigma^2 V_n), \quad \sigma^2|y \sim \text{IG}(a_n/2, b_n/2)

with Vn1=V01+XXV_n^{-1} = V_0^{-1} + X'X, βn=Vn(V01β0+Xy)\beta_n = V_n(V_0^{-1}\beta_0 + X'y), an=a0+Ta_n = a_0 + T, bn=b0+(yXβn)(yXβn)+(βnβ0)V01(βnβ0)b_n = b_0 + (y-X\beta_n)'(y-X\beta_n) + (\beta_n-\beta_0)'V_0^{-1}(\beta_n-\beta_0). Marginalizing σ2\sigma^2: βytan(βn,bnVn/an)\beta|y \sim t_{a_n}(\beta_n, b_n V_n / a_n).

Double-t Distribution (Heterogeneous Variances)

When two samples (y1,X1,T1)(y_1, X_1, T_1) and (y2,X2,T2)(y_2, X_2, T_2) share the same β\beta but have independent unknown variances σ12\sigma_1^2 and σ22\sigma_2^2, independent log-uniform priors on σ1\sigma_1 and σ2\sigma_2 yield:

p(βy1,y2)=k1f(β),f(β)={1+Q1ν1}12(ν1+p){1+Q2ν2}12(ν2+p)p(\beta|y_1,y_2) = k^{-1} f(\beta), \quad f(\beta) = \left\{1 + \frac{Q_1}{\nu_1}\right\}^{-\frac{1}{2}(\nu_1+p)} \left\{1 + \frac{Q_2}{\nu_2}\right\}^{-\frac{1}{2}(\nu_2+p)}

where Qi=Q(β,β^i,Mi)Q_i = Q(\beta,\hat\beta_i,M_i) with Mi=Zi/si2M_i = Z_i/s_i^2, and k=f(β)dβk = \int f(\beta)\,d\beta is a p-dimensional integral without a closed form. This is the multivariate double-t distribution (Tiao-Zellner 1964, eq. 2.12) — the multivariate extension of the Behrens-Fisher problem.

Asymptotic expansion. Expanding each t-factor as {1+Qi/νi}12(νi+p)=e12Qij=0pjνij\{1 + Q_i/\nu_i\}^{-\frac{1}{2}(\nu_i+p)} = e^{-\frac{1}{2}Q_i}\sum_{j=0}^\infty p_j\nu_i^{-j} and multiplying, the posterior becomes:

p(βy1,y2)=W1D12(2π)12pexp ⁣{12Q(β,βˉ,D)}i=0j=0dijν1iν2jp(\beta|y_1,y_2) = W^{-1}\frac{|D|^{\frac{1}{2}}}{(2\pi)^{\frac{1}{2}p}}\exp\!\left\{-\tfrac{1}{2}Q(\beta,\bar\beta,D)\right\}\sum_{i=0}^\infty\sum_{j=0}^\infty d_{ij}\nu_1^{-i}\nu_2^{-j}

with D=M1+M2D = M_1 + M_2, βˉ=D1(M1β^1+M2β^2)\bar\beta = D^{-1}(M_1\hat\beta_1 + M_2\hat\beta_2). The leading term (d00=1d_{00}=1) is N(βˉ,D1)\mathcal{N}(\bar\beta, D^{-1}); higher-order terms give finite-sample corrections via mixed cumulants of Q1Q_1 and Q2Q_2. As ν1,ν2\nu_1,\nu_2\to\infty, the posterior converges to this normal exactly.

Behrens-Fisher connection. For p=1p=1, the univariate double-t agrees with Fisher's (1961) fiducial solution to the problem of combining two normal samples with unequal unknown variances.

Theil mixed estimator as a limiting case. If σ12\sigma_1^2 is treated as known and ν1\nu_1\to\infty, the first-sample posterior collapses to a degenerate normal and the posterior mean converges to Theil's (1963) mixed estimator βˉ=D1(M1β^1+M2β^2)\bar\beta = D^{-1}(M_1\hat\beta_1 + M_2\hat\beta_2). The Bayesian framework thus provides the full posterior distribution around what Theil obtained as a point estimate.

Why It Matters

The noninformative-prior result establishes the multivariate t-distribution as the fundamental posterior for regression coefficients when variance is unknown, replacing classical interval estimates with a complete probabilistic description. The double-t generalizes this to heterogeneous-variance settings that arise naturally whenever data come from sources with different noise levels — manufacturing process comparisons, cross-country regressions with country-specific volatility, or panel data with heteroskedastic equations. The asymptotic expansion technique developed by Tiao-Zellner (1964) anticipates modern Laplace approximation methods; the underlying intractability they identified is now resolved routinely by Markov Chain Monte Carlo (MCMC).

Open Questions

Related