# 多元正态分布

13 篇文章 4 订阅

$\mathbf{X}=\begin{bmatrix}X_1\\ X_2\\ X_3\\ \vdots \\ X_i\\\vdots \\ X_d\\\end{bmatrix}$  ,其转置为 $\mathbf{X}^T=[X_1,X_2,X_3,...,X_i,...,X_d]^T$

$E[\mathbf{X}]=\boldsymbol{\mu}^T=[\mu_1,\mu_2,\mu_3,...,\mu_i,...,\mu_d]^T$

$\boldsymbol{\sum}=E\{(\mathbf{x}-\boldsymbol{\mu})(\mathbf{x}-\boldsymbol{\mu})^T \}$

$\boldsymbol{\sum}= \begin{bmatrix}E\{(X_1-\mu_1)(X_1-\mu_1)\} &E\{(X_1-\mu_1)(X_2-\mu_2)\} &\cdots &E\{(X_1-\mu_1)(X_j-\mu_j)\} & \cdots &E\{(X_1-\mu_1)(X_d-\mu_d) \}\\ E\{(X_2-\mu_2)(X_1-\mu_1)\}&E\{(X_2-\mu_2)(X_2-\mu_2)\} &\cdots &E\{(X_2-\mu_2)(X_j-\mu_j)\} &\cdots &E\{(X_2-\mu_2)(X_d-\mu_d)\} \\ \vdots&\vdots & \vdots & \vdots &\vdots &\vdots \\ E\{(X_i-\mu_i)(X_1-\mu_1)\}&E\{(X_j-\mu_j)(X_2-\mu_2)\} & \cdots&E\{(X_i-\mu_i)(X_j-\mu_j)\} &\cdots &E\{(X_i-\mu_i)(X_d-\mu_d)\} \\ \vdots&\vdots & \vdots & \vdots &\vdots &\vdots \\ E\{(X_d-\mu_d)(X_1-\mu_1)\} &E\{(X_d-\mu_d)(X_2-\mu_2)\} & \cdots &E\{(X_d-\mu_d)(X_j-\mu_j)\} &\cdots &E\{(X_d-\mu_d)(X_d-\mu_d)\} \end{bmatrix}$

$\boldsymbol{\sum}= \begin{bmatrix}\delta_{11} &\delta_{12} &\cdots &\delta_{1j} & \cdots &\delta_{1d}\\ \delta_{21}&\delta_{22} &\cdots &\delta_{2j} &\cdots &\delta_{2d} \\ \vdots&\vdots & \vdots & \vdots &\vdots &\vdots \\ \delta_{i1}&\delta_{i2} & \cdots&\delta_{ij} &\cdots &\delta_{id} \\ \vdots&\vdots & \vdots & \vdots &\vdots &\vdots \\\delta_{d1} &\delta_{d2} & \cdots &\delta_{dj} &\cdots &\delta_{dd} \end{bmatrix}$

$\boldsymbol{\sum}^{-1}$ 是协方差矩阵的逆，$\left | \boldsymbol{\sum} \right |$ 是协方差矩阵的行列式

$\left | \boldsymbol{\sum} \right |$是非负矩阵，但是我们只考虑正定矩阵的情况

$f(\mathbf{X})=\frac{1}{(2\pi)^{\frac{d}{2}}\left | \boldsymbol{\sum}\right |^{\frac{1}{2}}}e^{-\frac{1}{2}(\mathbf{X}-\boldsymbol{\mu})^T\boldsymbol{\sum}^{-1}(\mathbf{X}-\boldsymbol{\mu})}$

$\left |\boldsymbol{\sum} \right |=\delta_{11}*\delta_{22}-\delta_{12}*\delta_{21}=\delta_{11}*\delta_{22}-\delta_{12}^2$

$A=\begin{vmatrix}A11 &A12 &A13 \\ A21&A22 &A23 \\ A31 &A32 &A33 \end{vmatrix}$

