1-1hit |
The numerical error of a sample Mahalanobis distance (T2=y'S-1y) with sample covariance matrix S is investigated. It is found that in order to suppress the numerical error of T2, the following conditions need to be satisfied. First, the reciprocal square root of the condition number of S should be larger than the relative error of calculating floating-point real-number variables. The second proposed condition is based on the relative error of the observed sample vector y in T2. If the relative error of y is larger than the relative error of the real-number variables, the former governs the numerical error of T2. Numerical experiments are conducted to show that the numerical error of T2 can be suppressed if the two above-mentioned conditions are satisfied.