Saturday, April 25, 2020

mad

A measure of spread. Median Absolute Deviation. So the mad function is supposed to be a superior way to calculate a more accurate IQR. It's superior because it's more robust, which means it is more resistant to outliers.

I'm not sure yet what the advantages and use cases are of selecting IQR over mad and vice versa.

R Example

> mad(rivers)
[1] 214.977

If you plot the rivers dataset you will see 6 or 7 outliers, which apparently account for a 155 difference (370 IQR vs 215 mad). Experience will show you when mad needs to be the choice.

No comments:

Post a Comment

Please help to combat malicious use of the Internet.