蓝色:先验 p(θ),红色:似然 p(y|θ),绿色:后验 p(θ|y)。白色小圆为 MH 链在后验上随机游走的当前位置。
$$p(\theta|y) \propto p(y|\theta)\,p(\theta),\qquad \alpha = \min\left(1,\, \frac{\pi(\theta^{*})}{\pi(\theta_t)}\right)$$
π 为未归一化的后验密度。提案 θ* 以概率 α 被接受,足够长的链给出来自 π 的样本(Metropolis–Hastings)。
$$\frac{1}{\sigma_{\text{post}}^{2}} = \frac{1}{\sigma_p^{2}} + \frac{N}{\sigma_y^{2}},\qquad \mu_{\text{post}} = \sigma_{\text{post}}^{2}\!\left(\frac{\mu_p}{\sigma_p^{2}} + \frac{N\,\bar{y}}{\sigma_y^{2}}\right)$$
正态-正态共轭模型的解析后验。N 增大时 1/σ_post² 线性增长,σ_post 按 1/√N 收缩。
$$\text{CI}_{95} = \mu_{\text{post}} \pm 1.96\,\sigma_{\text{post}},\qquad I = \log\!\frac{\sigma_p}{\sigma_{\text{post}}}\ [\text{nats}]$$
95% 可信区间与信息增益 I(先验到后验中减少的不确定性,单位 nats)。