The probability density function
for the d
-dimensional normal distribution
and covariance matrix
Σ is given by the formula:
-dimensional column vector
s and Σ is a d
If the covariance matrix is singular, the naive application of this formula will run into problems, as in that case Σ will not be invertible and have a determinant of 0.
The singularity of Σ implies that the normal distribution is flat along one or more directions. The distribution is not really d-dimensional - it's less than d-dimensional. Specifically, the distribution lives in an affine subspace of the d-dimensional space. The rank of Σ gives the dimensionality of that affine subspace.
So the trick to handling singular Σs is this: first check if x is on that affine subspace. If it's not, then the probability density is automatically 0.
If it is, then we reduce the dimensionality of the problem and evaluate the density on the affine subspace (Hint: use the SVD of the covariance matrix).