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

CUMULATIVE AVERAGE

Name:
    CUMULATIVE AVERAGE (LET)
Type:
    Let Subcommand
Purpose:
    Compute the cumulative average of a variable.
Description:
    The cumulative average, Y2, of a variable Y is defined as:

      Y2(1) = Y(1)
      Y2(2) = (Y(1) + Y(2))/2
      Y2(3) = (Y(1) + Y(2) + Y(3))/3
      etc.

    That is, the cumulative mean of an element in a variable is simply the mean of all points in the variable up to and including that element.

Syntax:
    LET <y2> = CUMULATIVE AVERAGE <y1>             <SUBSET/EXCEPT/FOR qualification>
    where <y1> is a response variable;
                <y2> is a variable where the cumulative average is stored;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
    LET Y2 = CUMULATIVE AVERAGE Y
    LET Y2 = CUMULATIVE AVERAGE Y FOR I = 1 1 30
Default:
    None
Synonyms:
    CUMULATIVE MEAN is a synonym for CUMULATIVE AVERAGE.
Related Commands:
    MEAN Compute the mean of a variable.
    CUMULATIVE SUM = Compute the cumulative sum of a variable.
    CUMULATIVE PRODUCT = Compute the cumulative product of a variable.
    CUMULATIVE INTEGRAL = Compute the cumulative integral of a variable.
Applications:
    Data Manipulation
Implementation Date:
    1998/5
Program:
    SKIP 25
    READ HAHN.DAT Y
    LET YAVE = CUMULATIVE AVERAGE Y

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