Error Messages/41279
Error text
Array is not positive definite in system function Decompose.
Cause
An square matrix, M, is positive definite when xT M x > 0 for every non-zero real vector x. A Cholesky decomposition exists when a matrix is symmetric (or more generally, Hermitian) and positive-definite. When the matrix is not positive definite, an error is issued and the Cholesky decomposition cannot be computed by the function Decompose.
You may encounter this error while using the Gaussian function, which is a UDF found in the "multi-variate distributions library". This is because the definition of Gaussian applies the Decompose function to the supplied co-variance matrix. If your co-variance matrix is not positive-definite, this error will occur.
What would it mean for a covariance matrix to not be positive definite? One intuitive way to think about this is that when the matrix is not positive definite, it means that the specified set of co-variances cannot be simultaneously realized (they conflict with each other). One example would be this extreme covariance matrix:
1 1 1 1 1 -1 1 -1 1
This covariance matrix says that x1
is perfectly correlated with x2
and with x3
, yet x2
and x3
are perfectly inversely correlated. That is clearly not possible, hence this would not be positive definite. We'd get the same sort of thing with strong (but not perfect) covariances such as:
1 .9 .9 .9 1 -.9 .9 -.9 1
See Also
- Decompose
- Cholesky decomposition on Wikipedia
- Positive-definite matrix on Wikipedia
- Covariance
- User-Defined Function
- Gaussian
Enable comment auto-refresher