Computing the Mahalanobis distance is necessary to estimate the covariance matrix.