0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

正規分布の条件付き期待値と分散

Last updated at Posted at 2023-07-22

確率密度関数

一般式:

f(\mathbf{X}) = \frac{1}{\sqrt{(2\pi)^k |\Sigma|}} \exp\left(-\frac{1}{2} (\mathbf{X} - \boldsymbol{\mu})^T \Sigma^{-1} (\mathbf{X} - \boldsymbol{\mu})\right)  

2変量の場合:

f(x, y) = \frac{1}{2\pi\sigma_X\sigma_Y\sqrt{1-\rho^2}} \exp\left(-\frac{1}{2}\frac{1}{1-\rho^2} \left[\left(\frac{x-\mu_X}{\sigma_X}\right)^2 - 2\rho\frac{x-\mu_X}{\sigma_X}\frac{y-\mu_Y}{\sigma_Y} + \left(\frac{y-\mu_Y}{\sigma_Y}\right)^2\right]\right)

1変量の場合:

f(x) = \frac{1}{\sqrt{2\pi\sigma^2}} \exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right)

条件付き期待値と分散(1変数だけの条件のとき)

以下のk変数の多変量正規分布があるとする

\mathbf{X} = \begin{pmatrix}
X_1 \\
X_2 \\
\vdots \\
X_k
\end{pmatrix} \sim N\left(
\begin{pmatrix}
\mu_1 \\
\mu_2 \\
\vdots \\
\mu_k
\end{pmatrix}
,
\begin{pmatrix}
\sigma_1^2 & \rho_{12}\sigma_1\sigma_2 & \cdots & \rho_{1k}\sigma_1\sigma_k \\
\rho_{21}\sigma_2\sigma_1 & \sigma_2^2 & \cdots & \rho_{2k}\sigma_2\sigma_k \\
\vdots & \vdots & \ddots & \vdots \\
\rho_{k1}\sigma_k\sigma_1 & \rho_{k2}\sigma_k\sigma_2 & \cdots & \sigma_k^2
\end{pmatrix}
\right)

$X_1$=$x_1$の条件のもとで、$X_2, X_3, \ldots, X_k$の条件つき期待値と分散はそれぞれ、

\begin{align*}
E(X_i|X_1=x_1) &= \mu_i + \sum_{j=2}^{k} \rho_{ij} \sigma_i \frac{\left(x_1 - \mu_1\right)}{\sigma_1} \quad \text{for } i = 2, 3, \ldots, k\\
V(X_i|X_1=x_1) &= \sigma_i^2(1 - \rho_{i1}^2) \quad \text{for } i = 2, 3, \ldots, k
\end{align*}

特に2変量正規分布において、$X=x$が与えられている時の$Y$の条件付き期待値と分散は、

\begin{align*}
E(Y|X = x) &= \mu_Y + \frac{\sigma_{XY}}{\sigma_X^{2}}\left(x - \mu_X\right) \\
&= \mu_Y + \rho\sigma_Y\frac{x - \mu_X}{\sigma_X}\\
V\left(Y|X=x\right) &= \sigma_Y^2(1 - \rho^2) \\
&=\sigma_Y^2-\frac{\sigma_{XY}^2}{\sigma_X^2}
\end{align*}

と表される。

条件付き期待値と分散(多変数の条件がついている時)

説明のため、

\mathbf{X} = \begin{pmatrix}
X_1 \\
X_2 \\
\vdots \\
X_k
\end{pmatrix} \sim N\left(
\begin{pmatrix}
\mu_1 \\
\mu_2 \\
\vdots \\
\mu_k
\end{pmatrix}
,
\begin{pmatrix}
\sigma_1^2 & \rho_{12}\sigma_1\sigma_2 & \cdots & \rho_{1k}\sigma_1\sigma_k \\
\rho_{21}\sigma_2\sigma_1 & \sigma_2^2 & \cdots & \rho_{2k}\sigma_2\sigma_k \\
\vdots & \vdots & \ddots & \vdots \\
\rho_{k1}\sigma_k\sigma_1 & \rho_{k2}\sigma_k\sigma_2 & \cdots & \sigma_k^2
\end{pmatrix}
\right)

\mathbf{X} = \begin{pmatrix}
\mathbf{X_1} \\
\mathbf{X_2} 
\end{pmatrix} \sim N\left(
\begin{pmatrix}
\boldsymbol{\mu_1} \\
\boldsymbol{\mu_2} 
\end{pmatrix}
,
\begin{pmatrix}
\Sigma_{11} & \Sigma_{12}  \\
\Sigma_{21} & \Sigma_{22} 
\end{pmatrix}
\right)

と書き換える。$\mathbf{X_2}$が与えられた時の$\mathbf{X_1}$の分布の条件付き期待値と分散共分散行列は、

\begin{align*}
E(\mathbf{X_1}|\mathbf{X_2}=\boldsymbol{x_2}) &= \boldsymbol{\mu_1}+\Sigma_{12} \Sigma_{22}^{-1}\left(\mathbf{X_2}-\boldsymbol{\mu_2}\right) \\
\Sigma_{11|2} &= \Sigma_{11}-\Sigma_{12}\Sigma_{22}^{-1}\Sigma_{22}
\end{align*}

と表される。2変量正規分布の条件付き期待値と分散にそれぞれ対応づけて覚える。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?