Similarly to the CUSUM chart, the EWMA chart is useful in detecting small shifts in the process mean. The performance of the EWMA control chart is approximately equivalent to that of the cuulative-sum control chart, and in some ways, it is easier to set up and operate. These charts are used to monitor th emean of a process based on samples taken from the process at given times (hours, shifts, days, weeks, months, etc). The measurements of the samples at a given time constitute a "subgroup". Each point is calculated where older points are weighted lower and lower. As with the CUSUM, the EWMA is typically used with individual observations (but can also be used for rational subgroups of size n > 1. Another option for single responses is I-chart. [I-chart]
The EWMA chart relies on the specification of a target value and a known or reliable estimate of the standard deviation. For this reason, it is best used after process control has been established to watch for early deviations from the target. Once a reliable estimate of the mean and standard deviation is available, the EWMA and CUSUM charts are useful in detecting smaller shifts in the process mean.
EWMA Calculations
The exponentially weighted moving average is defined as
where 0 ≤ λ ≤ 1 is a constant and the starting value (required with the first sample at i = 1) is the process target, so that `z_0 = mu_0`. Sometimes the average of preliminary data is used as the starting value of the EWMA, so that `z_0 = bar x`. The EWMA control chart is constructed by plotting zi versus the sample number i (or time). The center line and control limits for are CL = μ0, with control limits are
Values of λ is specified by the user and is in the interval 0.05 ≤ λ ≤ 0.25 work well, with λ = 0.05, λ = 0.10, λ = 0.20 being popular choices. L = 3 (the usual 3-sigma limits) works reasonable well, although when λ is small, say λ ≤ 0.1, there is an advantage in reducing the width of the limits by using a value of L between 2.6 and 2.8. Using λ= 0.1 and L = 2.7 should result in an in-control ARL of ARL0 ≅ 500 and for detecting a shift of one standard deviation in the process mean. For 0.2 and L=3 this will give an out of control signal after about 11 samples for a 1σ shift. The values of limits change with each successive subgroup, but ten to level off at around the tenth subgroup.
Rational subgroups
The target mean may be input directly, or it may be estimated from a series of subgroups. If it is estimated from the subgroups, the formula for the grand average is
When the sample size is variable across subgroups, a weighted approach is recommended for estimating sigma.
If rational subgroups of size n > 1 are used, then simply replace `x_i` with `bar x_i` and `sigma` with `sigma_(bar x) = sigma / sqrt(n)` in the equations.
EWMA example (n=1)
Data
The target value for the process mean is 10.0 with a σ = 1.
9.45 7.99 9.29 11.66 12.16 10.18 8.04 11.46 9.20 10.34
9.03 11.47 10.51 9.40 10.08 9.37 10.62 10.31 8.52 10.84
10.90 9.33 12.29 11.50 10.60 11.08 10.38 11.62 11.31 10.52
Steps to complete Figure 1
B1 : "xi " (the data from above for each sample)
C1 : "zi " (EWMA value calculated for each sample)
D1 : "LCL " (lower control limit)
E1 : "UCL " (upper control limit)
F1 : "Y+ " (Y = yes if EWMA value exceeds UCL)
G1 : "Y- " (Y = yes if EWMA value is below LCL)
A3 : "=A2+1"
drag (copy formula) A3 to A32 so that …
A32 : "=A30+1"
check that the result is a sample sequence from A2:A32 of 0~30
A35 : "`sigma`", B35 : "1.0"
A36 : "`lambda`", B36 : "0.1"
A37 : "L", B37 : "2.7"
Select C3, then drag (copy formula) through to C32 so that …
C32: "=B32*$B$36+(1-$B$36)*C31"
E3: "=$B$34-$B$37*$B$35*SQRT(($B$36/(2-$B$36))*(1-POWER((1-$B$36),(2*A3))))"
Select D3 together with E3, then drag (copy formula) through to E32 so that …
D32: "=$B$34+$B$37*$B$35*SQRT(($B$36/(2-$B$36))*(1-POWER((1-$B$36),(2*A32))))"
E32: "=$B$34-$B$37*$B$35*SQRT(($B$36/(2-$B$36))*(1-POWER((1-$B$36),(2*A32))))"
Check that your results agree with LCL and UCL in Table 1.
G3: "=IF(C3<=D3,"Y","")"
Select F3 together with G3, then drag (copy formula) through to G32 so that …
F32: "=IF(C32>E32,"Y","")"
G32: "=IF(C32<=D32,"Y","")"
Check that your result is a "Y" in cell F31 and F32.
Rational subgroup (n>1)
To monitor a process for a change in the mean, subgroup samples of five observations were made each day. Each line in the data below represents the five observations for one day. The monitoring starts at the first line, and was continued for 20 days (the bottom line of data). (User-defined parameters to use in calculations are λ = 0.3 and L = 1.5).
Data
14.76 14.82 14.88 14.83 15.23
14.95 14.91 15.09 14.99 15.13
14.50 15.05 15.09 14.72 14.97
14.91 14.87 15.46 15.01 14.99
14.73 15.36 14.87 14.91 15.25
15.09 15.19 15.07 15.30 14.98
15.34 15.39 14.82 15.32 15.23
14.80 14.94 15.15 14.69 14.93
14.67 15.08 14.88 15.14 14.78
15.27 14.61 15.00 14.84 14.94
15.34 14.84 15.32 14.81 15.17
14.84 15.00 15.13 14.68 14.91
15.40 15.03 15.05 15.03 15.18
14.50 14.77 15.22 14.70 14.80
14.81 15.01 14.65 15.13 15.12
14.82 15.01 14.82 14.83 15.00
14.89 14.90 14.60 14.40 14.88
14.90 15.29 15.14 15.20 14.70
14.77 14.60 14.45 14.78 14.91
14.80 14.58 14.69 15.02 14.85
B1 : "x1 " (first of five observations from the daily sample)
C1 : "x2 " (second of five observations from the daily sample)
D1 : "x3 " (third of five observations from the daily sample)
E1 : "x4 " (fourth of five observations from the daily sample)
F1 : "x5 " (fifth of five observations from the daily sample)
G1 : "`bar x`" (average of daily sample)
H1 : "zi " (EWMA value for daily sample)
I1 : "σi " (standard deviation for daily sample)
J1 : "UCL " (standard deviation for daily sample)
K1 : "UCL " (lower control limit)
L1 : "CL " (center line)
A2 : "0"
A3 : "=A2+1"
drag (copy formula) A3 to A22 so that …
A22 : "=A21+1"
check that the result is a sample sequence from A2:A22 of 0~20
drag (copy formula) G3 to G22 so that …
G22 : "=AVERAGE(B22:F22)"
check that the result the same as in Table 2.
drag (copy formula) I3 to I22 so that …
I22 : "=STDEV(B22:F22)"
check that the result the same as in Table 2.
G25 : "`bar bar x`" weighted mean of subgroup means
G26 : "`lambda`" user-defined
G27 : "L" user-defined
G28 : "`bar bar S`" average of subgroup standard deviations
H28 : "=AVERAGE($I$3:$I$22)"
drag (copy formula) H3 to H22 so that …
H22 : "=$H$26*G3+(1-$H$26)*H21"
check that the result the same as in Table 2.
Select J3 together with K3, then drag (copy formula) to K22 so that …
K22 : "=$H$2-$H$27*$H$28*SQRT(($H$26/(2-$H$26))*(1-POWER((1-$H$26),(2*A22))))"
check that the result the same as in Table 2.
drag (copy formula) L3 to L22
Variable sample size
For unequal size sample subgroups, use the same Excel equation to calculate the weighted mean of subgroup averages.
`bar bar x` = 74.001
But for the weighted average of standard deviations (H28), the equation
`hat sigma = bar s = [(sum_(i=1)^k ((n_i - 1) s_i^2)) / ((sum_(i=1)^k n_i) - k) ]^(1/2)`
can be calculated by changing the Excel formula for standard deviation in column H to:
Select cell H3 and drag (copy formula) through to H26.
After which, for the weighted average of standard deviations `bar S`, change the Excel formula in H28 to:
`bar S` = 0.01029
The Excel formulas for UCL and LCL do not need to be modified. Their values will show the effects of these modifications.