4.Random Variable__随机变量(3)混合分布

2.3 混合分布

2.3.1 高斯与伽马混合

X ∼ N ( x ∣ μ , σ 2 τ ) , r ∼ G a ( r ∣ τ 2 , τ 2 ) X\sim\mathcal{N}\left( x|\mu,\frac{\sigma^2}{\tau}\right),r\sim Ga\left( r|\frac{\tau}{2},\frac{\tau}{2}\right) XN(xμ,τσ2),rGa(r2τ,2τ)
p ( x ∣ μ , σ 2 r ) = r 1 2 2 π σ e x p [ − 1 2 r ( x − μ ) 2 σ 2 ] , p ( r ∣ τ 2 , τ 2 ) = ( τ 2 ) τ 2 Γ ( τ 2 ) r τ 2 − 1 e x p ( − τ 2 r ) p\left(x|\mu,\frac{\sigma^2}{r}\right)=\frac{r^{\frac{1}{2}}}{\sqrt{2\pi}\sigma}exp\left[-\frac{1}{2}\frac{r\left(x-\mu\right)^2}{\sigma^2}\right],p\left(r|\frac{\tau}{2},\frac{\tau}{2}\right)=\frac{\left(\frac{\tau}{2}\right)^{\frac{\tau}{2}}}{\Gamma\left(\frac{\tau}{2}\right)}r^{\frac{\tau}{2}-1} exp\left(-\frac{\tau}{2}r\right) p(xμ,rσ2)=2π σr21exp[21σ2r(xμ)2],p(r2τ,2τ)=Γ(2τ)(2τ)2τr2τ1exp(2τr)
∫ 0 + ∞ p ( x ∣ μ , σ 2 r ) p ( r ∣ τ 2 , τ 2 ) d r = ∫ 0 + ∞ ( τ 2 ) τ 2 r τ − 1 2 2 π Γ ( τ 2 ) σ e x p { − r 2 [ ( x − μ ) 2 σ 2 + τ ] } d r Let B = ( τ 2 ) τ 2 2 π Γ ( τ 2 ) σ , A = ( x − μ ) 2 σ 2 + τ , u = A 2 r ⇒ d r = 2 A d r = B ( 2 A ) τ + 1 2 ∫ 0 + ∞ u τ − 1 2 e x p ( − u ) d u = Γ ( τ + 1 2 ) Γ ( τ 2 ) τ π σ [ 1 + ( x − μ ) 2 τ σ 2 ] − ( τ + 1 2 ) \begin{align*}&\int_0^{+\infty}p\left(x|\mu,\frac{\sigma^2}{r}\right)p\left(r|\frac{\tau}{2},\frac{\tau}{2}\right)dr\\=&\int_0^{+\infty} \frac{\left(\frac{\tau}{2}\right)^{\frac{\tau}{2}}r^\frac{\tau-1}{2}}{\sqrt{2\pi}\Gamma\left(\frac{\tau}{2}\right)\sigma}exp\left\{-\frac{r}{2}\left[ \frac{\left(x-\mu\right)^2}{\sigma^2} +\tau\right]\right\}dr\\&\text{Let} B=\frac{\left(\frac{\tau}{2}\right)^{\frac{\tau}{2}}}{\sqrt{2\pi}\Gamma\left(\frac{\tau}{2}\right)\sigma},A=\frac{\left(x-\mu\right)^2}{\sigma^2}+\tau,u=\frac{A}{2}r\Rightarrow dr=\frac{2}{A}dr\\=&B\left(\frac{2}{A}\right)^{\frac{\tau+1}{2}}\int_0^{+\infty} u^\frac{\tau-1}{2}exp(-u)du\\=&\frac{\Gamma\left(\frac{\tau+1}{2}\right)}{\Gamma\left(\frac{\tau}{2}\right)\sqrt{\tau \pi}\sigma}\left[ 1+\frac{\left(x-\mu\right)^2}{\tau \sigma^2}\right]^{-\left(\frac{\tau+1}{2}\right)}\end{align*} ===0+p(xμ,rσ2)p(r2τ,2τ)dr0+2π Γ(2τ)σ(2τ)2τr2τ1exp{2r[σ2(xμ)2+τ]}drLetB=2π Γ(2τ)σ(2τ)2τ,A=σ2(xμ)2+τ,u=2Ardr=A2drB(A2)2τ+10+u2τ1exp(u)duΓ(2τ)τπ σΓ(2τ+1)[1+τσ2(xμ)2](2τ+1)
显然服从 T T T分布,即正态分布与伽马分布的混合分布可得 T T T分布,可将 G a ( r ∣ τ 2 , τ 2 ) Ga\left(r|\frac{\tau}{2},\frac{\tau}{2}\right) Ga(r2τ,2τ)视为 w ⃗ \vec{w} w (权重矢量)。

