Ind. Eng. Chem. Res. 2008, 47, 405-411
405
Exponentially Weighted Moving Average (EWMA) Control Charts for Monitoring an Analytical Process Polona K. Carson* and Arthur B. Yeh Department of Applied Statistics and Operations Research, Bowling Green State UniVersity, Bowling Green, Ohio 43403
The exponentially weighted moving average (EWMA) control chart is very effective in detecting small shifts in process mean or variance, but so far has not been well presented in the field of analytical chemistry. The main difference from the Shewhart chart is that the EWMA chart combines current data with historical observations by essentially taking a weighted average with weighting factor w of the most current sample observations and historical observations. We show that the EWMA chart with 0.05 < w < 0.20 is more effective in detecting small shifts in mean and variance than the Shewhart chart. In addition, the EWMA chart can also be used to forecast the observation in the next period, which can help analysts take preventive actions before process departures to the out-of-control state. Another advantage of using the EWMA chart is its good performance for observations that are not normally distributed or are autocorrelated. Introduction Analytical laboratories need to have procedures for internal quality control and verification of their results. One commonly used method to monitor the stability of an analytical process is the control chart. Besides monitoring the stability of the analytical process, control charts are powerful tools for analytical system improvement. The most widely used control charts in analytical laboratories are the Shewhart charts, which can be used to monitor the mean value or precision of an analytical process. There are several guidelines offered by ISO standards and EPA documents that provide theoretical background. A detailed description with graphical examples from analytical chemistry can be found in Miller and Miller1 and Mullins.2 Control charts are graphical presentations of the sample statistics for chemical parameters measured in control samples. Three horizontal lines, the center line and two control limits, are plotted on a control chart, which correspond to the target value and three standard deviations distance from either side of the target value, respectively. Analytical chemists often plot two additional lines, known as the warning limits. Commonly, the target value is the mean value of the analyte (µ) in the control sample, the warning limits are µ ( 2σ, and the action or control limits are µ ( 3σ, where σ is the population standard deviation of the plotting statistics. When the plotting statistics falls outside the action limits, the process is deemed to be out of control. If this happens, the process needs to be stopped and inspected for causes. There are also other rules that can be applied to detect shifting of the process to out-of-control states, such as the ones reported by Mullins:2 seven consecutive measurements below or above the center line; any evident nonrandom pattern; two consecutive measurements plotted outside the warning limits, but inside the action limits. It is very important that the process is in-control when control chart parameters are defined. The phase of estimating the control chart parameters is called phase 1.3 This is an exploratory phase * To whom correspondence should be addressed at P&J Carson Consulting, LLC., 865 S. Cory St., Findlay, OH 45840. Tel.: (419) 423-9316. Fax: (419) 420-6006. E-mail:
[email protected].
in which one needs to obtain enough data to be assured of the stability of the process. Mullins2 explains the process of reassessing the data by plotting the control chart once the center line and control limits are estimated. He suggests evaluating the control chart by applying the rules presented earlier, identifying any out-of-control signals, and dropping these data if there is an assignable cause for any out-of-control signals. Further, Mullins2 highlights the difficulty of deciding what to do with the out-of-control data when we cannot define the underlying reason for an out-of-control signal. Sometimes these data are removed during phase 1. He also mentions that there is no reason for control charts to “look nice” since analytical chemistry processes are random processes. Alternatively, Mullins2 suggests making a lot of notes on the chart about the process observations and actions taken. This information can help analysts learn a great deal about the behavior of the process and reasons for its getting out of control. Similar to common practices, Mullins2 suggests that control limits need to be revised once they are in routine use to monitor the stability of the process. Miller and Miller1 imply that the drift of the mean away from the target value might be the reason for sample means falling out of control. This can also happen due to an increase in variation. Miller and Miller1 and Mullins2 both present the range (R) chart as a tool to monitor variation. However, Mullins2 claims that although R-charts are easier to calculate and therefore more likely to be used, there are some advantages of using standard deviation (s) charts instead. The main advantage of the s-chart is that standard deviations of duplicate measurements on different test materials can be combined. According to Mullins,2 charts based on combined standard deviations are more powerful to detect shifts in analytical precision. The main drawback of Shewhart control charts is that they ignore past information about the process when a new point is plotted. Consequently, they are not effective in detecting small shifts ( 1, let sj2 represent the sample variance of the jth sample. In this case, we can plot the EWMA chart for sj2, sj, or log(sj). For sample size n ) 1, if the process mean does not change over time, we can estimate the exponentially weighted mean squared error (EWMS) for sample j as follows:9
ej2 ) w(xj - µ0)2 + (1 - w)sj-12,
e02 ) σ02
(6)
To plot the EWMS chart, we first calculate (xj - µ0)2 for each sample j, and plot the EWMA for these quantities. When the process mean is not stable, we can account for a possible mean shift in eq 6 by replacing the mean µ0 with the EWMA of the observations (zj). The modified chart, called an exponentially weighted moving variance (EWMV) chart, is defined as9
Vj2 ) w(xj - zj)2 + (1 - w)zj-12
(7)
To plot an EWMV chart, we first take z0 ) µ and express zj as follows:
zj ) λxj + (1 - λ)zj-1
(8)
Next, we calculate (xj - zj)2 for each sample j, and plot the EWMA chart for these quantities. In Figure 5a, the statistic ej2 is plotted against the sampling sequence, while in Figure 5b, Vj2 is plotted against j. We used the same data as were used to create Figure 4. From Figure 5, we can see that there are seven out-of-control observations (8-14) on the EWMS chart, which assumes that the process mean is in-control. In contrast, when an EWMV chart is used, which assumes that there may be a shift in the process mean, four out-of control observations (10-13) are detected. Referring to Figure 4c,d, we can see that the shift in the process mean was detected at periods 8-9 and 12-20 (22). Therefore, the EWMS chart presents false alarms for this process at observations 8, 9, and 14, while the EWMV chart is more appropriate for this process. Discussion and Conclusions The main idea of implementing EWMA control charts in quality control of analytical processes is to detect small shifts in the mean and variance earlier than with the commonly used
410
Ind. Eng. Chem. Res., Vol. 47, No. 2, 2008
Figure 4. Comparison of Shewart, simple moving average, and EWMA charts for mean value.
Figure 5. EWMA charts for variation.
Shewhart control charts. By introducing a weighting factor w, the EWMA charts combine current and historical observations in such a way that small changes in the mean are magnified and consequently easier to detect. However, it needs to be noted
that the performance of the EWMA chart depends on the factor w. For larger w, the EWMA chart performs similarly to the Shewhart chart. In contrast, when 0.05 < w < 0.20, the EWMA chart more efficiently detects smaller shifts. This was presented in examples shown in Figures 2, 4, and 5. The EWMA chart with properly chosen w can be efficiently used to forecast the observation in the next time period. Analysts can plot this forecast in the control chart and visualize possible departures from expected behavior even before they actually occur. This allows analysts to take actions such as rechecking the performance of the equipment and the quality of reagents, and making adjustments to avoid further process changes that can result in out-of-control observations. In this case, preventive and corrective actions can reduce costs due to repeating expensive analysis. Another advantage of using the EWMA chart is its good performance for observations that are not normally distributed or are autocorrelated. A well-designed EWMA chart with carefully chosen w and L values will perform better than the Shewhart chart when observations are not normally distributed. A successful strategy to deal with autocorrelated data is to construct the EWMA chart for model residuals and plot it parallel to the EWMA chart for observations in order to link information presented in the chart for residuals to the process. The EWMA chart can also be very effective in monitoring process variation. However, when monitoring variation, analysts need to be aware that they need to choose the right type of chart depending on whether the process mean is stable or may change. When the process mean may change, the EWMV chart performs better. The EWMA charts can be extended to multivariate analytical processes, such as mass spectroscopy or chromatography, where several chemical parameters are measured simultaneously. In general, there are two approaches to monitoring the quality of
Ind. Eng. Chem. Res., Vol. 47, No. 2, 2008 411
a multivariate process. One approach is to assume that variables in a multivariate process are independent and to plot a set of univariate control charts, one for each variable. However, this procedure has many drawbacks, because variables in a multivariate process tend to be correlated. The second approach is to use multivariate statistical methods and construct a multivariate control chart for the sample mean vector. The most commonly used measure for observing changes in the sample mean vector is Hotteling’s T2.10 Several researchers11-14 have studied multivariate EWMA charts based on either Hotteling’s T2 or residuals with regression adjustment. However, these procedures are very complex and are beyond the scope of this paper. Some further research would be worthwhile to investigate potential applications of multivariate EWMA charts for monitoring analytical processes. Quality control managers (QCMs) in analytical laboratories should consider the EWMA chart as a very helpful tool for analytical processes that tend to have small shifts such as process drifts. By using historical data, QCMs can evaluate the economic value of the EWMA chart implementation. Since the EWMA charts tend to detect small shifts earlier than the Shewhart charts, the quality of the produced analytical data will be higher when using the EWMA chart. However, for good laboratory quality practice it is recommended that both the Shewhart and the EWMA charts be applied to monitor processes in order to effectively cover both large and small shifts in the process mean. Acknowledgment We gratefully acknowledge the comments of John H. Carson, Guy Gallello, Frank Eidson, and Steve Windslow on an earlier draft of the manuscript which were very helpful in improving this paper.
Literature Cited (1) Miller, J. C.; Miller, J. N. Statistics for Analytical Chemistry, 3rd ed.; Prentice Hall: New York, 1993. (2) Mullins, E. Statistics for the Quality Control Laboratory; The Royal Society of Chemistry: Cambridge, 2003. (3) Montgomery, D. C. Introduction to Statistical Quality Control, 5th ed.; Wiley: New York; 2005. (4) Meier, P. C.; Zu¨nd, R. E. Statistical Methods in Analytical Chemistry, 2nd ed.; Wiley: New York, 2000. (5) Neubauer, A. S. The EWMA Control Chart: Properties and Comparison with other Quality Control-Chart Procedures by Computer Simulations. Clin. Chem. 1997, 43, 594. (6) Linnet, K.; The Exponentially Weighted Moving Average (EWMA) Rule Compared with Traditionally used Quality Control Rules. Clin. Chem. Lab. Med. 2006, 44, 396. (7) Westgard, J. O.; Barry, P. L.; Hunt, M. R. A Multi-rule Shewhart Chart for Quality Control in Clinical Chemistry. Clin. Chem. 1981, 27, 493. (8) Lucas, J. M.; Saccucci, M. S. Exponentialy Weighted Moving Average Control Schemes: Properties and Enhancements. Technometrics 1990, 32, 1. (9) MacGregor, J. F.; Harris, T. J. The Exponentialy Weighted Moving Variance. J. Qual. Technol. 1993, 25, 106. (10) Hotteling, H. In Techniques of Statistical Analysis; Eisenhart, C., Hastay, M. W., Wallis, W. A., Eds.; McGraw-Hill: New York, 1947; p 111. (11) Lowry, C. A.; Montgomery, D. C. A Review of Multivariate Control Charts. IIE Trans. 1995, 27, 800. (12) Lowry, C. A.; Woodall, W. H.; Champ, C. W.; Rigdon, S. E. A Multivariate Exponentially Weighted Moving Average Control Chart. Technometrics 1992, 34, 46. (13) Prabhu, S. S.; Runger, G. C. Designing a Multivariate EWMA Control Chart. J. Qual. Technol. 1997, 29, 8. (14) Hawkins, D. M. Multivariate Quality Control Based on Regression Adjusted Variables. Technometrics 1991, 33, 61.
ReceiVed for reView April 25, 2007 ReVised manuscript receiVed October 20, 2007 Accepted October 24, 2007 IE070589B