SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Staff SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 2 Vol 1

AVERAGE ABSOLUTE DEVIATION FROM THE MEDIAN

Name:
    AVERAGE ABSOLUTE DEVIATION FROM THE MEDIAN (LET)
Type:
    Let Subcommand
Purpose:
    Compute the average absolute deviation from the median for a variable.
Description:
    The average absolute deviation from the median is defined as

    \[ \mbox{AAD} = \frac{\sum_{i=1}^{n}{|X_{i}-\tilde{X}|}}{N} \]

    where \( \tilde{X} \) is the median of the variable and N is the number of observations. This statistic is sometimes used as an alternative to the standard deviation.

Syntax:
    LET <par> = AVERAGE ABSOLUTE DEVIATION FROM THE MEDIAN <y>
                            <SUBSET/EXCEPT/FOR qualification>
    where <y> is the response variable;
                <par> is a parameter where the computed average absolute deviation is stored;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
    LET A = AVERAGE ABSOLUTE DEVIATION FROM THE MEDIAN Y1
    LET A = AVERAGE ABSOLUTE DEVIATION FROM THE MEDIAN Y1 ...             SUBSET TAG > 2
Note:
    Prior to the 2014/07 version, the AVERAGE ABSOLUTE DEVIATION command computed the average absolute deviation from the median. In the 2014/07 version, the AVERAGE ABSOLUTE DEVIATION command was modified to compute differences from the mean and the AVERAGE ABSOLUTE DEVIATION FROM THE MEDIAN command was added to compute differences from the median.
Note:
    Dataplot statistics can be used in a number of commands. For details, enter

Default:
    None
Synonyms:
    None
Related Commands: References:
    Dixon and Massey (1957), "Introduction to Statistical Analysis," Second Edition, McGraw-Hill, pp. 75-76.

    Rosner, Bernard (May 1983), "Percentage Points for a Generalized ESD Many-Outlier Procedure", Technometrics, Vol. 25, No. 2, pp. 165-172.

Applications:
    Data Analysis
Implementation Date:
    2014/07: Added as distinct command from AVERAGE ABSOLUTE DEVIATION
Program:
    .  Step 1: Data from Rosner paper (this data contains outliers)
    .
    serial read y
    -0.25 0.68 0.94 1.15 1.20 1.26 1.26 1.34 1.38 1.43 1.49 1.49 1.55 1.56
     1.58 1.65 1.69 1.70 1.76 1.77 1.81 1.91 1.94 1.96 1.99 2.06 2.09 2.10
     2.14 2.15 2.23 2.24 2.26 2.35 2.37 2.40 2.47 2.54 2.62 2.64 2.90 2.92
     2.92 2.93 3.21 3.26 3.30 3.59 3.68 4.30 4.64 5.34 5.42 6.01
    end of data
    .
    let aad2 = average absolute deviation from the median y
    let aad  = average absolute deviation y
    let mad  = average absolute deviation y
    let sd   = standard deviation y
    .
    print "Average Absolute Deviation from the median:   ^aad2"
    print "Average Absolute Deviation:                   ^aad"
    print "Median Absolute Deviation:                    ^mad"
    print "Standard Deviation:                           ^sd"
        
    The following output is generated
    Average Absolute Deviation from the median:   0.8248148148
    Average Absolute Deviation:                   0.8546090535
    Median Absolute Deviation:                    0.8546090535
    Standard Deviation:                           1.1828696348
        

Privacy Policy/Security Notice
Disclaimer | FOIA

NIST is an agency of the U.S. Commerce Department.

Date created: 01/31/2015
Last updated: 11/02/2015

Please email comments on this WWW page to alan.heckert@nist.gov.