AMP State Evolution (SE)的计算
t
=
1
t=1
t=1时,
E
(
t
)
=
E
[
X
2
]
\mathcal E^{(t)} = \mathbb E [X^2]
E(t)=E[X2],SE的迭代式为
τ
r
(
t
)
=
σ
2
+
1
δ
E
(
t
)
E
(
t
+
1
)
=
E
∣
η
(
t
)
(
X
+
Z
)
−
X
∣
2
,
Z
∼
N
(
0
,
τ
r
(
t
)
)
\begin{aligned} \tau^{(t)}_r &= \sigma^2 + \frac{1}{\delta} \mathcal E^{(t)} \\ \mathcal E^{(t+1)} &= \mathbb E \left | \eta^{(t)} \left ( X + Z \right) - X \right |^2, \ Z \sim \mathcal N(0, \tau^{(t)}_r) \end{aligned}
τr(t)E(t+1)=σ2+δ1E(t)=E
η(t)(X+Z)−X
2, Z∼N(0,τr(t))
撰写的时候存在一定的符号乱用,之后的 τ \tau τ即指 τ r ( t ) \tau^{(t)}_r τr(t)。
注意到,
E
(
t
+
1
)
=
E
∣
η
(
t
)
(
X
+
Z
)
−
X
∣
2
\mathcal E^{(t+1)} = \mathbb E \left | \eta^{(t)} \left ( X + Z \right) - X \right |^2
E(t+1)=E
η(t)(X+Z)−X
2是关于随机变量
X
,
Z
X, Z
X,Z求期望,这里我们认为
X
,
Z
X, Z
X,Z之间相互独立,因此
E
(
t
+
1
)
=
∫
∫
p
X
,
Z
(
X
,
Z
)
∣
η
(
t
)
(
X
+
Z
)
−
X
∣
2
d
X
d
Z
\mathcal E^{(t+1)} = \int \int p_{X, Z}(X, Z) \left | \eta^{(t)} \left ( X + Z \right) - X \right |^2 dX dZ
E(t+1)=∫∫pX,Z(X,Z)
η(t)(X+Z)−X
2dXdZ
令
R
=
X
+
Z
R = X + Z
R=X+Z,不难得到
p
X
,
R
(
X
,
R
)
p_{X, R}(X, R)
pX,R(X,R)等价于
p
X
,
Z
(
X
,
Z
)
p_{X, Z}(X, Z)
pX,Z(X,Z)(因为
p
X
,
Z
(
X
=
x
0
,
Z
=
z
0
)
=
p
X
,
R
(
X
=
x
0
,
R
=
x
0
+
z
0
)
p_{X, Z}(X=x_0, Z=z_0) = p_{X, R}(X=x_0, R=x_0 + z_0)
pX,Z(X=x0,Z=z0)=pX,R(X=x0,R=x0+z0)),因此我们可以把
E
(
t
+
1
)
\mathcal E^{(t+1)}
E(t+1)写为(这里我们考虑
η
(
t
)
\eta^{(t)}
η(t)为MMSE函数)
E
(
t
+
1
)
=
∫
∫
p
X
,
R
(
X
,
R
)
∣
η
(
t
)
(
R
)
−
X
∣
2
d
X
d
R
=
∫
∫
p
R
(
R
)
p
X
∣
R
(
X
∣
R
)
∣
E
[
X
∣
R
]
−
X
∣
2
d
X
d
R
=
∫
p
R
(
R
)
v
a
r
[
X
∣
R
]
d
R
\begin{aligned} \mathcal E^{(t+1)} &= \int \int p_{X, R}(X, R) \left | \eta^{(t)} \left ( R \right) - X \right |^2 dX dR \\ &= \int \int p_R(R) p_{X|R}(X|R) \left | \mathbb E\left [ X|R \right] - X \right |^2 dX dR \\ &= \int p_R(R) \mathrm{var}[X|R] dR \end{aligned}
E(t+1)=∫∫pX,R(X,R)
η(t)(R)−X
2dXdR=∫∫pR(R)pX∣R(X∣R)∣E[X∣R]−X∣2dXdR=∫pR(R)var[X∣R]dR
因为
p
X
,
Z
(
X
,
Z
)
=
p
X
(
X
)
⋅
p
X
(
Z
)
=
p
X
(
X
)
N
(
z
;
0
,
τ
r
(
t
)
)
p_{X, Z}(X, Z) = p_X(X) \cdot p_X(Z) = p_X(X) \mathcal N(z;0, \tau^{(t)}_r)
pX,Z(X,Z)=pX(X)⋅pX(Z)=pX(X)N(z;0,τr(t)),因此可以得到
p
X
,
R
(
X
,
R
)
=
p
X
(
X
)
N
(
R
−
X
;
0
,
τ
r
(
t
)
)
=
p
X
(
X
)
N
(
R
;
X
,
τ
r
(
t
)
)
\begin{aligned} p_{X, R}(X, R) &= p_X(X) \mathcal N(R-X;0, \tau^{(t)}_r) \\ &= p_X(X) \mathcal N(R;X, \tau^{(t)}_r) \end{aligned}
pX,R(X,R)=pX(X)N(R−X;0,τr(t))=pX(X)N(R;X,τr(t))
X的先验为为伯努利高斯分布时
p X ( X ) ≡ ( 1 − ρ ) δ ( X ) + ρ N ( μ , ν ) p_X(X) \equiv (1-\rho) \delta(X) + \rho \mathcal N(\mu, \nu) pX(X)≡(1−ρ)δ(X)+ρN(μ,ν)
那么,
X
,
R
X,R
X,R的联合分布可写为
p
X
,
R
(
X
,
R
)
=
(
(
1
−
ρ
)
δ
(
X
)
+
ρ
N
(
X
;
μ
,
ν
)
)
⋅
N
(
X
;
R
,
τ
r
(
t
)
)
=
(
1
−
ρ
)
δ
(
X
)
N
(
X
;
R
,
τ
r
(
t
)
)
+
ρ
N
(
X
;
μ
,
ν
)
N
(
X
;
R
,
τ
r
(
t
)
)
\begin{aligned} p_{X, R}(X, R) &= \left ((1-\rho) \delta(X) + \rho \mathcal N(X; \mu, \nu) \right) \cdot \mathcal N(X;R, \tau^{(t)}_r) \\ &= (1-\rho) \delta(X) \mathcal N(X;R, \tau^{(t)}_r) + \rho \mathcal N(X; \mu, \nu) \mathcal N(X;R, \tau^{(t)}_r) \end{aligned}
pX,R(X,R)=((1−ρ)δ(X)+ρN(X;μ,ν))⋅N(X;R,τr(t))=(1−ρ)δ(X)N(X;R,τr(t))+ρN(X;μ,ν)N(X;R,τr(t))
进一步,我们可以得到关于
R
R
R的边缘分布
p
R
(
R
)
=
∫
p
X
,
R
(
X
,
R
)
d
X
=
(
1
−
ρ
)
N
(
0
;
R
,
τ
r
(
t
)
)
+
ρ
∫
N
(
X
;
μ
,
ν
)
N
(
X
;
R
,
τ
r
(
t
)
)
d
X
=
(
1
−
ρ
)
N
(
0
;
R
,
τ
r
(
t
)
)
+
ρ
1
2
π
(
ν
+
τ
r
(
t
)
)
exp
{
−
(
R
−
μ
)
2
2
(
ν
+
τ
r
(
t
)
)
}
=
(
1
−
ρ
)
N
(
R
;
0
,
τ
r
(
t
)
)
+
ρ
N
(
R
;
μ
,
ν
+
τ
r
(
t
)
)
\begin{aligned} p_R(R) &= \int p_{X, R}(X, R) dX \\ &= (1-\rho) \mathcal N(0;R, \tau^{(t)}_r) + \rho \int \mathcal N(X; \mu, \nu) \mathcal N(X;R, \tau^{(t)}_r) dX \\ &= (1-\rho) \mathcal N(0;R, \tau^{(t)}_r) + \rho \frac{1}{\sqrt{2 \pi (\nu + \tau^{(t)}_r)}} \exp \left \{ - \frac{(R - \mu)^2}{2 (\nu + \tau^{(t)}_r)} \right \} \\ &= (1-\rho) \mathcal N(R; 0, \tau^{(t)}_r) + \rho \mathcal N(R; \mu, \nu + \tau^{(t)}_r) \end{aligned}
pR(R)=∫pX,R(X,R)dX=(1−ρ)N(0;R,τr(t))+ρ∫N(X;μ,ν)N(X;R,τr(t))dX=(1−ρ)N(0;R,τr(t))+ρ2π(ν+τr(t))1exp{−2(ν+τr(t))(R−μ)2}=(1−ρ)N(R;0,τr(t))+ρN(R;μ,ν+τr(t))
我们计算后验均值
E
[
X
∣
R
]
\mathbb E[X|R]
E[X∣R]
E
[
X
∣
R
]
=
∫
X
p
X
∣
R
(
X
∣
R
)
d
X
=
1
p
R
(
R
)
∫
X
p
X
,
R
(
X
,
R
)
d
X
=
1
p
R
(
R
)
⋅
ρ
⋅
∫
X
N
(
X
;
μ
,
ν
)
N
(
X
;
R
,
τ
r
(
t
)
)
d
X
=
1
p
R
(
R
)
⋅
ρ
⋅
N
(
R
;
μ
,
ν
+
τ
r
(
t
)
)
⋅
μ
τ
r
(
t
)
+
R
ν
ν
+
τ
r
(
t
)
=
ρ
⋅
N
(
R
;
μ
,
ν
+
τ
r
(
t
)
)
(
1
−
ρ
)
N
(
R
;
0
,
τ
r
(
t
)
)
+
ρ
N
(
R
;
μ
,
ν
+
τ
r
(
t
)
)
⋅
μ
τ
r
(
t
)
+
R
ν
ν
+
τ
r
(
t
)
=
1
1
+
1
−
ρ
ρ
⋅
N
(
R
;
0
,
τ
r
(
t
)
)
N
(
R
;
μ
,
ν
+
τ
r
(
t
)
)
⋅
μ
τ
r
(
t
)
+
R
ν
ν
+
τ
r
(
t
)
\begin{aligned} \mathbb E[X|R] &= \int X p_{X|R} (X|R) dX \\ &= \frac{1}{p_R(R)} \int X p_{X,R} (X,R) dX \\ &= \frac{1}{p_R(R)} \cdot \rho \cdot \int X \mathcal N(X; \mu, \nu) \mathcal N(X;R, \tau^{(t)}_r) dX \\ &= \frac{1}{p_R(R)} \cdot \rho \cdot \mathcal N (R; \mu, \nu + \tau^{(t)}_r) \cdot \frac{\mu \tau^{(t)}_r + R \nu}{ \nu + \tau^{(t)}_r } \\ &= \frac{ \rho \cdot \mathcal N (R; \mu, \nu + \tau^{(t)}_r)}{(1-\rho) \mathcal N(R; 0, \tau^{(t)}_r) + \rho \mathcal N(R; \mu, \nu + \tau^{(t)}_r) } \cdot \frac{\mu \tau^{(t)}_r + R \nu}{ \nu + \tau^{(t)}_r } \\ &= \frac{1}{ 1+ \frac{1-\rho}{\rho} \cdot \frac{\mathcal N(R; 0, \tau^{(t)}_r) }{ \mathcal N(R; \mu, \nu + \tau^{(t)}_r)} } \cdot \frac{\mu \tau^{(t)}_r + R \nu}{ \nu + \tau^{(t)}_r } \\ \end{aligned}
E[X∣R]=∫XpX∣R(X∣R)dX=pR(R)1∫XpX,R(X,R)dX=pR(R)1⋅ρ⋅∫XN(X;μ,ν)N(X;R,τr(t))dX=pR(R)1⋅ρ⋅N(R;μ,ν+τr(t))⋅ν+τr(t)μτr(t)+Rν=(1−ρ)N(R;0,τr(t))+ρN(R;μ,ν+τr(t))ρ⋅N(R;μ,ν+τr(t))⋅ν+τr(t)μτr(t)+Rν=1+ρ1−ρ⋅N(R;μ,ν+τr(t))N(R;0,τr(t))1⋅ν+τr(t)μτr(t)+Rν
对于大多数问题,我们有
μ
=
0
\mu=0
μ=0,令
ϕ
(
R
)
=
1
−
ρ
ρ
⋅
N
(
R
;
0
,
τ
r
(
t
)
)
N
(
R
;
μ
,
ν
+
τ
r
(
t
)
)
\phi (R) = \frac{1-\rho}{\rho} \cdot \frac{\mathcal N(R; 0, \tau^{(t)}_r) }{ \mathcal N(R; \mu, \nu + \tau^{(t)}_r)}
ϕ(R)=ρ1−ρ⋅N(R;μ,ν+τr(t))N(R;0,τr(t)), 当
μ
=
0
\mu=0
μ=0时,我们有
E
[
X
∣
R
]
=
1
1
+
ϕ
(
R
)
⋅
R
ν
ν
+
τ
r
(
t
)
\begin{aligned} \mathbb E[X|R] = \frac{1}{1 + \phi(R)} \cdot \frac{ R \nu}{ \nu + \tau^{(t)}_r } \end{aligned}
E[X∣R]=1+ϕ(R)1⋅ν+τr(t)Rν
进一步,可以得到
∂
∂
R
E
[
X
∣
R
]
=
ν
ν
+
τ
r
(
t
)
⋅
1
+
ϕ
(
R
)
+
R
2
(
1
τ
−
1
τ
+
ν
)
ϕ
(
R
)
(
1
+
ϕ
(
R
)
)
2
\frac{\partial}{\partial R} \mathbb E[X|R] =\frac{\nu}{\nu + \tau^{(t)}_r } \cdot \frac{1+\phi(R) + R^2 ( \frac{1}{\tau } - \frac{1}{\tau + \nu} ) \phi(R) }{ (1+\phi(R))^2 }
∂R∂E[X∣R]=ν+τr(t)ν⋅(1+ϕ(R))21+ϕ(R)+R2(τ1−τ+ν1)ϕ(R)
根据AWGN后验均值与方差的关系,
v
a
r
[
X
∣
R
]
=
τ
r
(
t
)
⋅
∂
∂
R
E
[
X
∣
R
]
=
ν
τ
r
(
t
)
ν
+
τ
r
(
t
)
⋅
1
+
ϕ
(
R
)
+
R
2
(
1
τ
−
1
τ
+
ν
)
ϕ
(
R
)
(
1
+
ϕ
(
R
)
)
2
\mathrm{var}[X|R] = \tau^{(t)}_r \cdot \frac{\partial}{\partial R} \mathbb E[X|R] =\frac{\nu \tau^{(t)}_r }{\nu + \tau^{(t)}_r } \cdot \frac{1+\phi(R) + R^2 ( \frac{1}{\tau } - \frac{1}{\tau + \nu} ) \phi(R) }{ (1+\phi(R))^2 }
var[X∣R]=τr(t)⋅∂R∂E[X∣R]=ν+τr(t)ντr(t)⋅(1+ϕ(R))21+ϕ(R)+R2(τ1−τ+ν1)ϕ(R)
不难看出,
p
R
(
R
)
p_R(R)
pR(R)可以表示为
p
R
(
R
)
=
(
1
+
ϕ
(
R
)
)
⋅
ρ
N
(
R
;
0
,
ν
+
τ
r
(
t
)
)
p_R(R) = (1 + \phi(R)) \cdot \rho \mathcal N(R; 0, \nu + \tau^{(t)}_r)
pR(R)=(1+ϕ(R))⋅ρN(R;0,ν+τr(t)),因此
E
(
t
+
1
)
=
∫
p
R
(
R
)
v
a
r
[
X
∣
R
]
d
R
=
∫
(
1
+
ϕ
(
R
)
)
⋅
ρ
N
(
R
;
0
,
ν
+
τ
r
(
t
)
)
⋅
ν
τ
r
(
t
)
ν
+
τ
r
(
t
)
⋅
1
+
ϕ
(
R
)
+
R
2
(
1
τ
−
1
τ
+
ν
)
ϕ
(
R
)
(
1
+
ϕ
(
R
)
)
2
=
ρ
ν
τ
r
(
t
)
ν
+
τ
r
(
t
)
⋅
∫
N
(
R
;
0
,
ν
+
τ
r
(
t
)
)
{
1
+
R
2
ν
τ
(
τ
+
ν
)
(
1
−
1
1
+
ϕ
(
R
)
)
}
d
R
=
ρ
ν
τ
r
(
t
)
ν
+
τ
r
(
t
)
⋅
{
1
+
ν
τ
−
ν
τ
(
τ
+
ν
)
∫
R
2
1
+
ϕ
(
R
)
N
(
R
;
0
,
ν
+
τ
r
(
t
)
)
d
R
}
=
ρ
⋅
ν
−
ρ
⋅
ν
2
(
ν
+
τ
)
2
∫
R
2
1
+
ϕ
(
R
)
N
(
R
;
0
,
ν
+
τ
r
(
t
)
)
d
R
\begin{aligned} \mathcal E^{(t+1)} &= \int p_R(R) \mathrm{var}[X|R] dR \\ &= \int (1 + \phi(R)) \cdot \rho \mathcal N(R; 0, \nu + \tau^{(t)}_r) \cdot \frac{\nu \tau^{(t)}_r }{\nu + \tau^{(t)}_r } \cdot \frac{1+\phi(R) + R^2 ( \frac{1}{\tau } - \frac{1}{\tau + \nu} ) \phi(R) }{ (1+\phi(R))^2 } \\ &= \rho \frac{\nu \tau^{(t)}_r }{\nu + \tau^{(t)}_r } \cdot \int \mathcal N(R; 0, \nu + \tau^{(t)}_r) \left \{ 1 + R^2 \frac{\nu}{\tau(\tau + \nu) } \left( 1- \frac{1}{1 + \phi (R)} \right) \right \} dR \\ &= \rho \frac{\nu \tau^{(t)}_r }{\nu + \tau^{(t)}_r } \cdot \left \{ 1 + \frac{\nu}{\tau} - \frac{\nu}{\tau(\tau + \nu) } \int \frac{R^2}{1 + \phi(R)} \mathcal N(R; 0, \nu + \tau^{(t)}_r) dR \right \} \\ & = \rho \cdot \nu - \rho \cdot \frac{\nu^2}{(\nu+ \tau)^2} \int \frac{R^2}{1 + \phi(R)} \mathcal N(R; 0, \nu + \tau^{(t)}_r) dR \end{aligned}
E(t+1)=∫pR(R)var[X∣R]dR=∫(1+ϕ(R))⋅ρN(R;0,ν+τr(t))⋅ν+τr(t)ντr(t)⋅(1+ϕ(R))21+ϕ(R)+R2(τ1−τ+ν1)ϕ(R)=ρν+τr(t)ντr(t)⋅∫N(R;0,ν+τr(t)){1+R2τ(τ+ν)ν(1−1+ϕ(R)1)}dR=ρν+τr(t)ντr(t)⋅{1+τν−τ(τ+ν)ν∫1+ϕ(R)R2N(R;0,ν+τr(t))dR}=ρ⋅ν−ρ⋅(ν+τ)2ν2∫1+ϕ(R)R2N(R;0,ν+τr(t))dR
其中
R
2
1
+
ϕ
(
R
)
=
R
2
1
+
1
−
ρ
ρ
⋅
ν
+
τ
τ
exp
(
−
ν
2
τ
(
τ
+
ν
)
R
2
)
\frac{R^2}{1 + \phi(R)} = \frac{R^2}{ 1 + \frac{1-\rho}{\rho} \cdot \sqrt{\frac{\nu + \tau}{\tau}} \exp \left ( - \frac{\nu}{2\tau(\tau + \nu)} R^2 \right) }
1+ϕ(R)R2=1+ρ1−ρ⋅τν+τexp(−2τ(τ+ν)νR2)R2
总结
t
=
1
t=1
t=1时,
E
(
t
)
=
E
[
X
2
]
\mathcal E^{(t)} = \mathbb E [X^2]
E(t)=E[X2],SE的迭代式为
τ
r
(
t
)
=
σ
2
+
1
δ
E
(
t
)
E
(
t
+
1
)
=
E
∣
η
(
t
)
(
X
+
Z
)
−
X
∣
2
,
Z
∼
N
(
0
,
τ
r
(
t
)
)
\begin{aligned} \tau^{(t)}_r &= \sigma^2 + \frac{1}{\delta} \mathcal E^{(t)} \\ \mathcal E^{(t+1)} &= \mathbb E \left | \eta^{(t)} \left ( X + Z \right) - X \right |^2, \ Z \sim \mathcal N(0, \tau^{(t)}_r) \end{aligned}
τr(t)E(t+1)=σ2+δ1E(t)=E
η(t)(X+Z)−X
2, Z∼N(0,τr(t))
当
X
X
X的先验是伯努利高斯时:
X
∼
(
1
−
ρ
)
δ
(
X
)
+
ρ
N
(
0
,
ν
)
X \sim (1- \rho) \delta(X)+ \rho \mathcal N (0, \nu)
X∼(1−ρ)δ(X)+ρN(0,ν),可以把SE表征为
t
=
1
t=1
t=1时,
E
(
t
)
=
E
[
X
2
]
=
ρ
ν
\mathcal E^{(t)} = \mathbb E [X^2]= \rho \nu
E(t)=E[X2]=ρν,SE的迭代式为
τ
r
(
t
)
=
σ
2
+
1
δ
E
(
t
)
E
(
t
+
1
)
=
ρ
⋅
ν
−
ρ
⋅
ν
2
(
ν
+
τ
r
(
t
)
)
2
∫
R
2
1
+
ϕ
(
R
)
N
(
R
;
0
,
ν
+
τ
r
(
t
)
)
d
R
\begin{aligned} \tau^{(t)}_r &= \sigma^2 + \frac{1}{\delta} \mathcal E^{(t)} \\ \mathcal E^{(t+1)} &= \rho \cdot \nu - \rho \cdot \frac{\nu^2}{(\nu+ \tau^{(t)}_r)^2} \int \frac{R^2}{1 + \phi(R)} \mathcal N(R; 0, \nu + \tau^{(t)}_r) dR \end{aligned}
τr(t)E(t+1)=σ2+δ1E(t)=ρ⋅ν−ρ⋅(ν+τr(t))2ν2∫1+ϕ(R)R2N(R;0,ν+τr(t))dR
其中
R
2
1
+
ϕ
(
R
)
=
R
2
1
+
1
−
ρ
ρ
⋅
ν
+
τ
r
(
t
)
τ
r
(
t
)
exp
(
−
ν
2
τ
r
(
t
)
(
τ
r
(
t
)
+
ν
)
R
2
)
\frac{R^2}{1 + \phi(R)} = \frac{R^2}{ 1 + \frac{1-\rho}{\rho} \cdot \sqrt{\frac{\nu + \tau^{(t)}_r}{ \tau^{(t)}_r}} \exp \left ( - \frac{\nu}{ 2\tau^{(t)}_r( \tau^{(t)}_r + \nu)} R^2 \right) }
1+ϕ(R)R2=1+ρ1−ρ⋅τr(t)ν+τr(t)exp(−2τr(t)(τr(t)+ν)νR2)R2
SE部分的MATLAB代码
sigma2 = 0.0165;
rho = 0.1;
nu = 1 / rho;
lim = inf;
Iteration = 50;
delta = 0.6; % underdetermined ratio
SE_MSE = zeros(Iteration, 1);
SE_tau2 = zeros(Iteration, 1);
SE_MSE(1) = rho * nu;
SE_tau2(1) = sigma2 + 1/delta * SE_MSE(1);
for it = 2: Iteration
tau = SE_tau2( it - 1 );
f = @(r) r.*r ./ ...
( 1 + (1-rho)./rho .* sqrt( 1 + nu./tau ) .* exp( max(-60, -0.5 * r .* r .* nu./ tau./(nu + tau) ) ) ) ...
.* normpdf(r, 0, sqrt(nu + tau)) ; % -60 is a bound for numerical robustness
SE_MSE(it) = rho * nu - rho * nu^2 / (nu + tau)^2 * integral(f,-lim,lim);
SE_tau2(it) = sigma2 + 1/delta * SE_MSE(it);
end
当N=20000时,AMP的MSE性能与SE一致
附录:两个高斯随机变量相乘
N ( x ; μ 1 , ν 1 ) N ( x ; μ 2 , ν 2 ) = 1 2 π ν 1 exp ( − ( x − μ 1 ) 2 2 ν 1 ) ⋅ 1 2 π ν 2 exp ( − ( x − μ 2 ) 2 2 ν 2 ) = 1 2 π ν 1 ν 2 exp { − ν 2 ( x 2 − 2 μ 1 x + μ 1 2 ) 2 ν 1 ν 2 − ν 1 ( x 2 − 2 μ 2 x + μ 2 2 ) 2 ν 1 ν 2 } = 1 2 π ν 1 ν 2 exp { − ( ν 1 + ν 2 ) x 2 − 2 ( μ 1 ν 2 + μ 2 ν 1 ) x + μ 1 2 ν 2 + μ 2 2 ν 1 2 ν 1 ν 2 } = 1 2 π ν 1 ν 2 exp { − x 2 − 2 ( μ 1 ν 2 + μ 2 ν 1 ) ν 1 + ν 2 x + ( ( μ 1 ν 2 + μ 2 ν 1 ) ν 1 + ν 2 ) 2 + μ 1 2 ν 2 + μ 2 2 ν 1 ν 1 + ν 2 − ( ( μ 1 ν 2 + μ 2 ν 1 ) ν 1 + ν 2 ) 2 2 ν 1 ν 2 ν 1 + ν 2 } = 1 2 π ( ν 1 + ν 2 ) exp { − μ 1 2 ν 2 + μ 2 2 ν 1 − ( μ 1 ν 2 + μ 2 ν 1 ) 2 ν 1 + ν 2 2 ν 1 ν 2 } ⋅ 1 2 π ν 1 ν 2 ν 1 + ν 2 exp { − ( x − μ 1 ν 2 + μ 2 ν 1 ν 1 + ν 2 ) 2 2 ν 1 ν 2 ν 1 + ν 2 } = 1 2 π ( ν 1 + ν 2 ) exp { − ( μ 1 − μ 2 ) 2 2 ( ν 1 + ν 2 ) } ⋅ 1 2 π ν 1 ν 2 ν 1 + ν 2 exp { − ( x − μ 1 ν 2 + μ 2 ν 1 ν 1 + ν 2 ) 2 2 ν 1 ν 2 ν 1 + ν 2 } \begin{aligned} & \ \ \ \ \mathcal N(x; \mu_1, \nu_1) \mathcal N(x; \mu_2, \nu_2) \\ &= \frac{1}{\sqrt{2 \pi \nu_1}} \exp \left ( - \frac{ (x - \mu_1)^2 }{2 \nu_1} \right ) \cdot \frac{1}{\sqrt{2 \pi \nu_2}} \exp \left ( - \frac{ (x - \mu_2)^2 }{2 \nu_2} \right ) \\ & = \frac{1}{2 \pi \sqrt{ \nu_1 \nu_2}} \exp \left \{ - \frac{ \nu_2 ( x^2 - 2 \mu_1 x + \mu_1^2 ) }{2 \nu_1 \nu_2} - \frac { \nu_1 ( x^2 - 2 \mu_2 x + \mu_2^2 ) }{2 \nu_1 \nu_2} \right \} \\ & = \frac{1}{2 \pi \sqrt{ \nu_1 \nu_2}} \exp \left \{ - \frac{ (\nu_1 + \nu_2) x^2 - 2 (\mu_1 \nu_2 + \mu_2 \nu_1) x + \mu^2_1 \nu_2 + \mu^2_2 \nu_1 }{2 \nu_1 \nu_2} \right \} \\ & = \frac{1}{2 \pi \sqrt{ \nu_1 \nu_2}} \exp \left \{ - \frac{ x^2 - 2 \frac{(\mu_1 \nu_2 + \mu_2 \nu_1)}{\nu_1 + \nu_2} x + \left ( \frac{(\mu_1 \nu_2 + \mu_2 \nu_1)}{\nu_1 + \nu_2} \right)^2 + \frac{\mu^2_1 \nu_2 + \mu^2_2 \nu_1}{\nu_1 + \nu_2} - \left ( \frac{(\mu_1 \nu_2 + \mu_2 \nu_1)}{\nu_1 + \nu_2} \right)^2 }{2 \frac{\nu_1 \nu_2} { \nu_1 + \nu_2 }} \right \} \\ &= \frac{1}{ \sqrt{2 \pi (\nu_1 + \nu_2)} } \exp \left \{ - \frac{\mu^2_1 \nu_2 + \mu^2_2 \nu_1 - \frac {(\mu_1 \nu_2 + \mu_2 \nu_1)^2}{ \nu_1 + \nu_2} } { 2 \nu_1 \nu_2 } \right \} \cdot \frac{1}{\sqrt{2 \pi \frac{\nu_1 \nu_2} { \nu_1 + \nu_2 } }} \exp \left \{ - \frac{ \left( x- \frac{\mu_1 \nu_2 + \mu_2 \nu_1}{\nu_1 + \nu_2} \right)^2 }{ 2 \frac{\nu_1 \nu_2} { \nu_1 + \nu_2 } } \right \} \\ &= \frac{1}{ \sqrt{2 \pi (\nu_1 + \nu_2)} } \exp \left \{ - \frac{ (\mu_1 - \mu_2)^2 }{2 (\nu_1 + \nu_2)} \right \} \cdot \frac{1}{\sqrt{2 \pi \frac{\nu_1 \nu_2} { \nu_1 + \nu_2 } }} \exp \left \{ - \frac{ \left( x- \frac{\mu_1 \nu_2 + \mu_2 \nu_1}{\nu_1 + \nu_2} \right)^2 }{ 2 \frac{\nu_1 \nu_2} { \nu_1 + \nu_2 } } \right \} \\ \end{aligned} N(x;μ1,ν1)N(x;μ2,ν2)=2πν11exp(−2ν1(x−μ1)2)⋅2πν21exp(−2ν2(x−μ2)2)=2πν1ν21exp{−2ν1ν2ν2(x2−2μ1x+μ12)−2ν1ν2ν1(x2−2μ2x+μ22)}=2πν1ν21exp{−2ν1ν2(ν1+ν2)x2−2(μ1ν2+μ2ν1)x+μ12ν2+μ22ν1}=2πν1ν21exp⎩ ⎨ ⎧−2ν1+ν2ν1ν2x2−2ν1+ν2(μ1ν2+μ2ν1)x+(ν1+ν2(μ1ν2+μ2ν1))2+ν1+ν2μ12ν2+μ22ν1−(ν1+ν2(μ1ν2+μ2ν1))2⎭ ⎬ ⎫=2π(ν1+ν2)1exp⎩ ⎨ ⎧−2ν1ν2μ12ν2+μ22ν1−ν1+ν2(μ1ν2+μ2ν1)2⎭ ⎬ ⎫⋅2πν1+ν2ν1ν21exp⎩ ⎨ ⎧−2ν1+ν2ν1ν2(x−ν1+ν2μ1ν2+μ2ν1)2⎭ ⎬ ⎫=2π(ν1+ν2)1exp{−2(ν1+ν2)(μ1−μ2)2}⋅2πν1+ν2ν1ν21exp⎩ ⎨ ⎧−2ν1+ν2ν1ν2(x−ν1+ν2μ1ν2+μ2ν1)2⎭ ⎬ ⎫
求导时,我们借助了在线求导网站: https://mathdf.com/der/cn/