$A^*=\begin{pmatrix}(-1)^{(1+1)}\begin{vmatrix} &A22 &A23 \\ &A32 &A33 \end{vmatrix} &(-1)^{(1+2)}\begin{vmatrix} &A21 &A23 \\ &A31 &A33 \end{vmatrix} &(-1)^{(1+3)}\begin{vmatrix} &A21 &A22 \\ &A31 &A32 \end{vmatrix} \\ (-1)^{(2+1)}\begin{vmatrix} &A12 &A13 \\ &A32 &A33 \end{vmatrix} & (-1)^{(2+2)}\begin{vmatrix} &A11 &A13 \\ &A31 &A33 \end{vmatrix} & (-1)^{(2+3)}\begin{vmatrix} &A11 &A12 \\ &A31 &A32 \end{vmatrix} \\ (-1)^{(3+1)}\begin{vmatrix} &A12 &A13 \\ &A22 &A23 \end{vmatrix} & (-1)^{(3+2)}\begin{vmatrix} &A11 &A13 \\ &A21 &A23 \end{vmatrix} &(-1)^{(3+3)}\begin{vmatrix} &A11 &A12 \\ &A21 &A22 \end{vmatrix} \end{pmatrix}^T$

$A^{-1}=\frac{A^*}{\left |A \right |}$

$\boldsymbol{\sum}^{-1}=\frac{\boldsymbol{\sum}^*}{\left|\boldsymbol{\sum}\right |}$

$\boldsymbol{\sum}^*=\begin{pmatrix}(-1)^{1+1}\delta_{22} &(-1)^{1+2}\delta_{21} \\ (-1)^{2+1}\delta_{12} &(-1)^{2+2}\delta_{11} \end{pmatrix}^T=\begin{pmatrix}\delta_{22} &-\delta_{21} \\ -\delta_{12} &\delta_{11} \end{pmatrix}^T=\begin{pmatrix}\delta_{22} &-\delta_{12} \\ -\delta_{21} &\delta_{11} \end{pmatrix}$

$\boldsymbol{\sum}^{-1}=\frac{1}{(\delta_{11}*\delta_{22}-\delta_{12}^2)}\begin{pmatrix}\delta_{22} &-\delta_{12} \\ -\delta_{21} &\delta_{11} \end{pmatrix}$

$(\mathbf{x}-\boldsymbol{\mu})^T \boldsymbol{{\sum}^{-1}}(\mathbf{x}-\boldsymbol{\mu})=\begin{bmatrix} X_1-\mu_1 , X_2-\mu_2\\ \end{bmatrix}\left (\frac{1}{\delta_{11}*\delta_{22}-\delta_{12}^2}\begin{pmatrix}\delta_{22} &-\delta_{12} \\ -\delta_{21} &\delta_{11} \end{pmatrix} \right )\begin{bmatrix} X_1-\mu_1 \\ X_2-\mu_2 \end{bmatrix}$

$=\frac{1}{\delta_{11}*\delta_{22}-\delta_{12}^2}\begin{bmatrix}X_1-\mu_1 , X_2-\mu_2\\ \end{bmatrix}\begin{pmatrix}\delta_{22} &-\delta_{12} \\ -\delta_{21} &\delta_{11} \end{pmatrix} \begin{bmatrix} X_1-\mu_1 \\ X_2-\mu_2 \end{bmatrix}$

$=\frac{1}{ \delta_{11}* \delta_{22}-\delta_{12}^2}\begin{bmatrix} (X_1-\mu_1) \delta_{22} + (X_2-\mu_2)(-\delta_{21})+(X_1-\mu_1)(-\delta_{12})+(X_2-\mu_2)(\delta_{11}) \end{bmatrix} \begin{bmatrix} X_1-\mu_1 \\ X_2-\mu_2 \end {bmatrix}$

$=\frac{1}{\delta_{11}*\delta_{22}-\delta_{12}^2} \begin{bmatrix} (X_1-\mu_1)\delta_{22}+(X_2-\mu_2)(-\delta_{21})+(X_1-\mu_1)(-\delta_{12})+(X_2-\mu_2)(\delta_{11})\end{bmatrix}\begin{bmatrix} X_1-\mu_1 \\ X_2-\mu_2 \end{bmatrix}$

$=\frac{1}{\delta_{11}*\delta_{22}-\delta_{12}^2}\begin{bmatrix} ((X_1-\mu_1)\delta_{22}+(X_2-\mu_2)(-\delta_{21}))(X_1-\mu_1)+((X_1-\mu_1)\(-\delta_{12})+(X_2-\mu_2)(\delta_{11}))( X_2-\mu_2 )\end{bmatrix}$

