Multivariate distribution · also called multivariate Gaussian
Multivariate normal distribution
Several normal quantities with correlations between them, fixed by a mean vector and a covariance matrix : heights of parents and children, returns on a portfolio of assets, the latent space of a VAE, the prior in a Gaussian process. Every marginal and every conditional is again normal. The plot shows two dimensions with standard deviations and correlation .
Joint density of (X₁, X₂)
E[X₁] = 0 · E[X₂] = 0 · Var X₁ = 1 · Var X₂ = 1 · Cov = 0.6 · corr = 0.6
Formulas
| Parameters |
|
|---|---|
| Support | |
| CDF | |
| Mean | |
| Variance | |
| Mode | |
| MGF | |
| Entropy |
Conditioning in two dimensions: is normal with mean and variance .
Worked example
Standardized test scores in two subjects are bivariate normal with means 0, standard deviations 1 and correlation 0.6. A student scores 2 in the first. What is the probability they score above 2 in the second?
is normal with mean and standard deviation , so Regression to the mean: a top score in one subject predicts a less extreme score in the other. answer checked by code
How it relates to others
- Special case→ Normal: Each coordinate of a multivariate normal is normal, , and so is any linear combination . checked by code
- Limit← Multivariate t: As , the multivariate with location and shape tends to Normal(). checked by code
- Transformation→ Wishart: If are independent Normal() vectors, the scatter matrix is Wishart().
- Conjugate prior← Wishart: A Wishart() prior on the precision of a multivariate normal with known mean , and observations , give a Wishart() posterior, where . checked by code
- Conjugate prior← Inverse Wishart: An Inverse Wishart() prior on the covariance of a multivariate normal with known mean , and observations , give an Inverse Wishart() posterior, where . checked by code
All the relationships, as a diagram →
In Python
from scipy import stats
import numpy as np
X = stats.multivariate_normal(mean=[0, 0], cov=[[1, 0.6], [0.6, 1]])
X.pdf([0.5, -0.5]) # density here: 0.1065
X.mean, X.cov
X.rvs(size=5, random_state=0)
rng = np.random.default_rng(0)
rng.multivariate_normal(mean=[0, 0], cov=[[1, 0.6], [0.6, 1]], size=5)Choosing between this and its neighbours? Which distribution for measurements and errors? · Which prior distribution should I use?