Multivariate Gaussians are often presented as intimidating objects.
The density function looks kind of scary:
f(x)=(2π)ndet(Σ)1exp(−21(x−μ)⊤Σ−1(x−μ)).
But there’s a clearer perspective:
any multivariate Gaussian can be disentangled into independent 1-dimensional Gaussians.
More precisely, there’s always a basis in which a multivariate Gaussian has independent coordinates.
This basis is given by the eigenbasis of the covariance matrix, and the eigenvalues correspond to the variances along each axis.
Random vectors
Let x=(x1,…,xk)⊤∈Rk be a random vector.
The expectation and covariance of x can be written as follows:
Now we can define the multivariate Gaussian distribution.
Let g=(g1,…,gk)⊤∈Rk be a vector of i.i.d. standard normal random variables.
Given a matrix A∈Rn×k, the covariance of Ag is ACov(g)A⊤=AIA⊤=AA⊤.
The distribution of Ag is called a multivariate normal distribution with covariance Σ=AA⊤, denoted N(0,Σ).
Since Σ is symmetric positive semi-definite, we can write its eigendecomposition as
Σ=QΛQ⊤,
where Q∈Rn×n is an orthogonal matrix, and Λ∈Rn×n is a diagonal matrix with eigenvalues λ1,…,λn on the diagonal.
Now we can take
A=QΛ1/2orA=QΛ1/2Q⊤
so that AA⊤=QΛ1/2Λ1/2Q⊤=QΛQ⊤=Σ.
For example, take x=QΛ1/2g for g∼N(0,I).
Then x∼N(0,Σ).
Visualizing the transformation x=QΛ1/2g
1. Start: g ~ N(0, I)
i.i.d. standard normals
→
2. Scale: Λ1/2g
stretch by λ₁1/2, λ₂1/2
→
3. Rotate: QΛ1/2g
align to q₁, q₂
Disentangling the multivariate Gaussian
Now label q1,…,qn as the columns of Q.
Expanding x=QΛ1/2g:
x=λ1g1q1+…+λngnqn=i=1∑nλigiqi.
In the orthonormal basis q1,…,qn, the vector x has coordinates (λ1g1,…,λngn).
These coordinates are independent 1-dimensional Gaussian random variables, with variances λ1,…,λn.
If Σ is singular (i.e. detΣ=0), some eigenvalues will be zero, say λk+1=…=λn=0.
The random vector is then concentrated on the subspace spanned by q1,…,qk, and has no density on Rn.
On this subspace, x has density (in the eigenbasis coordinates):
f(x1,…,xk)=i=1∏k2πλi1exp(−2λixi2).
References
References are listed in alphabetical order.
Lecture 4: Multivariate normal distribution and multivariate CLT[link] Dmitry Panchenko. 2006.