$=\frac{1}{\delta_{11}*\delta_{22}-\delta_{12}^2}\begin{bmatrix} ((X_1-\mu_1)\delta_{22}+(X_2-\mu_2)(-\delta_{21}))(X_1-\mu_1)+((X_1-\mu_1)\(-\delta_{12})+(X_2-\mu_2)\delta_{11})( X_2-\mu_2 )\end{bmatrix}$

$=\frac{1}{\delta_{11}*\delta_{22}-\delta_{12}^2}\begin{bmatrix} (X_1-\mu_1)^2\delta_{22}-(X_1-\mu_1)(X_2-\mu_2)\delta_{21}-(X_1-\mu_1)( X_2-\mu_2)\delta_{12}+(X_2-\mu_2)^2\delta_{11}\end{bmatrix}$

$=\frac{1}{\delta_{11}*\delta_{22}-\delta_{12}^2}\begin{bmatrix} (X_1-\mu_1)^2\delta_{22}-2(X_1-\mu_1)(X_2-\mu_2)\delta_{21}+(X_2-\mu_2)^2\delta_{11}\end{bmatrix}$

$f(X_1,X_2)=\frac{1}{2\pi \sqrt{\delta_{11}*\delta_{22}-\delta_{12}^2}}e^{-\frac{1}{2(\delta_{11}*\delta_{22}-\delta_{12}^2)}\begin{bmatrix}(X_1-\mu_1)^2\delta_{22}-2(X_1-\mu_1)(X_2-\mu_2)\delta_{21}+(X_2-\mu_2)^2\delta_{11}\end{bmatrix}}$

$\rho_{X1,X2}=\frac{Cov(X_1,X_2)}{\delta_{X1}\delta_{X2}}$

<b

$\delta_{X1}=\sqrt{E[(X1-\mu_1)(X1-\mu1)]}$

$=\sqrt{E[(X1-E[X1])(X1-E[X1])]}=\sqrt{E[E[X1]^2-2E[X]X1+E[X]^2]]}$
$=\sqrt{E[X1]^2-2E[X]^2+E[X]^2]}==\sqrt{E[X1]^2-E[X1]^2}$

同样

$\delta_{X2}=\sqrt{E[X2]^2-E[X2]^2}$

$\rho_{X1,X2}=\frac{\delta_{12}}{\sqrt{\delta_{11}}\sqrt{\delta_{22}}}$

$f(X_1,X_2)=\frac{1}{2\pi \sqrt{\delta_{11}*\delta_{22}-(\rho_{X1X2}\sqrt{\delta_{11}}\sqrt{\delta_{22}})^2}}e^{-\frac{1}{2\left(\delta_{11}*\delta_{22}-\(\rho_{X1X2}\sqrt{\delta_{11}}\sqrt{\delta_{22}}\right )^2)}\begin{bmatrix}(X_1-\mu_1)^2\delta_{22}-2(X_1-\mu_1)(X_2-\mu_2)(\rho_{X1X2}\sqrt{\delta_{11}}\sqrt{\delta_{22}})+(X_2-\mu_2)^2\delta_{11}\end{bmatrix}}$

$f(X_1,X_2)=\frac{1}{2\pi \sqrt{\delta_{11}*\delta_{22}(1-\rho_{X1X2}^2)}}e^{-\frac{1}{2\left(\delta_{11}*\delta_{22}(1-\rho_{X1X2}^2)\right)}\begin{bmatrix}(X_1-\mu_1)^2\delta_{22}-2(X_1-\mu_1)(X_2-\mu_2)(\rho_{X1X2}\sqrt{\delta_{11}}\sqrt{\delta_{22}})+(X_2-\mu_2)^2\delta_{11}\end{bmatrix}}$    继续整理

$f(X_1,X_2)=\frac{1}{2\pi \sqrt{\delta_{11}*\delta_{22}(1-\rho_{X1X2}^2)}}e^{-\frac{1}{2\left((1-\rho_{X1X2}^2)\right)}\begin{bmatrix}\frac{(X_1-\mu_1)^2\delta_{22}}{\delta_{11}*\delta_{22}}-\frac{2(X_1-\mu_1)(X_2-\mu_2)(\rho_{X1X2}\sqrt{\delta_{11}}\sqrt{\delta_{22}})}{\delta_{11}*\delta_{22}}+\frac{(X_2-\mu_2)^2\delta_{11}}{\delta_{11}*\delta_{22}}\end{bmatrix}}$    继续整理

