Calculates the cumulative average of a series.
CUMAVG(series)
series |
- |
A series or table. |
A series or table.
cumavg({20, 15, 30, 10, 25})
returns {20, 17.5, 21.6667, 18.75, 20}.
W1: gnorm(1000, 1)
W2: gline(length(w1), deltax(w1), 1/1000, 0)
W3: W1 + W2
W4: cumavg(W3)
W3 contains the sum of 1000 random samples and a linear trend.
W4 shows the linear trend developing as more samples of the data are averaged.
W1: integ(gnorm(1000, 1))
W2: cumavg(W1)
mean(W1) == W2[end]
The last point of CUMAVG is the overall average of the input data.
The n^{th} value of the output series is equal to the mean of the first n points of the input series:
See CUMSUM to compute the cumulative sum.