How MAD is calculated
MAD = (1/n) × Σ|xᵢ − x̄|. Calculate the mean of the dataset. Then for each value, compute the absolute difference from the mean. Sum those absolute differences and divide by n.
Example: for [2, 2, 3, 4, 14], the mean is 5. Absolute deviations: |2−5|=3, |2−5|=3, |3−5|=2, |4−5|=1, |14−5|=9. Sum = 18. MAD = 18/5 = 3.6.