$f(X_1,X_2)=\frac{1}{2\pi \sqrt{\delta_{11}*\delta_{22}(1-\rho_{X1X2}^2)}}e^{-\frac{1}{2\left((1-\rho_{X1X2}^2)\right)}\begin{bmatrix}\frac{(X_1-\mu_1)^2}{\delta_{11}}-\frac{2\rho_{X1X2}(X_1-\mu_1)(X_2-\mu_2)}{\sqrt{\delta_{11}}\sqrt{\delta_{22}}}+\frac{(X_2-\mu_2)^2}{\delta_{22}}\end{bmatrix}}$

$f(X_1)=\frac{1}{\sqrt{2\pi\delta_{11}}}e^{-\frac{(X_1-\mu_1)^2}{\delta_{11}}}$

$f(X_2)=\frac{1}{\sqrt{2\pi\delta_{22}}}e^{-\frac{(X_2-\mu_2)^2}{\delta_{22}}}$

$f_{X1|X2}(X_1|X_2)=\frac{f(X_1,X_2)}{f_{X_2}(X_2)}$

$=\frac{\sqrt{2\pi\delta_{22}}}{2\pi \sqrt{\delta_{11}*\delta_{22}(1-\rho_{X1X2}^2)}}e^{-\frac{1}{2\left((1-\rho_{X1X2}^2)\right)}\begin{bmatrix}\frac{(X_1-\mu_1)^2}{\delta_{11}}-\frac{2\rho_{X1X2}(X_1-\mu_1)(X_2-\mu_2)}{\sqrt{\delta_{11}}\sqrt{\delta_{22}}}+\frac{(X_2-\mu_2)^2}{\delta_{22}}-\frac{(1-\rho_{X_1X_2}^2)(X_2-\mu_2)^2}{\delta_{22}}\end{bmatrix}}$

$=\frac{1}{ \sqrt{2\pi\delta_{11}(1-\rho_{X1X2}^2)}}e^{-\frac{1}{2\left((1-\rho_{X1X2}^2)\right)}\begin{bmatrix}\frac{(X_1-\mu_1)^2}{\delta_{11}}-\frac{2\rho_{X1X2}(X_1-\mu_1)(X_2-\mu_2)}{\sqrt{\delta_{11}}\sqrt{\delta_{22}}}+\frac{\rho_{X_1X_2}^2(X_2-\mu_2)^2}{\delta_{22}}\end{bmatrix}}$

$=\frac{1}{ \sqrt{2\pi\delta_{11}(1-\rho_{X1X2}^2)}}e^{-\frac{1}{2\left((1-\rho_{X1X2}^2)\right)}\begin{bmatrix}\frac{(X_1-\mu_1)^2}{\delta_{11}}-\frac{2\rho_{X1X2}(X_1-\mu_1)(X_2-\mu_2)}{\sqrt{\delta_{11}}\sqrt{\delta_{22}}}+\frac{\rho_{X_1X_2}^2(X_2-\mu_2)^2}{\delta_{22}}\end{bmatrix}}\\=\frac{1}{ \sqrt{2\pi\delta_{11}(1-\rho_{X1X2}^2)}}e^{-\frac{1}{2\left((1-\rho_{X1X2}^2)\right)}[\frac{X_1-\mu1}{\sqrt{\delta_{11}}}-\frac{\rho_{X_1X_2}(X_2-\mu_2)}{\sqrt{\delta_{22}}}]^2}\\=\frac{1}{ \sqrt{2\pi\delta_{11}(1-\rho_{X1X2}^2)}}e^{-\frac{1}{2\left((1-\rho_{X1X2}^2)\right)}[\frac{(X_1-\mu1)\sqrt{\delta_{22}}}{\sqrt{\delta_{11}}\sqrt{\delta_{22}}}-\frac{\rho_{X_1X_2}(X_2-\mu_2)\sqrt{\delta_{11}}}{\sqrt{\delta_{22}}\sqrt{\delta_{11}}}]^2}\\=\frac{1}{ \sqrt{2\pi\delta_{11}(1-\rho_{X1X2}^2)}}e^{-\frac{1}{2\left((1-\rho_{X1X2}^2)\right)}[\frac{(X_1-\mu1)\sqrt{\delta_{22}}-\rho_{X_1X_2}(X_2-\mu_2)\sqrt{\delta_{11}}}{\sqrt{\delta_{22}}\sqrt{\delta_{11}}}]^2}$

