Statistics Toolbox    
ewmaplot

Exponentially Weighted Moving Average (EWMA) chart for Statistical Process Control (SPC)

Syntax

Description

ewmaplot(data) produces an EWMA chart of the grouped responses in data. The rows of data contain replicate observations taken at a given time. The rows should be in time order.

ewmaplot(data,lambda) produces an EWMA chart of the grouped responses in data, and specifies how much the current prediction is influenced by past observations. Higher values of lambda give more weight to past observations. By default, lambda = 0.4; lambda must be between 0 and 1.

ewmaplot(data,lambda,alpha) produces an EWMA chart of the grouped responses in data, and specifies the significance level of the upper and lower plotted confidence limits. alpha is 0.0027 by default. This value produces three-sigma limits:

To get k-sigma limits, use the expression 2*(1-normcdf(k)). For example, the correct alpha value for 2-sigma limits is 0.0455, as shown below.

ewmaplot(data,lambda,alpha,specs) produces an EWMA chart of the grouped responses in data, and specifies a two-element vector, specs, for the lower and upper specification limits of the response.

h = ewmaplot(...) returns a vector of handles to the plotted lines.

Example

Consider a process with a slowly drifting mean. An EWMA chart is preferable to an x-bar chart for monitoring this kind of process. The simulation below demonstrates an EWMA chart for a slow linear drift.

The EWMA value for group 28 is higher than would be expected purely by chance. If we had been monitoring this process continuously, we would have detected the drift when group 28 was collected, and we would have had an opportunity to investigate its cause.

Reference

[1]  Montgomery, D., Introduction to Statistical Quality Control, John Wiley & Sons 1991. p. 299.

See Also
xbarplot, schart


  errorbar expcdf