compute moving averages for a data set
MovingAverage(X, m, options)
posint; moving window size
(optional) equation(s) of the form ignore=value; specify options for the MovingAverage function
The MovingAverage function computes moving averages for a set of observations. To compute weighted moving averages see Statistics[WeightedMovingAverage] or Statistics[LinearFilter].
The first parameter X is a single data sample - given as e.g. a Vector. Each value represents an individual observation.
The second parameter m is the size of the moving window. The size of the moving window cannot exceed the number of elements in X (or the number of non-missing elements if ignore is set to true). The number of items in the answer is less than the number of items in data. Only complete neighborhoods are included, so the number of items is reduced by m-1.
The options argument can contain one or more of the options shown below. These options are described in more detail in the Statistics[Mean] help page.
ignore=truefalse -- This option is used to specify how to handle non-numeric data. If ignore is set to true all non-numeric items in X will be ignored.
A := <seq(sin(i), i = 1..100)>:
B := MovingAverage(A, 5);
C := MovingAverage(A, 10);
LineChart([A, B, C]);
Download Help Document
What kind of issue would you like to report? (Optional)