BRAGA

02 Writing02-02 Notes02-02-417

Parameter Posterior

Published 16 Apr 20262 min read
Contents
  1. 01Deep Breakdown
  2. 02Flowchart
p(w∣D)=N(w∣mpost,Spost)p(w \mid D) = \mathcal{N}(w \mid m_{\text{post}}, S_{\text{post}})
(1)

We are working on the full parameter posterior in Bayesian Linear Regression, where the weight vector ww is updated from a Gaussian prior using a Gaussian likelihood. The canonical result is

p(w∣D)=N(w∣mpost,Spost),p(w \mid D) = \mathcal{N}(w \mid m_{\text{post}}, S_{\text{post}}),
(2)

where

Spost−1=S0−1+1σ2X⊤XS_{\text{post}}^{-1} = S_0^{-1} + \frac{1}{\sigma^2}X^\top X
(3)

and

mpost=Spost(S0−1m0+1σ2X⊤y).m_{\text{post}} = S_{\text{post}}\left(S_0^{-1}m_0 + \frac{1}{\sigma^2}X^\top y\right).
(4)

This posterior summarizes uncertainty-aware regression under the assumptions of a Gaussian prior, Gaussian observation noise, and known noise variance σ2>0\sigma^2 > 0.

Deep Breakdown

The parameter posterior is the central object in Bayesian Linear Regression. Instead of producing one single “best” coefficient vector, Bayesian Linear Regression produces a full probability distribution over the coefficients after observing the data.

That distribution is:

p(w∣D)=N(w∣mpost,Spost)p(w \mid D) = \mathcal{N}(w \mid m_{\text{post}}, S_{\text{post}})
(5)

where D={X,y}D = \{X, y\} denotes the observed dataset.

Inputs:

  • prior mean m0m_0,
  • prior covariance S0S_0,
  • design matrix XX,
  • response vector yy,
  • noise variance σ2\sigma^2.

Outputs:

  • posterior mean mpostm_{\text{post}},
  • posterior covariance SpostS_{\text{post}},
  • full posterior density over the coefficient vector ww.

Why it matters in DA/DS:

  • it gives more than a point estimate, it gives uncertainty,
  • it supports coefficient credible intervals,
  • it propagates uncertainty into predictions,
  • it handles small-data settings more honestly,
  • it allows prior knowledge to regularize unstable regressions.

In ordinary least squares, the output is typically one estimated vector w^\hat{w}. In Bayesian Linear Regression, the output is a cloud of plausible vectors centered around mpostm_{\text{post}}, with spread governed by SpostS_{\text{post}}.

This is extremely useful when:

  • the sample size is small,
  • predictors are correlated,
  • noise is high,
  • prior beliefs are important,
  • overconfidence would be dangerous.

The posterior combines:

  1. prior information, encoded in N(m0,S0)\mathcal{N}(m_0, S_0),
  2. data evidence, encoded in the Gaussian likelihood.

The result stays Gaussian because Gaussian prior and Gaussian likelihood are conjugate.

This object connects directly to:

  • Posterior Mean, which is the center of the posterior,
  • Posterior Covariance, which measures its spread,
  • Predictive Distribution, which uses the posterior over ww to produce uncertainty-aware predictions,
  • Marginal Likelihood, which integrates over this parameter space.

Flowchart

Start with prior:w ~ N(m0, S0)Observe data D= {X, y}AssumeGaussianlikelihood: y | X,w ~ N(Xw, σ²I)Combine priorand likelihoodCollect quadraticand linear termsin wIdentifyGaussianposterior formComputeposteriorprecisionS_post^(-1) =S0^(-1) +(1/σ²)XᵀXInvert to getposteriorcovarianceS_postComputeposterior meanm_postObtain fullposterior p(w |D) = N(m_post,S_post)Use for credibleintervals andpredictiveuncertainty

#machine-learning#machine-learning-algorithms#bayesian-linear-regression-blr

Keyboard shortcuts

Single keys, ignored while typing in a field or with Cmd, Ctrl or Alt held.

0
Home
1 2 3 4
Work, Writing, Tools, About
j / k
Next / previous section on this page
n / p
Next / previous project or essay
u
Up one level
l
Deutsch
t
Light or dark theme
?
This list
Esc
Close