Math glossary

Mean Absolute Deviation: Formula, Grouped Data, and Examples

Find mean absolute deviation for raw or grouped data. Compare it with standard deviation and median absolute deviation using six examples.

TL;DR

Mean absolute deviation is the average distance of the observations from their mean. Find the mean, take the absolute difference from each observation, then average those differences. The result uses the original units.

Key Points

  • Every absolute deviation is nonnegative.
  • Divide by the number of observations when each has equal weight.
  • Multiply each deviation by its frequency for a frequency table.
  • Mean absolute deviation and median absolute deviation use different calculations.
  • Mean absolute deviation is zero exactly when all included values are equal.

What is mean absolute deviation?

The mean absolute deviation about the mean, also called average absolute deviation, measures the spread of a numerical dataset. For nn observations x1,…,xnx_1,\ldots,x_n with arithmetic mean x¯\bar x,

MADmean=1n∑i=1n|xi−x¯|.\operatorname{MAD}_{\mathrm{mean}} =\frac1n\sum_{i=1}^n\lvert x_i-\bar x\rvert.

The bars indicate absolute value. If an observation is 4 units below the mean, its distance is 4. An observation 4 above the mean also contributes 4. Without the absolute values, the signed deviations from the arithmetic mean sum to zero. NIST, Measures of Scale

A number line shows observations two, six, seven, and nine at distances four, zero, one, and three from the mean of six
The four distances from the mean of 6 add to 8. Their average is 2.

How do you calculate it for raw data or a frequency table?

For raw data, first calculate the arithmetic mean. Then subtract it from every value, take magnitudes, add the magnitudes, and divide by the number of observations. Keep enough precision in the mean before calculating the deviations.

If a value vjv_j occurs fjf_j times, use its frequency both when finding the mean and when averaging absolute deviations:

x¯=∑jfjvj∑jfj.\bar x=\frac{\sum_j f_jv_j}{\sum_j f_j}.
MADmean=∑jfj|vj−x¯|∑jfj.\operatorname{MAD}_{\mathrm{mean}} =\frac{\sum_j f_j\lvert v_j-\bar x\rvert}{\sum_j f_j}.

The formula is exact for a table of individual values and their counts. If a table only gives counts for intervals, use the midpoints as representative values. The result is an estimate because the exact values within the intervals are unknown. See how histogram bins group data. CASRAI, Mean Absolute Deviation

How is mean absolute deviation different from standard deviation?

Mean absolute deviation takes an average of distances. Standard deviation squares the deviations, averages the squares under the chosen population or sample convention, and takes a square root. Both return the original measurement unit. Squaring makes a larger miss contribute disproportionately to the calculation.

If both calculations use the same mean and denominator nn, the average absolute distance is at most the root mean square distance. This follows because the average of the squares is at least the square of the average, applied to the nonnegative distances. The standard deviation formula also covers the sample convention that divides by n−1n-1. StatsLearn, Mean Absolute Deviation and Standard Deviation

Is MAD the same as median absolute deviation?

The abbreviation MAD can refer to either statistic. State which one you use.

Statistic Centre How to summarize distances
Mean absolute deviation about the mean Arithmetic mean Take the arithmetic mean of the distances
Median absolute deviation Median Take the median of the distances

The median-based version resists changes in a few extreme observations because both its centre and its final calculation are based on ranks. An arithmetic mean can move when a large observation is added. The distances to the shifted mean can change for many other points as well. Cerritos College, Measures of Variability

Worked Mean Absolute Deviation Examples

Example 1

Find the mean absolute deviation of 2,6,7,92,6,7,9.

  1. The mean is (2+6+7+9)/4=6(2+6+7+9)/4=6.
  2. The absolute deviations are 4,0,1,34,0,1,3.
  3. Their mean is 8/4=28/4=2.

Example 2

Two groups have values 4,6,8,104,6,8,10 and 2,6,8,122,6,8,12. Which group has greater mean absolute deviation?

  1. Both means are 7.
  2. The first group’s distances are 3, 1, 1, and 3, producing MAD 2.
  3. The second group’s distances are 5, 1, 1, and 5, producing MAD 3. Its observations sit farther from the mean on average.

Example 3

A grouped table has counts 1, 2, and 1 in the intervals [0,4)[0,4), [4,8)[4,8), and [8,12)[8,12). Estimate the mean absolute deviation.

  1. Use the midpoints 2, 6, and 10. Their frequency-weighted mean is 6.
  2. Their distances from 6 are 4, 0, and 4.
  3. The estimate is (1·4+2·0+1·4)/4=2(1\cdot4+2\cdot0+1\cdot4)/4=2. The original readings could give a different result.

Example 4

Add the observation 30 to the dataset 2,4,6,82,4,6,8. Compare the mean-based result and the median-based result for the new data.

  1. The new mean is 10. The distances are 8, 6, 4, 2, and 20. Their average is 8.
  2. The new median is 6. Sort the distances from 6 as 0, 2, 2, 4, and 24.
  3. The median of these distances is 2. In this case the large new value has much more influence on the mean-based result.

Example 5

Every value in Example 1 is replaced by twice the value plus 3. Find the new mean absolute deviation.

  1. Doubling scales the mean and all distances by a factor of 2.
  2. Adding 3 shifts every observation and the mean by the same amount, preserving distances.
  3. The new mean is 15 and the new MAD is 4.

Example 6

Compare mean absolute deviation and population standard deviation for 1,3,5,71,3,5,7.

  1. The mean is 4 and the distances are 3, 1, 1, 3. Their average is 2.
  2. The mean of the squared distances is (9+1+1+9)/4=5(9+1+1+9)/4=5.
  3. Population standard deviation is 5≈2.24\sqrt5\approx2.24, slightly larger than the MAD.

Mistakes That Change the Answer

Mistake 1: Averaging the signed differences

Signed deviations cancel about the arithmetic mean. Take each absolute value before adding.

Mistake 2: Dividing by the number of rows in a frequency table

A row with frequency 10 contributes ten observations. Divide by the total frequency.

Mistake 3: Rounding the mean before calculating distances

An early rounding step moves the centre and can change the deviations. Round at the end when possible.

Try It Yourself

  1. Find the mean absolute deviation of 3,3,33,3,3.
  2. Find the mean absolute deviation of 2,4,6,82,4,6,8.
  3. A set of lengths has MAD 2 centimetres. Express its MAD in millimetres.

Answers and Reasoning

  1. Zero. All observations equal their mean.
  2. The mean is 5 and the distances are 3, 1, 1, 3. Their average is 2.
  3. A centimetre is 10 millimetres. The MAD is 20 millimetres.

Frequently Asked Questions

Can mean absolute deviation be negative?

No. It averages nonnegative distances.

What does a MAD of 4 mean?

The observations lie 4 units from the mean on average. The individual distances may vary.

Is mean absolute deviation the same as mean absolute error?

Both average distances. In a prediction problem, mean absolute error compares each observation with its prediction. Mean absolute deviation about the mean compares every observation with the same data mean.

Conclusion

  • Find the correct centre and take absolute deviations before averaging.
  • Use the total frequency to weight repeated values.
  • State which definition of MAD you use, especially when comparing with published data.

Read More

Research Behind This Article

  1. NIST, Engineering Statistics Handbook: Measures of Scale. NIST
  2. CASRAI, Mean Absolute Deviation: Formula and Worked Example. CASRAI
  3. Cerritos College, Measures of Variability. LibreTexts
  4. StatsLearn, Mean Absolute Deviation: Formula and Examples. StatsLearn