Median Absolute Deviation (MAD)

Central Tendency and Dispersion Measures

Enter a list of numbers to calculate the Median, Absolute Deviations, and the Median Absolute Deviation (MAD).

Practical Examples

Explore how the Median Absolute Deviation is calculated with different datasets.

Basic Integer Set

Simple Dataset

A standard set of integers to demonstrate a basic calculation.

1, 1, 2, 2, 4, 6, 9

Impact of an Outlier

Dataset with Outlier

This example shows how MAD is robust and not significantly affected by extreme values.

3, 5, 7, 8, 9, 150

Set with Decimals

Decimal Numbers

An example using floating-point numbers to show versatility.

1.2, 2.5, 2.8, 3.1, 4.5, 5.0

Set with Negative Values

Negative Numbers

Demonstrates the calculation with a dataset that includes negative numbers.

-10, -5, 0, 2, 4, 7

Other Titles
Understanding the Median Absolute Deviation (MAD): A Comprehensive Guide
A deep dive into one of the most robust measures of statistical dispersion, its applications, and calculations.

What is Median Absolute Deviation (MAD)?

  • Defining MAD
  • Why MAD is a 'Robust' Statistic
  • MAD vs. Standard Deviation
The Median Absolute Deviation (MAD) is a measure of statistical dispersion. In simpler terms, it tells you how spread out the values in a dataset are. What makes MAD special is its robustness. A robust statistic is one that is not heavily influenced by outliers—unusually high or low values in the dataset. This property makes MAD a superior alternative to the standard deviation in many real-world scenarios where data is not perfectly normally distributed or contains erroneous measurements.
The Core Concept
The calculation is based on the median, which is itself a robust measure of central tendency. MAD is the median of the absolute differences between each data point and the median of the entire dataset. Because it uses the median twice, it effectively down-weights the impact of extreme outliers.
Key Differences with Standard Deviation
Standard deviation calculates the average distance from the mean. Since the mean is sensitive to outliers (a single large value can pull the mean up significantly), and because it squares the differences (further amplifying the effect of outliers), standard deviation can give a distorted picture of the data's spread if outliers are present. MAD, by contrast, provides a more stable and representative measure of dispersion for such datasets.

Step-by-Step Guide to Using the MAD Calculator

  • Inputting Your Data
  • Interpreting the Results
  • Using the Examples
1. Entering Data
To begin, enter your dataset into the input field labeled 'Data Set'. The numbers should be separated by commas. You can include integers, decimals, and negative numbers. For example: 1, 2.5, -3, 5, 5, 100.
2. Calculating
Once your data is entered, click the 'Calculate' button. The tool will process your input and instantly display the results.
3. Analyzing the Output
The results section provides four key pieces of information: the Median Absolute Deviation (MAD) itself, the Median of your dataset, the original data sorted in ascending order, and the list of absolute deviations from the median that were used to calculate the MAD. This comprehensive output helps you understand not just the final value, but how it was derived.

Real-World Applications of Median Absolute Deviation

  • Data Monitoring and Anomaly Detection
  • Medical and Biological Research
  • Financial Analysis
MAD is not just an academic concept; it has powerful applications in various fields.
Anomaly Detection
In network security and system monitoring, analysts look for unusual spikes in activity. A sudden jump in failed login attempts or network traffic could signal an attack. Because MAD is robust to outliers, it can establish a 'normal' range of behavior, making it easier to flag true anomalies that deviate significantly (e.g., more than 3 MADs from the median).
Scientific Research
In fields like genomics or pharmacology, a single experimental error or a unique biological sample can create an outlier. Using MAD to analyze the variability of gene expression or drug response ensures that these outliers do not skew the overall conclusions, leading to more reliable scientific findings.
Finance
Financial markets are notoriously volatile, with occasional extreme daily returns. When assessing investment risk or the performance of a trading model, MAD can provide a more stable measure of volatility than standard deviation, which can be inflated by rare, dramatic market events.

Common Misconceptions and Correct Methods

  • MAD is not the Mean Absolute Deviation
  • The Role of the Scaling Factor
  • When to Use MAD
MAD vs. Mean Absolute Deviation
A common point of confusion is mixing up Median Absolute Deviation with Mean Absolute Deviation. The latter is calculated using the mean instead of the median. While also a measure of dispersion, it is not as robust to outliers as MAD because the mean itself is sensitive to extreme values.
The Scaling Factor for Normal Distributions
For normally distributed data, the standard deviation (σ) can be estimated from the MAD using a constant scaling factor: σ ≈ 1.4826 * MAD. This makes MAD a consistent estimator for the standard deviation. However, it's crucial to remember that this relationship only holds for data that is approximately normal. Our calculator provides the raw MAD value without this scaling, as assuming normality is not always appropriate.
Choosing the Right Tool
While MAD is powerful, it's not always the best choice. For data that is known to be normally distributed and free of outliers, the standard deviation is a more efficient and conventional measure. The key is to understand your data: if you suspect outliers or your data is skewed, MAD is likely the more reliable choice.

Mathematical Derivation and Examples

  • The Formula
  • Worked Example
  • Step-by-Step Breakdown
The Formula for MAD
The formula for the Median Absolute Deviation is: MAD = median(|Xᵢ - median(X)|). Where X is the dataset, Xᵢ represents each individual value in the dataset, and |...| denotes the absolute value.
Worked Example
Let's calculate the MAD for the dataset: X = {3, 5, 7, 8, 9, 150}.
Step 1: Find the median of X. The data is already sorted. With an even number of values (6), the median is the average of the two middle values: (7 + 8) / 2 = 7.5.
Step 2: Calculate the absolute deviation of each value from the median (7.5): |3 - 7.5| = 4.5, |5 - 7.5| = 2.5, |7 - 7.5| = 0.5, |8 - 7.5| = 0.5, |9 - 7.5| = 1.5, |150 - 7.5| = 142.5.
Step 3: Create a new dataset of these absolute deviations: D = {0.5, 0.5, 1.5, 2.5, 4.5, 142.5}.
Step 4: Find the median of the deviation dataset D. It's already sorted. The median is the average of the two middle values: (1.5 + 2.5) / 2 = 2.
Therefore, the MAD of the dataset is 2. Notice how the extreme outlier of 150 had a minimal impact on the final result.