Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
EWMACHART Statement

Constructing EWMA Charts

The following notation is used in this section:
Eiexponentially weighted moving average for the i th subgroup
rEWMA weight parameter (0 \lt r \leq 1)
\muprocess mean (expected value of the population of measurements)
\sigmaprocess standard deviation (standard deviation of the population of measurements)
xijj th measurement in i th subgroup, with j =1, 2, 3, ..., ni
nisample size of i th subgroup
\overline{X}_{i}mean of measurements in i th subgroup. If ni=1, then the subgroup mean reduces to the single observation in the subgroup
\overline{\overline{X}}weighted average of subgroup means
\Phi^{-1}(\cdot)inverse standard normal function

Plotted Points

Each point on the chart indicates the value of the exponentially weighted moving average (EWMA) for that subgroup. The EWMA for the i th subgroup (Ei) is defined recursively as
E_{i}=r\overline{X}_{i}+(1-r)E_{i-1} \, , \; \; i\gt

where r is a weight parameter (0 \lt r \leq 1).Some authors (for example, Hunter 1986 and Crowder 1987a,b) use the symbol \lambda instead of r for the weight. You can specify the weight with the WEIGHT= option in the EWMACHART statement or with the variable _WEIGHT_ in a LIMITS= data set. If you specify a known value (\mu_{0}) for \mu,E_{0}=\mu_{0}; otherwise, E_{0}=\overline{\overline{X}}.

The preceding equation can be rewritten as

E_{i}=E_{i-1}+r(\overline{X}_{i}-E_{i-1})

which expresses the current EWMA as the previous EWMA plus the weighted error in the prediction of the current mean based on the previous EWMA.

The EWMA for the i th subgroup can also be written as

E_{i}=r {\textstyle \sum_{j=0}^{i-1}}(1-r)^j \overline{X}_{i-j}
 +(1-r)^iE_{0}

which expresses the EWMA as a weighted average of past subgroup means, where the weights decline exponentially, and the heaviest weight is assigned to the most recent subgroup mean.

Central Line

By default, the central line on an EWMA chart indicates an estimate for \mu, which is computed as
\hat{\mu}=\overline{\overline{X}} = \frac{n_{1}\bar{X_{1}} +  ...  + n_{N}\bar{X_{N}}}
 {n_{1} +  ...  + n_{N}}
If you specify a known value (\mu_{0}) for \mu,the central line indicates the value of \mu_{0}.

Control Limits

You can compute the limits in the following ways:

The following table presents the formulas for the limits:

Table 20.19: Limits for an EWMA Chart
Control Limits
LCL = lower limit = \overline{\overline{X}}-k\hat{\sigma}r\sqrt{
 {\textstyle \sum_{j=0}^{i-1}}(1-r)^{2j}/n_{i-j} }
UCL = upper limit = \overline{\overline{X}}+k\hat{\sigma}r\sqrt{
 {\textstyle \sum_{j=0}^{i-1}}(1-r)^{2j}/n_{i-j} }

Probability Limits
LCL = lower limit = \overline{\overline{X}}-\Phi^{-1}(1-\alpha /2)\hat{\sigma}r\sqrt{
 {\textstyle \sum_{j=0}^{i-1}}(1-r)^{2j}/n_{i-j} }
UCL = upper limit = \overline{\overline{X}}+\Phi^{-1}(1-\alpha /2)\hat{\sigma}r\sqrt{
 {\textstyle \sum_{j=0}^{i-1}}(1-r)^{2j}/n_{i-j} }

These formulas assume that the data are normally distributed. If standard values \mu_{0} and \sigma_{0} are available for \mu and \sigma, respectively, replace \overline{\overline{X}} with \mu_{0} and \hat{\sigma}with \sigma_{0} in Table 20.19. Note that the limits vary with both ni and i.

If the subgroup sample sizes are constant (ni=n), the formulas for the control limits simplify to

{\rm LCL} = \overline{\overline{X}}-k\hat{\sigma}\sqrt{r(1-(1-r)^{2i})/n(2-r) }

{\rm UCL} = \overline{\overline{X}}+k\hat{\sigma}\sqrt{r(1-(1-r)^{2i})/n(2-r) }

Consequently, when the subgroup sample sizes are constant, the width of the control limits increases monotonically with i. For probability limits, replace k with \Phi^{-1}(1-\alpha/2)in the previous equations. Refer to Roberts (1959) and Montgomery (1996).

As i becomes large, the upper and lower control limits approach constant values:

{\rm LCL} = \overline{\overline{X}}-k\hat{\sigma}\sqrt{r/n(2-r) }

{\rm UCL} = \overline{\overline{X}}+k\hat{\sigma}\sqrt{r/n(2-r) }

Some authors base the control limits for EWMA charts on the asymptotic expressions in the two previous equations. For asymptotic probability limits, replace k with \Phi^{-1}(1-\alpha/2)in these equations. You can display asymptotic limits by specifying the ASYMPTOTIC option.

Uniformly weighted moving average charts and exponentially weighted moving average charts have similar properties, and their asymptotic control limits are identical provided that

r=2/(w+1)

where w is the weight factor for uniformly weighted moving average charts. Refer to Wadsworth and others (1986) and the ASQC Glossary and Tables for Statistical Quality Control (1983).

You can specify parameters for the EWMA limits as follows:


Choosing the Value of the Weight Parameter

Various approaches have been proposed for choosing the value of r.


