This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

MovingAverage

MovingAverage
gives the moving average of list, computed by averaging runs of r elements.
MovingAverage
gives the moving average of list, computed with weights .
  • MovingAverage gives a list of the means of elements in list taken in blocks of length r. »
Compute a pairwise simple moving average:
Compute weighted moving averages:
Compute a pairwise simple moving average:
In[1]:=
Click for copyable input
Out[1]=
 
Compute weighted moving averages:
In[1]:=
Click for copyable input
Out[1]=
Lists of integers yield rational numbers:
Lists of approximate numbers yield approximate numbers:
Moving averages of matrices are matrices:
Obtain results for lists of any precision:
Obtain results for weights of any precision:
Filter large datasets:
Smooth noisy data:
Compute the 100-day moving average of a financial time series:
A moving average is a sequence of means:
A two-term MovingAverage is equivalent to a two-term MovingMedian:
An n-term moving average is equivalent to a moving average with n equal weights:
An n-term moving average is equivalent to a ListCorrelate:
An n-term weighted moving average is equivalent to a ListCorrelate:
Multiplying weights by a constant gives the same moving average:
New in 6