CUMSUM

Purpose:

Calculates the cumulative sum of a series.

Syntax:

CUMSUM(series)

series

-

A series or table.

Returns:

A series or table.

Example:

cumsum({20, 15, 30, 10, 25})

 

returns {20, 35, 65, 75, 100}.

Example:

W1: integ(gnorm(1000, 1))

W2: cumsum(W1)

 

sum(W1) == W2[end]

 

The last point of CUMSUM is the overall sum of the input data.

Remarks:

The nth value of the output series is equal to the sum of the first n points of the input series:

 

image\cumsum01.gif

 

or by the equivalent difference equation:

 

image\cumsum02.gif

 

CUMSUM calculates the cumulative sum of a series.

 

CUMSUM differs from integration in that the DELTAX information is not incorporated into the calculation.

 

CUMSUM is identical to PARTSUM.

 

See CUMAVG to compute the cumulative average.

 

See CUMPROD to calculate the cumulative product.

See Also:

CUMAVG

CUMPROD

CUMTRAPZ

INTEG

PARTSUM

SUM