TOPICS
Search

Moving Standard Deviation


The moving standard deviation of a time series x_1,...,x_N is the sequence obtained by computing a standard deviation in each consecutive window of a fixed width w. For the window ending at index i, the sample moving standard deviation, for i=w,...,N, is

x^__i=1/wsum_(j=i-w+1)^(i)x_j
(1)
s_i=sqrt(1/(w-1)sum_(j=i-w+1)^(i)(x_j-x^__i)^2).
(2)

Using w instead of w-1 in the denominator gives the population convention. Boundary conventions may omit the first w-1 positions, shorten the initial windows, or pad the data, so they must be specified when implementations are compared.

The moving standard deviation is also called the moving deviation or running standard deviation. It describes local variability in the same way that a moving average describes local level. It should not be confused with a single standard deviation computed from an entire data record.

In particular, the t mdev value reported by the Linux t ping utility is not a moving-window deviation. It is the population standard deviation of all the round-trip times in the report, corresponding to the denominator w above when the window is the full record (iputils Project).


See also

Moving Average, Standard Deviation, Time Series

Explore with Wolfram|Alpha

References

Brockwell, P. J. and Davis, R. A. Introduction to Time Series and Forecasting, 3rd ed. Cham, Switzerland: Springer International Publishing, 2016.iputils Project. "ping(8)." https://github.com/iputils/iputils/blob/master/doc/ping.xml.

Cite this as:

Weisstein, Eric W. "Moving Standard Deviation." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/MovingStandardDeviation.html

Subject classifications