$=\frac{1}{ \sqrt{2\pi\delta_{11}(1-\rho_{X1X2}^2)}}e^{-\frac{1}{2\left((1-\rho_{X1X2}^2)\right)}[\frac{(X_1-\mu1)\sqrt{\delta_{22}}-\rho_{X_1X_2}(X_2-\mu_2)\sqrt{\delta_{11}}}{\sqrt{\delta_{22}}\sqrt{\delta_{11}}}]^2}\\=\frac{1}{ \sqrt{2\pi\delta_{11}(1-\rho_{X1X2}^2)}}e^{-\frac{1}{2\left((1-\rho_{X1X2}^2)\right)}[\frac{(X_1-\mu1)-\rho_{X_1X_2}(X_2-\mu_2)\frac{\sqrt{\delta_{11}}}{\sqrt{\delta_{22}}}}{\sqrt{\delta_{11}}}]^2}\\=\frac{1}{ \sqrt{2\pi\delta_{11}(1-\rho_{X1X2}^2)}}e^{-\frac{1}{2\left((1-\rho_{X1X2}^2)\right)}[\frac{X_1-(\mu1+\rho_{X_1X_2}(X_2-\mu_2))\frac{\sqrt{\delta_{11}}}{\sqrt{\delta_{22}}}}{\sqrt{\delta_{11}}}]^2}\\=\frac{1}{ \sqrt{2\pi\delta_{11}(1-\rho_{X1X2}^2)}}e^{-[\frac{\left(X_1-(\mu1+\rho_{X_1X_2}(X_2-\mu_2))\frac{\sqrt{\delta_{11}}}{\sqrt{\delta_{22}}}\right )^2}{2\left((1-\rho_{X1X2}^2)\right)\delta_{11}}]}$

$f_{X2|X1}(X_2|X_1)=\frac{f(X_1,X_2)}{f_{X_1}(X_1)}$

$=\frac{\sqrt{2\pi\delta_{11}}}{2\pi \sqrt{\delta_{11}*\delta_{22}(1-\rho_{X1X2}^2)}}e^{-\frac{1}{2\left((1-\rho_{X1X2}^2)\right)}\begin{bmatrix}\frac{\rho_{X1X2}^2(X_1-\mu_1)^2}{\delta_{11}}-\frac{2\rho_{X1X2}(X_1-\mu_1)(X_2-\mu_2)}{\sqrt{\delta_{11}}\sqrt{\delta_{22}}}+\frac{(X_2-\mu_2)^2}{\delta_{22}}\end{bmatrix}}\\=\frac{\sqrt{2\pi\delta_{11}}}{2\pi \sqrt{\delta_{11}*\delta_{22}(1-\rho_{X1X2}^2)}}e^{-\frac{1}{2\left((1-\rho_{X1X2}^2)\right)}\begin{bmatrix}\frac{X_2-\mu_2}{\sqrt{\delta_{22}}}-\frac{\rho_{X1X2}(X_1-\mu_1)}{\sqrt{\delta_{11}}}\end{bmatrix}^2}\\$

