ADDRESS AND STATISTICAL CHECKS

Checking a zero median absolute deviation alongside a wide range

Median absolute deviation can be zero for a list that still contains a far-away value. This guide shows how a repeated central cluster produces that result and what a zero MAD can and cannot say.

Computing the deviations step by step

The median absolute deviation, or MAD, is the median of the absolute distances from the data median. For 1, 1, 1, 1, 100 the median is 1, since the middle value of five sorted numbers is the third. The absolute deviations are |1 - 1| four times, which is 0 each, and |100 - 1| = 99. Sorted, they read 0, 0, 0, 0, 99, and the middle value is 0. So the unscaled MAD is 0. The page uses the formula median(abs(x - median(x))). No averaging happens anywhere, which is what lets a single large deviation drop out of the answer. Compare that with the mean absolute deviation, which averages the same deviations and would give (0 + 0 + 0 + 0 + 99) / 5 = 19.8 for this list. The two statistics share a name pattern but answer different questions, so check which one a report uses before comparing numbers from different sources.

Why the tail does not move the answer

The median ignores how far a value lies from the center, and only its position in the sorted order counts. Replacing 100 by 1,000 or by 10,000 changes the range but leaves the sorted deviations 0, 0, 0, 0 and a bigger last entry, so the median is still 0. This resistance to extreme values is what makes MAD a robust measure of spread. It tolerates a share of contamination up to half of the data, whereas the standard deviation of 1, 1, 1, 1, 100 is dominated by the single large value and is about 39.6 for the population form, or 44.3 for the sample form.

The range tells the other half of the story

The range is the maximum minus the minimum. For 1, 1, 1, 1, 100 it is 100 - 1 = 99, and for the constant list 1, 1, 1, 1, 1 it is 0. Both lists have an unscaled MAD of 0, so MAD alone cannot separate them. The range separates them at once. This is the main lesson of the worksheet: a zero spread statistic does not mean that all the values are identical, only that the middle of the deviations is zero. Reporting MAD with the minimum and maximum shows both the typical spread and the extremes.

How many repeats make a zero

For an odd number of values, the MAD is zero when more than half of them equal the median. With five values, three equal values at the center are enough: 1, 1, 1, 2, 100 has median 1, deviations 0, 0, 0, 1, 99 and a MAD of 0. For an even count, the two middle deviations must both be zero. The list 3, 3, 3, 3, 8, 9 has median 3, deviations 0, 0, 0, 0, 5, 6 and a MAD of 0, with a range of 6. If the repeated value is not the median, as in 1, 1, 2, 2, 100 with median 2, then the MAD becomes 1.

When the cluster is less tight

A little more spread removes the zero. For 1, 2, 3, 4, 100 the median is 3, and the deviations are 2, 1, 0, 1, 97. Sorted, they read 0, 1, 1, 2, 97, so the MAD is 1. The tail is far larger than in the first example, but the result is small, which again shows that MAD follows the bulk of the data. The same list has a range of 99 and a population standard deviation of about 39.0, so the three measures answer different questions: where the middle spread sits, how wide the data go and how much the tail pulls on squared distances.

The scaling constant and what this page reports

The page reports the unscaled MAD, matching the definition above. Some references multiply it by 1.4826 so that, for data from a normal distribution, the result estimates the standard deviation. That scaled value would also be zero here, since 1.4826 × 0 = 0. If you compare numbers from different sources, check whether they scale the MAD, because an unscaled 10 and a scaled 14.826 describe the same spread. This worksheet makes no claim about normality, and the unscaled value stands as a plain description of the deviations.

Reading a zero result

A zero MAD is a prompt to look at the data. It can come from a measurement with coarse resolution, a column with many repeats because of rounding, a default value filling missing entries or a real central cluster with a few distant observations. Each calls for a different response. Counting how many values equal the median, and listing the values outside it, shows which case applies. A zero must not be taken to mean the data are free of variation, and a positive MAD must not be taken to mean the data are free of unusual points. As a practical step, add a count of how many values equal the median next to the MAD. In 1, 1, 1, 1, 100 that count is 4 of 5, which explains the zero at a glance and tells a reader the result comes from repetition, not from a lack of variation. A short note of this kind costs a line and prevents most misreadings.

Outliers and the limits of the comparison

MAD is sometimes used to flag outliers by measuring distance from the median in MAD units, but a zero MAD makes that division impossible, since any nonzero distance becomes infinitely large. Nothing in this worksheet classifies the value 100 as an outlier, and no threshold follows from the comparison. The lists are abstract controls that show how the statistic behaves. When working with real observations, keep the data, report the count of repeated values, and add another summary such as a percentile range to describe the tail.

Comparing MAD with the interquartile range

The interquartile range, or IQR, is another resistant spread measure: the distance between the first and third quartiles. For 1, 2, 3, 4, 100 the quartile positions depend on the method used, which is a reason to state the method when reporting one. MAD avoids that choice, because the median has one standard definition for any list. Both statistics can be zero when more than half of the values coincide, so neither replaces a look at the data. Pairing the MAD with the range, as in the controls on this page, gives a short description: the middle of the data is tight, and the extremes are far apart.

Reproduce the checks

Central cluster with tail

Open the Median Absolute Deviation Calculator and enter:

Numbers
1,1,1,1,100

Expected output:

Unscaled mad

0

Most absolute deviations are zero.

Tail range

Open the Range Calculator and enter:

Numbers
1,1,1,1,100

Expected output:

Range

99

The range retains the distant endpoint.

Constant-list range

Open the Range Calculator and enter:

Numbers
1,1,1,1,1

Expected output:

Range

0

A different list can share the same zero MAD.

References and implementation scope

The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.

Sources

Related tasks