[Math] Is the covariance matrix of multivariate normal distribution has to be positive definite

covariancenormal distribution

Let $\Sigma $ be the covariance matrix of a multivariate normal
distribution.

Thereotically, I guess it does not have to to strictly positive definition,
i.e., $\det (\Sigma )=0$ is possible.

In this case, the density function does not exist, how can I generate random
numbers(vectors) from such multivariate normal distribution?

Best Answer

A multivariate normal distribution has the density function:

$$f(X) = \frac{1}{\sqrt{(2\pi)^n |\Sigma|}} \exp\{\frac{-1}{2}X \Sigma^{-1} X^T\}$$

and the covariance should be positive definite. So if you need multivariate normal samples you've got to generate them using a valid (meaning symmetric positive definite) covariance matrix. But then, when you generated the random vectors, the calculated sample covariance can be not positive definite. As an example, consider a covariance matrix of rank 10. If you generate less than 10 sample vectors (i.e. 1 to 9 samples), and calculate their sample covariance, the calculated covariance matrix is not full rank, and its determinant becomes 0, although the generative model has a valid positive definite covariance.

Related Question