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

MEDIAN ABSOLUTE DEVIATION

Name:
    MEDIAN ABSOLUTE DEVIATION (LET)
Type:
    Let Subcommand
Purpose:
    Compute the median absolute deviation for a variable.
Description:
    The median absolute deviation is:

      \( \mbox{MAD} = \mbox{median} |x - \tilde{x}| \)

    where \( \tilde{x} \) is the median of the variable. This statistic is sometimes used as a robust alternative to the standard deviation as a measure of scale.

    The scaled MAD is defined as

      MADN = MAD/0.6745

    For normally distributed data, the scaled MAD is approximately equal to the standard deviation.

Syntax 1:
    LET <par> = MEDIAN ABSOLUTE DEVIATION <y>
                            <SUBSET/EXCEPT/FOR qualification>
    where <y> is the response variable;
                <par> is a parameter where the computed median absolute deviation is stored;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Syntax 2:
    LET <par> = SCALED MEDIAN ABSOLUTE DEVIATION <y>
                            <SUBSET/EXCEPT/FOR qualification>
    where <y> is the response variable;
                <par> is a parameter where the computed scaled median absolute deviation is stored;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
    LET A = MEDIAN ABSOLUTE DEVIATION Y1
    LET A = MEDIAN ABSOLUTE DEVIATION Y1 SUBSET TAG > 2
    LET A = SCALED MEDIAN ABSOLUTE DEVIATION Y1
Note:
    Dataplot statistics can be used in a number of commands. For details, enter

Default:
    None
Synonyms:
    MAD is a synonym for MEDIAN ABSOLUTE DEVIATION
    MADN is a synonym for SCALED MEDIAN ABSOLUTE DEVIATION
    NORMALIZED is a synomym for SCALED
Related Commands: Applications:
    Robust Statistics
Implementation Date:
    1995/04
    2016/02: Added SCALED MEDIAN ABSOLUTE DEVIATION
Program 1:
     
    LET Y1 = LOGISTIC RANDOM NUMBERS FOR I = 1 1 100
    LET A1 = MEDIAN ABSOLUTE DEVIATION Y1
    LET A2 = SCALED MEDIAN ABSOLUTE DEVIATION Y1
        
Program 2:
     
    SKIP 25
    READ GEAR.DAT DIAMETER BATCH
    TITLE AUTOMATIC
    XLIMITS 1 10
    MAJOR XTIC MARK NUMBER 10
    MINOR XTIC MARK NUMBER 0
    XTIC OFFSET 1 1
    X1LABEL BATCH
    Y1LABEL MEDIAN ABSOLUTE DEVIATION OF DIAMETER
    MAD PLOT DIAMETER BATCH
        
    plot generated by sample program

Privacy Policy/Security Notice
Disclaimer | FOIA

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

Date created: 04/11/2016
Last updated: 04/11/2016

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