StatTools : Exponentially Weighted Moving Average Explained

Links : Home Index (Subjects) Index (Categories) Contact StatTools

Related Links:
Quality Statistics Explained Page
Exponentially Weighted Moving Average Program Page

Introduction Example References
Excellent descriptions of the history and basic concepts related to Exponentially Weighted Moving Average (EWMA) are available in text books, journal articles, and numerous web pages on the Internet, some of which are listed in the references section.

This page will therefore provide only a brief summary and description, suffice to quickly orientate the user, and in support of the calculations in the Exponentially Weighted Moving Average Program Page .

Only the simplest model, as described by the NIST manual (see references) is prrovided. A paper by Lucas and the Seccicci described further improvements, but they are not available in by StatTools.

Conceptually, EWMA is the same as averaging a number of consecutive observations, and by so doing it smooths out short term variations. This prevents outlying values from distorting the long term trend of a set of observations.

The advantages of EWMA over averaging a set number of observations are firstly the values are weighted, so that the more recent observations have greater influence on the averaging, and secondly, there is no need to maintain a database of all the numbers and no need to define the number of observations needed for the averaging.

>The Exponentially Weighted Average and coefficient λ

A weighting coefficient lambda (λ) is used to assign the weight to the current observation (Yt), in relationship to the immediately previous EWMA value (EWMAt-1), and combine them to produce the current EWMA value (EWMAt), so that EWMAt = λYt + (1 - λ)EWMAt-1.

λ is a value between 0 and 1, and governs the amount of weight the current observation has in relationship to all previous observations. A λ close to 1 means a strong dominance by the current observation, with very little averaging. A λ close to 0 means a greater level of averaging, produces a smoother trend line, but the trend is less responsive to immediate changes in the observations.

>The Reference Mean and Standard Deviation These are provided by the user, either as the standards by which the new data are to be plotted against, or values obtained by previous studies.

The Standard Deviation of EWMA With weighted average, outlying values are brought closer to the mean, so that the original Standard Deviation is reduced. If SD is the original Standard Deviation, and λ is the weighting coefficient, the Standard Deviation of the resulting EWMA is SDEWMA = sqrt((λ(2-λ)SD2)

With smoothing by weighted average, and a reduced SDEWMA, a trend in the measurements that departs from the mean can be more easily identified

Rescaling of EWMA Plot Conventionally, EWMA are plotting with consecutive sample numbers in the x axis, and the measurements in the y axis. Alert lines are then drawn at ±3 SDEWMA from the mean. An alarm that the trend has departed from expected is then raised when EWMA crosses one of the alert lines.

The algorithm used in the Exponentially Weighted Moving Average Program Page transform the EWMA values to a mean of 0 and SD of 1, using the formula EWMAplot = z = (EWMA - mean) / SD x SDEWMA

In so doing, the EWMA plot is always represented as the number of Standard Deviations from the mean, and the probabilities of observing any of the EWMA values can be estimated by using the table in Probability of z Explained and Table Page. The actual EWMA values are presented during calculation, and the y axis of the plot can be rescaled by reversing the transformation.