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

BINNED

Name:
    BINNED (LET)
Type:
    Let Subcommand
Purpose:
    Bin (i.e., create a frequency table) a response variable.
Description:
    Binning a data variable means to divide it into classes and compute the frequency for each class. This is the numerical equivalent of a histogram. Creating the classes for the binning uses the same rules as the histogram. That is

    1. The class width is 0.3 times the sample standard deviation.
    2. The lower limit is the sample mean minus 6 times the standard deviation.
    3. The upper limit is the sample mean plus 6 times the standard deviation.

    As with the histogram, you can use the CLASS WIDTH, CLASS LOWER, and CLASS UPPER commands to override these defaults. Also, you can specify that relative frequencies rather than counts be computed. The command SET RELATIVE HISTOGRAM <AREA/PERCENT> can be used to specify whether relative frequencies are computed so that the area sums to 1 or so that frequencies sum to 1. The first option, which is the default, is useful for when using the relative binning as an estimate of a probability distribution. The second option is useful when you want to see what percentage of the data falls in a given class.

Syntax:
    LET <y2> <x> = BINNED <y1>             <SUBSET/EXCEPT/FOR qualification>
    where <y1> is the response variable;
                <y2> is a variable where the computed counts (or frequencies) are stored;
                <x> is a variable where the computed bin mid-points are stored;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
    LET Y2 X = BINNED Y
    LET Y2 X = BINNED Y SUBSET TAG > 2
    LET Y2 X = RELATIVE BINNED Y
Default:
    None
Synonyms:
    FREQUENCY TABLE is a synonym for BINNED and RELATIVE FREQUENCY TABLE is a synonym for RELATIVE BINNED.
Related Commands:
    HISTOGRAM = Generate a histogram.
    FREQUENCY PLOT = Generate a frequency plot.
    CLASS LIMIT = Set class limits for histograms.
Applications:
    Data Analysis
Implementation Date:
    1998/12
Program:
    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
    LET Y2 X = RELATIVE FREQUENCY TABLE Y
    SET WRITE DECIMALS 3
    PRINT X Y2

Date created: 6/5/2001
Last updated: 4/4/2003
Please email comments on this WWW page to alan.heckert@nist.gov.