题目
对于后验PDF
![](https://img-blog.csdnimg.cn/direct/2fef644d72bd44b6af8ae4d0c5738b01.png)
画出和
时的PDF。然后,对于同样的
值,求 MMSE和 MAP 的估计量。
解答
根据题目条件,通过Matlab,画出两个函数的概率密度函数图像,其中的x设定为2.
clc, clear, close all;
x=2;
e=0.5;
theat=-10:0.01:10;
p_theat=e/sqrt(2*pi)*exp(-0.5*(theat-x).^2)+(1-e)/sqrt(2*pi)*exp(-0.5*(theat+x).^2);
figure(1)
plot(theat,p_theat)
hold on
xline(x);
xline(-x)
hold off
e=0.75;
p_theat=e/sqrt(2*pi)*exp(-0.5*(theat-x).^2)+(1-e)/sqrt(2*pi)*exp(-0.5*(theat+x).^2);
figure(2)
plot(theat,p_theat)
hold on
xline(x);
xline(-x)
hold off
时,做出图案:
![](https://img-blog.csdnimg.cn/direct/e8eaefb5d76b403b8f15aac39ee5ac82.png)
此时可以发现,是个偶函数,因此:
![](https://img-blog.csdnimg.cn/direct/9fafc96b6b8d453ea6b0481aca5de9d4.png)
也就是此时的的MMSE估计量为0。
而对的观察可知,该函数存在两个极值点,所以
的MMSE估计量不唯一:
![](https://img-blog.csdnimg.cn/direct/0b225758d13545a9867aea6c022d40cb.png)
当时
![](https://img-blog.csdnimg.cn/direct/00786208099a41ac9f8032ede3a2278f.png)
计算MMSE:
![](https://img-blog.csdnimg.cn/direct/6fcb6a1f839046f887ecc0ea0b322527.png)
![](https://img-blog.csdnimg.cn/direct/5f4c3369d6d7415e8dafd32a6e0de51a.png)
![](https://img-blog.csdnimg.cn/direct/d18ba4b82c61409789e8f78963969d67.png)
上式的积分,分别是和
的数学期望,因此可以得到:
![](https://img-blog.csdnimg.cn/direct/a211c757904b4f1a811f6a234c187e2c.png)
![](https://img-blog.csdnimg.cn/direct/fbbf838759f945929342636486a992f6.png)
因此:当时
![](https://img-blog.csdnimg.cn/direct/3ebc1c2c7fb94c52af53cfc02b194d2e.png)
此时代入也验证了上半题目的结论。
而观察图像的特性,可以发现该函数存在一个极值点,也就是的MAP估计量为:
![](https://img-blog.csdnimg.cn/direct/e59fffe0bf034c36963db06cb5b169ee.png)
经过这个例子分析,可以发现,MAP估计量不一定等于MMSE估计量。
书上举得联合分布是高斯,先验也是高斯情况下两者相等,只是特例。