Average run lengths for two-sided EWMA charts are shown in Table 20.20, which is patterned after Table 1 of Crowder (1987a,b). The ARLs were computed using the EWMAARL DATA step function (see "EWMAARL Function" for details on the EWMAARL function). Note that Crowder (1987a,b) uses the notation L in place of k and the notation \lambda in place of r.

You can use Table 20.20 to find a combination of k and r that yields a desired ARL for an in-control process (\delta=0) and for a specified shift of \delta. Note that \delta is assumed to be standardized; in other words, if a shift of \Delta is to be detected in the process mean \mu, and if \sigma is the process standard deviation, you should select the table entry with

\delta=\Delta/(\sigma/\sqrt{n})

where n is the subgroup sample size. Thus, \delta can be regarded as the shift in the sampling distribution of the subgroup mean.

For example, suppose you want to construct an EWMA scheme with an in-control ARL of 90 and an ARL of 9 for detecting a shift of \delta=1. Table 20.20 shows that the combination r=0.5 and k=2.5 yields an in-control ARL of 91.17 and an ARL of 8.27 for \delta=1.

Crowder (1987a,b) cautions that setting the in-control ARL at a desired level does not guarantee that the probability of an early false signal is acceptable. For further details concerning the distribution of the ARL, refer to Crowder (1987a,b).

In addition to using Table 20.20 or the EWMAARL DATA step function to choose a EWMA scheme with desired average run length properties, you can use them to evaluate an existing EWMA scheme. For example, the "Getting Started" section of this chapter contains EWMA schemes with r=0.3 and k=3. The following statements use the EWMAARL function to compute the in-control ARL and the ARLs for shifts of \delta=0.25and \delta=0.5:

   data arlewma;
      arlin = ewmaarl(  0,0.3,3.0);
      arl1  = ewmaarl(.25,0.3,3.0);
      arl2  = ewmaarl(.50,0.3,3.0);
   run;

The in-control ARL is 465.553, the ARL for \delta=.25 is 178.741, and the ARL for \delta=.5 is 53.1603. See Example 20.5 for an illustration of how to use the EWMAARL function to compute average run lengths for various EWMA schemes and shifts.

Table 20.20: Average Run Lengths for Two-Sided EWMA Charts

  r (weight parameter)
k\delta0.050.100.250.500.751.00
        
2.00.00127.5373.2838.5626.4522.8821.98
2.00.2543.9434.4924.8320.1218.8619.13
2.00.5018.9715.5312.7411.8912.3413.70
2.00.7511.649.367.627.297.869.21
2.01.008.386.625.244.915.266.25
2.01.256.565.133.963.593.764.40
2.01.505.414.203.192.802.843.24
2.01.754.623.572.682.292.262.49
2.02.004.043.122.321.951.882.00
2.02.253.612.782.061.701.611.67
2.02.503.262.521.851.511.421.45
2.02.752.992.321.691.371.291.29
2.03.002.762.161.551.261.191.19
2.03.252.562.031.431.181.131.12
2.03.502.391.931.321.121.081.07
2.03.752.261.831.241.081.051.04
2.04.002.151.731.171.051.031.02
        
2.50.00379.09223.35124.1891.1782.4980.52
2.50.2573.9866.5959.6658.3361.0765.77
2.50.5026.6323.6323.2827.1633.2641.49
2.50.7515.4112.9511.9613.9618.0524.61
2.51.0010.798.757.528.2710.5714.92
2.51.258.316.605.395.526.759.46
2.51.506.785.314.184.034.656.30
2.51.755.754.463.433.143.434.41
2.52.005.003.862.922.572.673.24
2.52.254.433.422.562.182.172.49
2.52.504.003.072.291.901.832.00
2.52.753.642.802.081.691.591.67
2.53.003.362.571.911.521.411.45
2.53.253.122.391.771.391.291.29
2.53.502.922.241.641.281.191.19
2.53.752.742.131.521.201.131.12
2.54.002.582.041.421.131.081.07
        
3.00.001383.62842.15502.90397.46374.50370.40
3.00.25133.61144.74171.09208.54245.76281.15
3.00.5037.3337.4148.4575.35110.95155.22
3.00.7519.9517.9020.1631.4650.9281.22
3.01.0013.5211.3811.1515.7425.6443.89
3.01.2510.248.327.399.2114.2624.96
3.01.508.266.575.476.118.7214.97
3.01.756.945.454.344.455.809.47
3.02.006.004.673.623.474.156.30
3.02.255.304.103.112.843.164.41
3.02.504.763.672.752.412.523.24
3.02.754.323.322.472.102.092.49
3.03.003.973.052.261.871.792.00
3.03.253.672.822.091.691.571.67
3.03.503.422.621.951.531.411.45
3.03.753.222.451.841.411.291.29
3.04.003.042.301.731.311.201.19
        
3.50.0012851.04106.42640.162227.342157.992149.34
3.50.25281.09381.29625.78951.181245.901502.76
3.50.5053.5864.72123.43267.36468.68723.81
3.50.7525.6225.3338.6888.70182.12334.40
3.51.0016.6514.7917.7135.9778.05160.95
3.51.2512.3610.3710.4817.6437.1581.80
3.51.509.868.007.2510.1919.6343.96
3.51.758.226.545.526.7011.4624.96
3.52.007.075.554.474.867.3314.97
3.52.256.214.833.773.785.089.47
3.52.505.554.293.283.103.766.30
3.52.755.033.872.912.632.944.41
3.53.004.603.542.632.302.403.24
3.53.254.253.262.412.052.032.49
3.53.503.953.032.231.851.762.00
3.53.753.702.842.101.691.561.67
3.54.003.472.661.991.551.401.45

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.