2.3.2 高斯与指数混合

X ∼ N ( x ∣ μ , r ) , r ∼ E x p ( r ∣ 2 σ 2 ) X\sim\mathcal{N}\left(x|\mu,r\right),r\sim Exp\left(r|2\sigma^2\right) XN(xμ,r),rExp(r∣2σ2)
p ( x ∣ μ , r ) = r 1 2 2 π e x p [ − 1 2 ( x − μ ) 2 r ] , p ( r ∣ s σ 2 ) = 1 2 σ 2 e x p ( − r 2 σ 2 ) p(x|\mu,r)=\frac{r^{\frac{1}{2}}}{\sqrt{2\pi}}exp\left[-\frac{1}{2} \frac{\left(x-\mu\right)^2}{r}\right],p\left(r|s\sigma^2\right)=\frac{1}{2\sigma^2}exp\left(-\frac{r}{2\sigma^2}\right) p(xμ,r)=2π r21exp[21r(xμ)2],p(rsσ2)=2σ21exp(2σ2r)
∫ 0 + ∞ p ( x ∣ μ , r ) p ( r ∣ 2 σ 2 ) d r = ∫ 0 + ∞ r 1 2 2 2 π σ 2 e x p { − 1 2 [ ( x − μ ) 2 r + r σ 2 ] } d r \int_0^{+\infty}p(x|\mu,r)p\left(r|2\sigma^2\right)dr=\int_0^{+\infty}\frac{r^{\frac{1}{2}}}{2\sqrt{2\pi}\sigma^2}exp\left\{-\frac{1}{2}\left[\frac{\left(x-\mu\right)^2}{r}+\frac{r}{\sigma^2}\right]\right\}dr 0+p(xμ,r)p(r∣2σ2)dr=0+22π σ2r21exp{21[r(xμ)2+σ2r]}dr
显然积分号内分布函数符合广义逆高斯分布,令 α = 1 / σ 2 \alpha=1/\sigma^2 α=1/σ2 β = ( x − μ ) 2 \beta=\left(x-\mu\right)^2 β=(xμ)2,则
{ α β = 1 σ 2 ( x − μ ) 2 α β = ( x − μ ) 2 σ 2 , p = 1 2 ⇒ { ( α β ) p 2 = 1 σ ( x − μ ) 2 K p ( α β ) = 2 π σ x − μ e x p ( − ∣ x − μ ∣ σ ) ⇒ ( α β ) p 2 2 K p ( α β ) = 1 2 π σ e x p ( − ∣ x − μ ∣ σ ) ≜ A ∫ 0 + ∞ p ( x ∣ μ , r ) p ( r ∣ 2 σ 2 ) d r = 1 2 σ e x p ( − ∣ x − μ ∣ σ ) \begin{align*}&\begin{cases}\frac{\alpha}{\beta}=\frac{1}{\sigma^2\left(x-\mu\right)^2}\\\alpha\beta=\frac{\left(x-\mu\right)^2}{\sigma^2}\end{cases},p=\frac{1}{2}\Rightarrow\begin{cases}\left(\frac{\alpha}{\beta}\right)^{\frac{p}{2}}=\frac{1}{\sqrt{\sigma(x-\mu)}}\\2K_p\left(\sqrt{\alpha \beta}\right)=\sqrt{\frac{2\pi \sigma}{x-\mu}}exp\left(-\frac{|x-\mu|}{\sigma}\right)\end{cases}\\\Rightarrow&\frac{\left(\frac{\alpha}{\beta}\right)^{\frac{p}{2}}}{2K_p\left(\sqrt{\alpha\beta}\right)}=\frac{1}{\sqrt{2\pi}\sigma}exp\left(-\frac{|x-\mu|}{\sigma}\right)\triangleq A\\&\int_0^{+\infty}p(x|\mu,r)p\left(r|2\sigma^2\right)dr=\frac{1}{2\sigma}exp\left(-\frac{|x-\mu|}{\sigma}\right)\end{align*} {βα=σ2(xμ)21αβ=σ2(xμ)2,p=21 (βα)2p=σ(xμ) 12Kp(αβ )=xμ2πσ exp(σxμ)2Kp(αβ )(βα)2p=2π σ1exp(σxμ)A0+p(xμ,r)p(r∣2σ2)dr=2σ1exp(σxμ)
可见高斯分布与指数分布混合服从拉普拉斯分布。

2.3.3 泊松与伽马分布

X ∼ P o i s s o n ( λ ) , λ ∼ G a m m a ( r , 1 − p p ) , 0 < p < 1 , r > 0 P ( X = k ) = λ k k ! e x p ( λ ) = λ k Γ ( k + 1 ) e x p ( λ ) p ( λ ∣ r , 1 − p p ) = ( 1 − p ) r Γ ( r ) p r λ r − 1 e x p ( p − 1 p λ ) ∫ 0 + ∞ P ( X = k ) P ( λ ∣ r , 1 − p p ) d λ = ( 1 − p ) r Γ ( k + 1 ) Γ ( r ) p r ∫ 0 + ∞ λ k + r − 1 e x p ( − λ p ) d λ = Γ ( k + r ) Γ ( k ) Γ ( r ) p k ( 1 − p ) r ∼ N B ( k , p ) \begin{align*} &X\sim Poisson(\lambda),\lambda \sim Gamma\left(r,\frac{1-p}{p}\right),0<p<1,r>0 \\&P(X=k)=\frac{\lambda^k}{k!}exp(\lambda)=\frac{\lambda^k}{\Gamma(k+1)}exp(\lambda)\\&p\left(\lambda|r,\frac{1-p}{p}\right)=\frac{(1-p)^r}{\Gamma(r)p^r}\lambda^{r-1}exp\left(\frac{p-1}{p}\lambda\right)\\&\int_0^{+\infty}P(X=k)P\left(\lambda|r,\frac{1-p}{p}\right)d\lambda\\=&\frac{(1-p)^r}{\Gamma(k+1)\Gamma(r)p^r}\int_0^{+\infty}\lambda^{k+r-1} exp\left(-\frac{\lambda}{p}\right)d\lambda\\=&\frac{\Gamma(k+r)}{\Gamma(k)\Gamma(r)}p^k(1-p)^r\\\sim&NB(k,p)\end{align*} ==XPoisson(λ),λGamma(r,p1p),0<p<1,r>0P(X=k)=k!λkexp(λ)=Γ(k+1)λkexp(λ)p(λr,p1p)=Γ(r)pr(1p)rλr1exp(pp1λ)0+P(X=k)P(λr,p1p)dλΓ(k+1)Γ(r)pr(1p)r0+λk+r1exp(pλ)dλΓ(k)Γ(r)Γ(k+r)pk(1p)rNB(k,p)
可见,泊松分布与伽马分布混合可得负二项分布。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Fanshaoliang

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值