Median absolute deviation

This macro calculates the median absolute deviation of a data set.

This macro calculates the median absolute deviation of a data set.

Download the Macro

Be sure that Minitab knows where to find your downloaded macro. Choose File > Options > General. Under Macro location browse to the location where you save macro files.

Important

If you use an older web browser, when you click the Download button, the file may open in Quicktime, which shares the .mac file extension with Minitab macros. To save the macro, right-click the Download button and choose Save target as.

Required Inputs

  • A column of numeric data

Running the Macro

Suppose your data are in C1. To run the macro, choose View > Command Line/History and type:

%MEDABSDV C1

Click Run.

Additional Information

Formula

MEDABSDV = bn*1.4826*MEDIAN{abs[C - MEDIAN(C)]}

Where 1.4826 makes the expected value of MEDABSDV = STDEV(Normal population) and bn is a finite sample corrrection factor.

Reference

C. Croux and P. J. Rousseeuw, Time-efficient Algorithms for Two Highly Robust Estimators of Scale, Computational Statistics, v. 2, 411-428, (1992).