MAHALANOBIS
Compute the Mahalanobis Distance on your empirical data set.
Description
The Mahalanobis function measures the distances of the cross-sectional point estimates from its empirical distribution. This is a multi-dimensional generalization tool in statistics. It is unitless, scale-invariant, and accounts for the correlation relationships within the data set.
For a given dataset,, the Mahalanobis distance,, is given by
Syntax
The following describes the function signature for use in Microsoft Excel's formula bar.
Input(s)
Argument | Description |
---|---|
X | Matrix of time series returns (or values). |
mu | Optional. Vector of means to measure the distance from. If the argument is not specified, it defaults to the sample average of the X. |
covariance | Optional. Covariance matrix, specify a covariance matrix to normalize the distances. If the argument is not specified, it defaults to the sample covariance matrix of X. |
Output(s)
Vector of Mahalanobis distance values for the corresponding data, . Vector will have the same length as .
Example
Last updated