Multivariate Z-Score Methods
You'll learn: How to detect outliers across multiple variables simultaneously using Mahalanobis distance, extending univariate Z-scores into multiple dimensions.
The Problem with One Variable at a Time
You've learned how to flag outliers using Z-scores for individual variables. But what happens when a data point looks normal in every single variable, yet the combination is unusual? Imagine someone who's 6 feet tall (normal) and weighs 100 pounds (individually normal range) — the combination is suspicious, even though neither measurement alone triggers an alert.
Enter Mahalanobis Distance
Mahalanobis distance is the multivariate equivalent of the Z-score. Instead of measuring "how many standard deviations away from the mean" in one dimension, it measures how far a point is from the center of the data cloud in all dimensions at once, accounting for how variables relate to each other (their correlations).
Think of it like this: A univariate Z-score asks "Is this person unusually tall?" Mahalanobis distance asks "Is this person's height-weight-age combination unusual given how these measurements typically vary together?"
How It Works
The Mahalanobis distance incorporates the covariance matrix of your variables, which captures both the variance in each variable and their correlations. A point might be close to the mean in raw distance but still have a high Mahalanobis distance if it lies in a direction where data rarely appears.
You can then compare Mahalanobis distances to a chi-squared distribution threshold (similar to how you used Z-score thresholds like 3) to identify multivariate outliers.
Key Takeaway: Mahalanobis distance extends anomaly detection to multiple variables simultaneously, catching outliers that appear normal in each dimension alone but are unusual in combination, while respecting the correlation structure of your data.