每天都有新发现
f ( ⋅ ) f(\cdot) f(⋅) is a PDF with support ( 0 , a ) (0,a) (0,a). a a a being possibly + ∞ +\infty +∞, CDF is F ( ⋅ ) F(\cdot) F(⋅)
关于期望的有用表达式
E
[
X
]
=
∫
0
a
x
f
(
x
)
d
x
=
∫
0
a
x
d
F
(
x
)
=
∫
0
a
(
1
−
F
(
x
)
)
d
x
E[X]=\int_0^axf(x)dx=\int_0^axdF(x)=\int_0^a(1-F(x))dx
E[X]=∫0axf(x)dx=∫0axdF(x)=∫0a(1−F(x))dx
前两个等号很容易得出,下面证明:
proof:
∫
0
a
x
d
F
(
x
)
=
−
∫
0
a
x
d
(
1
−
F
(
x
)
)
=
−
x
(
1
−
F
(
x
)
)
∣
0
a
+
∫
0
a
(
1
−
F
(
x
)
)
d
x
=
∫
0
a
(
1
−
F
(
x
)
)
d
x
\begin{aligned} \int_0^axdF(x)&=-\int_0^axd(1-F(x))\\ &=-x(1-F(x))|_0^a+\int_0^a(1-F(x))dx\\ &=\int_0^a(1-F(x))dx \end{aligned}
∫0axdF(x)=−∫0axd(1−F(x))=−x(1−F(x))∣0a+∫0a(1−F(x))dx=∫0a(1−F(x))dx
第二个等式的第一个式子为0。实际上用的是分布积分的内容。
□
\Box
□
另外根据相似的证明,可以得到
∫
0
b
x
f
(
x
)
d
x
=
b
F
(
b
)
−
∫
0
b
F
(
x
)
d
x
,
∀
b
<
a
\int_0^bxf(x)dx=bF(b)-\int_0^bF(x)dx, \forall b<a
∫0bxf(x)dx=bF(b)−∫0bF(x)dx,∀b<a
联合分布函数的导数和偏导数
假设两个连续随机变量
X
,
Y
X,Y
X,Y, 联合分布函数定义为
F
X
,
Y
(
x
,
y
)
=
P
(
X
≤
x
,
Y
≤
y
)
=
∫
−
∞
x
∫
−
∞
y
f
X
,
Y
(
t
1
,
t
2
)
d
t
1
d
t
2
F_{X,Y}(x,y)=P(X\leq x,Y\leq y)=\int_{-\infty}^x\int_{-\infty}^y f_{X,Y}(t_1,t_2)d t_1 dt_2
FX,Y(x,y)=P(X≤x,Y≤y)=∫−∞x∫−∞yfX,Y(t1,t2)dt1dt2
众所周知
∂
2
F
X
,
Y
(
x
,
y
)
∂
x
∂
y
=
f
X
,
Y
(
x
,
y
)
\frac{\partial^2 F_{X,Y}(x,y)}{\partial x \partial y}=f_{X,Y}(x,y)
∂x∂y∂2FX,Y(x,y)=fX,Y(x,y)
偏导数
∂
F
X
,
Y
(
x
,
y
)
∂
x
=
∫
−
∞
y
f
X
,
Y
(
x
,
t
)
d
t
=
∫
−
∞
y
f
Y
∣
X
=
x
(
t
)
f
X
(
x
)
d
t
=
∫
−
∞
y
f
Y
∣
X
=
x
(
t
)
d
t
f
X
(
x
)
=
F
Y
∣
X
=
x
(
y
)
f
X
(
x
)
=
F
Y
(
y
)
f
X
∣
Y
≤
y
(
x
)
\begin{aligned} \frac{\partial F_{X,Y}(x,y)}{\partial x}&=\int_{-\infty}^y f_{X,Y}(x,t) dt \\ &=\int_{-\infty}^y f_{Y|X=x}(t)f_X(x) dt\\ &=\int_{-\infty}^y f_{Y|X=x}(t)dt f_X(x) \\ &=F_{Y|X=x}(y)f_X(x)\\ &=F_Y(y)f_{X|Y\leq y}(x) \end{aligned}
∂x∂FX,Y(x,y)=∫−∞yfX,Y(x,t)dt=∫−∞yfY∣X=x(t)fX(x)dt=∫−∞yfY∣X=x(t)dtfX(x)=FY∣X=x(y)fX(x)=FY(y)fX∣Y≤y(x)
最后一行是因为
∫
−
∞
y
f
X
,
Y
(
x
,
t
)
d
t
=
∫
−
∞
y
f
Y
(
t
)
f
X
∣
Y
=
t
(
x
)
d
t
\int_{-\infty}^y f_{X,Y}(x,t) dt=\int_{-\infty}^y f_Y(t)f_{X|Y=t}(x) dt
∫−∞yfX,Y(x,t)dt=∫−∞yfY(t)fX∣Y=t(x)dt
高斯分布相关
高斯分布 (Gaussian/Normal Distribution)
PDF:
f
(
x
;
μ
,
σ
)
=
1
σ
2
π
e
−
1
2
(
x
−
μ
σ
)
2
f(x;\mu,\sigma)=\frac{1}{\sigma \sqrt{2\pi}}e^{-\frac{1}{2} (\frac{x-\mu}{\sigma})^2}
f(x;μ,σ)=σ2π1e−21(σx−μ)2
CDF:
F
(
x
)
=
Φ
(
x
−
μ
σ
)
F(x)=\Phi(\frac{x-\mu}{\sigma})
F(x)=Φ(σx−μ)
Rectified Gaussian Distribution
PDF:
h
(
x
)
=
{
f
(
x
)
,
x
>
0
0
,
x
≤
0
h(x)=\left\{ \begin{aligned} f(x), & \ \ x>0 \\ 0, & \ \ x\leq 0 \end{aligned} \right.
h(x)={f(x),0, x>0 x≤0
CDF:
H
(
x
)
=
Φ
(
x
−
μ
σ
)
−
Φ
(
−
μ
σ
)
H(x)=\Phi(\frac{x-\mu}{\sigma})-\Phi(-\frac{\mu}{\sigma})
H(x)=Φ(σx−μ)−Φ(−σμ)
Truncated Gaussian Distribution
如果设定的范围是 [a,b]
PDF:
g
(
x
;
μ
,
σ
,
a
,
b
)
=
{
f
(
x
)
Φ
(
b
−
μ
σ
)
−
Φ
(
a
−
μ
σ
)
,
x
∈
[
a
,
b
]
0
,
o
t
h
e
r
w
i
s
e
g(x;\mu,\sigma,a,b)=\left\{ \begin{aligned} \frac{f(x)}{\Phi(\frac{b-\mu}{\sigma})-\Phi(\frac{a-\mu}{\sigma})}, & \ \ x\in[a,b]\\ 0,& \ \ otherwise \end{aligned} \right.
g(x;μ,σ,a,b)=⎩⎪⎨⎪⎧Φ(σb−μ)−Φ(σa−μ)f(x),0, x∈[a,b] otherwise
三者的区别:
图源:Bayesian non-negative factor analysis for reconstructing transcription factor mediated regulatory networks
Folded Gaussian distribution
PDF:
l
(
x
;
μ
,
σ
)
=
{
1
σ
2
π
e
−
1
2
(
x
−
μ
σ
)
2
+
1
σ
2
π
e
−
1
2
(
x
+
μ
σ
)
2
,
x
≥
0
0
,
o
t
h
e
r
w
i
s
e
l(x;\mu,\sigma)=\left\{ \begin{aligned} \frac{1}{\sigma \sqrt{2\pi}}e^{-\frac{1}{2} (\frac{x-\mu}{\sigma})^2}+\frac{1}{\sigma \sqrt{2\pi}}e^{-\frac{1}{2} (\frac{x+\mu}{\sigma})^2},&\ \ x\geq0\\ 0, & \ \ otherwise \end{aligned} \right.
l(x;μ,σ)=⎩⎪⎨⎪⎧σ2π1e−21(σx−μ)2+σ2π1e−21(σx+μ)2,0, x≥0 otherwise