Robust Mahalanobis Distance Calculator

Calculate resistant distances using robust location and covariance. Review thresholds, rankings, matrices, and visual patterns. Spot multivariate anomalies before they distort critical analytical decisions.

Calculator Inputs

Use comma, space, tab, or semicolon separated values. Paste one observation per line.

Example data table

Example Dataset

This sample includes mostly similar rows and one more unusual profile, which makes the distance ranking easy to interpret.

Observation X1 X2 X3
Case 14.82.16.0
Case 25.02.06.2
Case 34.92.25.9
Case 45.12.16.1
Case 55.22.36.3
Case 64.71.95.8
Case 75.02.26.0
Case 87.34.99.4

Formula Used

Squared Mahalanobis distance: d² = (x - μ)T Σ-1 (x - μ)

This calculator replaces the classical mean vector and covariance matrix with a robust location and robust covariance estimate from an approximate minimum covariance determinant workflow.

Robust support search: A resistant subset is selected, refined through concentration steps, then reweighted using the chosen confidence cutoff.

That process lowers the influence of extreme observations before the final inverse covariance matrix is built.

Decision rule: if the squared robust distance exceeds the selected chi-square style cutoff, the row is marked as a potential multivariate outlier.

Approximate tail probabilities are shown to help rank unusual observations.

How to Use This Calculator

  1. Enter variable names so the output tables read clearly.
  2. Paste your dataset with one observation per line.
  3. Adjust support fraction for stronger or weaker resistance.
  4. Choose the confidence level that will set the cutoff.
  5. Increase ridge regularization when covariance inversion feels unstable.
  6. Add an optional target observation for one-point scoring.
  7. Press the calculate button to build the robust model.
  8. Review the summary cards, plot, matrix, and flags.
  9. Export the observation table as CSV or PDF when needed.

Frequently Asked Questions

1) What makes this distance robust?

It does not rely fully on the ordinary mean and covariance. Instead, it searches for a cleaner core subset, then estimates location and scatter from that more stable region before scoring each observation.

2) When should I use this instead of classical Mahalanobis distance?

Use it when your dataset may contain outliers, leverage points, or contamination. Classical covariance can be pulled toward extremes, while a robust version usually gives more believable outlier rankings.

3) What does support fraction control?

It controls how much of the dataset is treated as the core support during the resistant covariance search. Lower values increase resistance, while higher values keep more observations inside the fitting subset.

4) Why is ridge regularization included?

Covariance matrices can become singular or nearly singular, especially with collinear variables. A small ridge term stabilizes inversion so the calculator remains usable with tight or noisy measurements.

5) What does the confidence level change?

It changes the cutoff used to flag potential outliers. A higher confidence level raises the threshold, which usually marks fewer observations as unusual.

6) Why do robust and classical distances differ?

Classical distances are based on the full sample mean and covariance. Robust distances are based on a resistant model, so unusual rows often receive larger and more informative scores.

7) Can I score a new observation without refitting everything?

Yes. Enter a target observation in the optional field. The calculator scores that vector against the robust center and covariance estimated from the dataset you provided.

8) What dataset size works best?

You need more observations than variables. Larger samples usually improve covariance stability, especially when variables are correlated or when you expect several unusual observations.

Related Calculators

least trimmed squaresm-estimator regressionwinsorized mean calculatorrobust covariance estimatorrobust outlier detectionrobust logistic regressionbiweight midvariancerobust location estimatorrobust quantile regressionhuber m estimator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.