Solved – Uniform Prior on Normal Mean with Known Variance Implies Truncated Normal Posterior

bayesianposteriortruncated normal distributionuniform distribution

Let's say I have a uniform prior $\mu \sim \mathcal{U}(a,b)$, a normal likelihood $y|\mu \sim \mathcal{N}(\mu,\sigma^2)$ with known variance $\sigma^2$, and one observation $y$. Is then the posterior $\mu|y$ a truncated normal distribution with parameters with parameter $\mu=y$, $\sigma=\sigma$, $a=a $, $b=b$?

Best Answer

Yes: $$ p(\mu \mid y) \propto p(y \mid \mu) \, p(\mu) \propto \mathcal N(y; \mu, \sigma^2) \, \mathbb{1}(\mu \in [a, b]) ,$$ where $\mathbb 1$ is the 0-1 indicator function. This is exactly (up to a multiplicative constant) the pdf of the distribution you said.

Related Question