Anonymous user
Averages/Simple moving average: Difference between revisions
The moving average has a period
(→{{header|D}}: add implementation) |
(The moving average has a period) |
||
Line 4:
Create a [[wp:Stateful|stateful]] function/class/instance that takes a number as argument and returns a simple moving average of its arguments so far.
Note that the moving average has a period and numbers beyond the period must be dropped from the calculation of the average. (See the Python example, amongst others, for a correct implementation) .
See also: [[Standard Deviation]]
|