乱数ライブラリー

Multivariate normal distribution

The probability density function of the multivariate normal distribution with average $\mu$ and variance-covariance matrix $\sum$ is as follows,

$f\left(z_1,z_2,\ldots ,z_p\right)=\frac{1}{(\sqrt{2 \pi })^p \sqrt{\left| \Sigma \right| }}exp\left(-\frac{1}{2}\left(z-\mu\right)'\Sigma^{-1}\left(z-\mu\right) \right)$


Variance-covariance matrix and the average is assumed to be given as follows,
$\mu =(\mu _1  \mu _2  \ldots  \mu _p)$

$\Sigma =\left(
\begin{array}{ccc}
\sigma _{11} & \cdots & \sigma _{1 p} \\
\vdots & \ddots & \vdots \\
\sigma _{1 p} & \cdots & \sigma _{p p} \\
\end{array}
\right)$




Since the variance-covariance matrix $\sum$ is positive definite, it can be decomposed into the lower and upper triangular matrices as follows by Cholesky decomposition.

$\Sigma =A A'$


However, $A'$is the transpose matrix of $A$, the lower triangular matrix $A$ has the following.

$A=\left(
\begin{array}{cccc}
a_{11} & 0 & \cdots & 0 \\
a_{21} & a_{22} & \cdots & 0 \\
\vdots & \vdots & \ddots & \vdots \\
a_{1 p} & a_{2 p} & \cdots & a_{\text{pp}} \\
\end{array}
\right)$






The random numbers $Y_1, Y_2,\cdots Y_p$ according to p-dimensional normal distribution with mean $\mu$ and variance-covariance matrix $\sum$ are created in the following manner from mutually independent standard normal random numbers $Z_1, Z_2,\cdots ,Z_p$.

$Y_1=\mu _1+a_{11} Z_1$

$Y_2=\mu _2+a_{21} Z_1+a_{22} Z_2$

    $:$

$Y_p=\mu _p+a_{p 1} Z_1+a_{p 2} Z_2 +\cdots+a_{p p} Z_p$



Reference:
  • M.Fushimi, Random number, UP Sensho Applied Mathematics, University of Tokyo Press, 1989



Back to this TOP