Peter Ralph
1 February 2021 – Advanced Biological Statistics
multivariate Gaussian
or MVN
If \(X\) is random vector that has a multivariate Normal distribution, we say \[\begin{aligned} X = (X_1, \ldots, X_k) \sim \MVN(\mu, \Sigma) . \end{aligned}\]
The parameters are the mean vector \(\mu\) and covariance matrix \(\Sigma\): \[\begin{aligned} \E[X_i] = \mu_i \end{aligned}\] and \[\begin{aligned} \cov[X_i, X_j] = \Sigma_{i,j} . \end{aligned}\]
Properties:
\(X_i \sim \Normal(\mu_i, \sqrt{\Sigma_{i,i}})\)
If \(\Sigma_{i,j} = 0\) then \(X_i\) and \(X_j\) are independent.
Level curves of the probability density function are ellipses.
Let’s say that \(X \sim \Normal(0, 1)\) and \[\begin{aligned} Y &= \beta X + \epsilon \\ \epsilon &\sim \Normal(0, \sigma) . \end{aligned}\]
Then \(Y\) also has a Normal distribution, and \[\begin{aligned} \var[X] &= 1, \\ \var[Y] &= \beta^2 + \sigma^2 \qquad \text{and} \\ \cov[X, Y] &= \beta, \end{aligned}\]
so \[\begin{aligned} (X, Y) \sim \MVN\left( \begin{bmatrix} 0 \\ 0 \end{bmatrix} \begin{bmatrix} 1 & \beta \\ \beta & \beta^2 + \sigma^2 \end{bmatrix} \right) . \end{aligned}\]
Let’s have a look:
Let’s have a look:
Use mvtnorm::rmvnorm( )
to simulate 10,000 random draws from \[ (X_1, X_2, X_3) \sim \MVN\left(0, \Sigma\right) .\] This will give you a \(10^4 \times 3\) matrix. First make histograms of each variable. Then look at a pairs( )
plot.