$=\frac{\sqrt{2\pi\delta_{11}}}{2\pi \sqrt{\delta_{11}*\delta_{22}(1-\rho_{X1X2}^2)}}e^{-\frac{1}{2\left((1-\rho_{X1X2}^2)\right)}\begin{bmatrix}\frac{X_2-\mu_2}{\sqrt{\delta_{22}}}-\frac{\rho_{X1X2}(X_1-\mu_1)}{\sqrt{\delta_{11}}}\end{bmatrix}^2}\\=\frac{\sqrt{2\pi\delta_{11}}}{2\pi \sqrt{\delta_{11}*\delta_{22}(1-\rho_{X1X2}^2)}}e^{-\frac{1}{2\left((1-\rho_{X1X2}^2)\right)}\begin{bmatrix}\frac{(X_2-\mu_2)\sqrt{\delta_{11}}}{\sqrt{\delta_{22}}\sqrt{\delta_{11}}}-\frac{\rho_{X1X2}(X_1-\mu_1)\sqrt{\delta_{22}}}{\sqrt{\delta_{11}}\sqrt{\delta_{22}}}\end{bmatrix}^2}\\=\frac{\sqrt{2\pi\delta_{11}}}{2\pi \sqrt{\delta_{11}*\delta_{22}(1-\rho_{X1X2}^2)}}e^{-\frac{1}{2\left((1-\rho_{X1X2}^2)\right)}\begin{bmatrix}\frac{(X_2-\mu_2)\sqrt{\delta_{11}}-(\rho_{X1X2}(X_1-\mu_1)\sqrt{\delta_{22}})}{\sqrt{\delta_{22}}\sqrt{\delta_{11}}}\end{bmatrix}^2}$

$=\frac{\sqrt{2\pi\delta_{11}}}{2\pi \sqrt{\delta_{11}*\delta_{22}(1-\rho_{X1X2}^2)}}e^{-\frac{1}{2\left((1-\rho_{X1X2}^2)\right)}\begin{bmatrix}\frac{(X_2-\mu_2)\sqrt{\delta_{11}}-(\rho_{X1X2}(X_1-\mu_1)\sqrt{\delta_{22}})}{\sqrt{\delta_{22}}\sqrt{\delta_{11}}}\end{bmatrix}^2}\\=\frac{1}{ \sqrt{2\pi\delta_{22}(1-\rho_{X1X2}^2)}}e^{-\frac{1}{2\left((1-\rho_{X1X2}^2)\right)}\begin{bmatrix}\frac{(X_2-\mu_2)-(\rho_{X1X2}(X_1-\mu_1)\frac{\sqrt{\delta_{22}}}{\sqrt{\delta_{11}}})}{\sqrt{\delta_{22}}}\end{bmatrix}^2}\\=\frac{1}{ \sqrt{2\pi\delta_{22}(1-\rho_{X1X2}^2)}}e^{-\frac{\left((X_2-\mu_2)-(\rho_{X1X2}(X_1-\mu_1)\frac{\sqrt{\delta_{22}}}{\sqrt{\delta_{11}}})\right )}{2\left((1-\rho_{X1X2}^2)\right)\delta_{22}}^2}\\=\frac{1}{ \sqrt{2\pi\delta_{22}(1-\rho_{X1X2}^2)}}e^{-\frac{\left(X_2-\left(\mu_2+(\rho_{X1X2}(X_1-\mu_1)\right)\frac{\sqrt{\delta_{22}}}{\sqrt{\delta_{11}}})\right )}{2\left((1-\rho_{X1X2}^2)\right)\delta_{22}}^2}$

$f_{X1|X2}(X_1|X_2)=\frac{1}{ \sqrt{2\pi\delta_{11}(1-\rho_{X1X2}^2)}}e^{-\frac{\left(X_1-(\mu1+\rho_{X_1X_2}(X_2-\mu_2))\frac{\sqrt{\delta_{11}}}{\sqrt{\delta_{22}}}\right )^2}{2\left((1-\rho_{X1X2}^2)\right)\delta_{11}}}$

$f_{X2|X1}(X_2|X_1)=\frac{1}{ \sqrt{2\pi\delta_{22}(1-\rho_{X1X2}^2)}}e^{-\frac{\left(X_2-\left(\mu_2+(\rho_{X1X2}(X_1-\mu_1)\right)\frac{\sqrt{\delta_{22}}}{\sqrt{\delta_{11}}})\right )}{2\left((1-\rho_{X1X2}^2)\right)\delta_{22}}^2}$

• 18
点赞
• 29
收藏
• 打赏
• 6
评论
11-20
05-11
03-12 7587
06-19 1万+
05-04 5465
10-29 5984
12-12 1953
04-11 8370
10-25 3278
08-11 2万+
05-06 9829
11-24 2万+
10-10 3942

### “相关推荐”对你有帮助么？

• 非常没帮助
• 没帮助
• 一般
• 有帮助
• 非常有帮助

¥2 ¥4 ¥6 ¥10 ¥20

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