找回密码
 快速注册
搜索
查看: 85|回复: 4

[概率/统计] 二元正态分布的象限概率

[复制链接]

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

hbghlyj 发表于 2023-6-17 18:47 |阅读模式
我在 Mathworld 读到这个公式:
The standardized bivariate normal distribution takes $\sigma_1=\sigma_2=1$ and $\mu_1=\mu_2=0$. The quadrant probability in this special case is then given analytically by
\begin{align}
P(x_1\le0,x_2\ge0)&=P(x_1\ge0,x_2\le 0)\tag{71}\\
&=\int_{-\infty}^0\int_0^\infty P(x_1,x_2)\rmd x_1\rmd x_2\tag{72}\\
&=\frac{\cos^{-1}\rho}{2\pi}.\tag{73}
\end{align}
我知道 (71) 因为 $x_1,x_2$ 的对称性 $P(x_1\le0,x_2\ge0)=P(x_1\ge0,x_2\le 0)$.
如何证明公式(73)?

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

 楼主| hbghlyj 发表于 2023-6-17 19:03
不是直接计算积分而使用变量替换更好?
由式(8)(9)可知:$z_1,z_2$ independent standard normal distribution\begin{align*}x_1&=\sqrt{1+\rho\over2}z_1+\sqrt{1-\rho\over2}z_2\\
x_2&=\sqrt{1+\rho\over2}z_1-\sqrt{1-\rho\over2}z_2\end{align*}$\rho\in(-1,1)\Rightarrow\frac{\cos^{-1}\rho}2\in(0,\frac\pi2)$. 由sin,cos的半角公式:
\begin{align*}x_1&=\cos(\frac{\cos^{-1}\rho}2)z_1+\sin(\frac{\cos^{-1}\rho}2)z_2\\
x_2&=\cos(\frac{\cos^{-1}\rho}2)z_1-\sin(\frac{\cos^{-1}\rho}2)z_2\end{align*}令$(z_1,z_2)=(r\cos\theta,r\sin\theta),r>0,\theta\in[0,2\pi)$,由cos的加法公式:
\begin{align*}
x_1\le0&⇔\cos(\frac{\cos^{-1}\rho}2-\theta)\le0⇔\theta\in(\frac{\pi+\cos^{-1}\rho}2,\frac{3\pi+\cos^{-1}\rho}2)
\\x_2\ge0&⇔\cos(\frac{\cos^{-1}\rho}2+\theta)\ge0⇔\theta\in(0,\frac{\pi-\cos^{-1}\rho}2)\cup(\frac{3\pi-\cos^{-1}\rho}2,2\pi)
\\\Pr(x_1\le0,x_2\ge0)
&=\Pr\left(\theta\in(\frac{3\pi-\cos^{-1}\rho}2,\frac{3\pi+\cos^{-1}\rho}2)\right)\\
&=\frac{\cos^{-1}\rho}{2\pi}
\end{align*}但需要证明 $\theta$ 是均匀分布的

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

 楼主| hbghlyj 发表于 2023-6-18 20:29

三元正态分布的象限概率

Geoffrey R. Grimmett, David R. Stirzaker - Probability and Random Processes
§4.10 Distributions arising from the normal distribution
page 119

Control-V.png

27

主题

1010

回帖

1万

积分

积分
12585

显示全部楼层

战巡 发表于 2023-6-19 13:38
搞那么麻烦干啥
\[P(x\le 0, y\ge 0)=\int_{-\infty}^0\int_{0}^{\infty}\frac{1}{2\pi\sqrt{1-\rho^2}}\exp\left[-\frac{1}{2(1-\rho^2)}(x^2-2\rho xy+y^2)\right]dydx\]
极坐标换元$x=r\cos(\theta),y=r\sin(\theta)$
\[原式=\int_{\frac{\pi}{2}}^{\pi}\int_0^{\infty}\frac{r}{2\pi\sqrt{1-\rho^2}}\exp\left[-\frac{r^2}{2(1-\rho^2)}(\cos^2(\theta)-2\rho\cos(\theta)\sin(\theta)+\sin^2(\theta))\right]drd\theta\]
\[=\frac{1}{2\pi\sqrt{1-\rho^2}}\int_{\frac{\pi}{2}}^{\pi}\frac{1-\rho^2}{1-\rho\sin(2\theta)}d\theta\]
\[=\frac{\pi-2\arctan(\frac{\rho}{\sqrt{1-\rho^2}})}{4\pi}=\frac{\arccos(\rho)}{2\pi}\]

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

 楼主| hbghlyj 发表于 2023-6-19 16:37
三元正态分布
exp(-1/2*{x,y,z}.{{1,ρ_3,ρ_2},{ρ_3,1,ρ_1},{ρ_2,ρ_1,1}}.{{x},{y},{z}})/sqrt((2π)^3*det({{1,ρ_3,ρ_2},{ρ_3,1,ρ_1},{ρ_2,ρ_1,1}}))
Untitled.gif
$$\begin{bmatrix}x\\y\\z\end{bmatrix} ={\begin{bmatrix}r\sin θ \,\cos φ \\r\sin θ \,\sin φ \\r\cos θ \end{bmatrix}}$$$dxdydz=r^2\sin\theta\,drdθdφ$
  1. var('r θ φ ρ_1 ρ_2 ρ_3')
  2. x=r*sin(θ)*cos(φ)
  3. y=r*sin(θ)*sin(φ)
  4. z=r*cos(θ)
  5. expr=(r**2*sin(θ)*exp (1/2*(-z*(x*ρ_2+y*ρ_1+z)-y*(x*ρ_3+y+z*ρ_1)-x*(x+y*ρ_3+z*ρ_2)))/(2*π**(3/2)*sqrt (2*(-(ρ_1)**2-(ρ_2)**2+2*ρ_1*ρ_2*ρ_3-(ρ_3)**2+1)))).simplify()
  6. expr.integrate(φ,0,π/2).integrate(θ,0,π/2).integrate(r,0,oo)
复制代码
需要时间来计算太长

手机版|悠闲数学娱乐论坛(第3版)

GMT+8, 2025-3-4 15:55

Powered by Discuz!

× 快速回复 返回顶部 返回列表