gives the moving average of list, computed by averaging runs of r elements.
gives the moving average of list, computed with weights wi.
- MovingAverage[list,r] gives a list of the means of elements in list taken in blocks of length r. »
- MovingAverage[list,wts] is equivalent to ListCorrelate[wts/Total[wts],list]. »
- MovingAverage handles both numerical and symbolic data.
- MovingAverage gives a list of length Length[list]-r+1.
- MovingAverage works with SparseArray and TemporalData objects. »
Examplesopen allclose all
Generalizations & Extensions (4)
Compute results for a SparseArray:
A moving average of TemporalData places the result on the right end of the moving windows:
The values of a moving average of TemporalData are equivalent to the moving average of its values:
The results of a moving average of TemporalData are placed on the right end of the window, and the windows with the smaller number of observations then requested are dropped:
The moving average of a numeric TimeSeries for various window lengths:
Properties & Relations (7)
An n‐term moving average is equivalent to a ListCorrelate:
An n‐term weighted moving average is equivalent to a ListCorrelate:
Wolfram Research (2007), MovingAverage, Wolfram Language function, https://reference.wolfram.com/language/ref/MovingAverage.html.
Wolfram Language. 2007. "MovingAverage." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MovingAverage.html.
Wolfram Language. (2007). MovingAverage. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MovingAverage.html