The performance of control charts with economic-statistical design when parameters are estimated

Purpose – This paper presents economic and economic – statistical designs of the adaptive exponentially weighted moving average (AEWMA) control chart for monitoring the process mean. It also aims to compare the effect of estimated process parameters on the economic performance of three charts, which are Shewhart, exponentially weighted movingaverage andAEWMAcontrol charts with economic – statisticaldesign. Design/methodology/approach – The optimal parameters of the control charts are obtained by applying the Lorenzen and Vance ’ s (1986) cost function. Comparisons between the economic – statistical and economic designs of the AEWMA control chart in terms of expected cost and statistical measures are performed. Also, comparisons are made between the economic performance of the three competing charts in termsof theaverage expected cost andstandarddeviationof expected cost. Findings – This paper concludes that taking into account the economic factors and statistical properties in designing the AEWMA control chart leads to a slight increase in cost but in return the improvement in the statistical performance is substantial. In addition, under the estimated parameters case, the comparisons reveal that from the economic point of view the AEWMA chart is the most ef ﬁ cient chart when detecting shiftsof different sizes. Originality/value – The importance of the study stems from designing the AEWMA chart from both economic and statistical points of view because it has not been tackled before. In addition, this paper contributes to the literature by studying the effect of the estimated parameters on the performance of control chartswith economic – statistical design.


Introduction
The control chart technique is considered one of the important tools in statistical quality control. A main objective of control charting is to detect any deterioration in quality so that the corrective action can be taken before producing a large quantity of nonconforming items. The concept of the control chart was initially introduced in 1924 by Walter A. Shewhart. Shewhart control charts are more efficient in detecting large shifts in process parameters, as they depend only on the information in the last sample observation. On the other hand, these charts are ineffective in detecting small parameter shifts. For this reason (Roberts, 1959) introduced the exponentially weighted moving average (EWMA) control chart which is an excellent alternative to the Shewhart control chart when we are interested in detecting small shifts more quickly. However, this chart cannot be designed to detect small and large shifts simultaneously. Thus, a new class of control charts has been presented in which the chart's design parameters can be changed in an adaptive way. These charts are called adaptive control charts and it has been shown that these control charts are more efficient than the fixed design parameters control charts in detecting different magnitudes of shifts. The adaptive exponentially weighted moving average (AEWMA) control chart is one of these charts. It was introduced by Capizzi and Masarotto (2003) for monitoring the process mean. Based on the size of the difference between the current observation and the previous chart statistic, the AEWMA chart adapt the weight of the previous observations in order to detect efficiently shifts of different sizes.
To design a control chart, three parameters should be determined, which are the sample size n, the sampling interval between samples h, and the control limits. Usually, these parameters are selected according to statistical criteria only such as the average number of samples taken until a signal is given which called the average run length (ARL). However, the design of a control chart should reflect economic consequences, such as the costs of sampling, the costs of correcting the assignable cause, and the costs of production of nonconforming units. These costs are reflected by the design of the control chart from an economic viewpoint. Statistical design of control charts, on the other hand, does not take the economic dimensions into account explicitly. For this reason (Duncan, 1956) presented the economic design of the Shewhart X -chart, in which the chart's parameters are determined based on minimizing the expected cost function.
The economic design of different control charts has been considered by many authors. (Montgomery, 1980;Ho and Case, 1994) gave reviews of the literature of economic designs of various control charts. In 1986, a method for economically designing of control charts are presented by Lorenzen and Vance. This method determines the optimal design parameters which minimize the expected cost per hour for the quality cycle. It can be applied to all types of control charts. Based on (Lorenzen and Vance's, 1986) cost function, (Torng et al., 1994) were considered the economic design of the EWMA control chart. Also, economic designs of some adaptive control charts had been presented in several articles, such as (De Magalhães et al., 2001;Park et al., 2004;Chou et al., 2008).
Some researchers have concluded that the economic design of a control chart usually leads to poor statistical performance. For example, (Woodall, 1986) noted that in most of economically designed control charts the Type I error probability, which is usually referred to as the probability of a false alarm in the literature, is much higher than that of statistically designed control charts. As a result, practitioners may lose confidence in the performance of the control chart design. Therefore, (Saniga, 1989) introduced an economic-statistical design approach. According to this approach, the expected cost function is minimized subject to some statistical constraint to determine the control chart's parameters.
The speed of detection of a shift in the process parameter determines the efficiency of the control chart, which can be measured in terms of the ARL. Thus, the choice of the statistical constraint depends on designing the control chart to have a large in-control ARL value before the chart signals when the process is in control and to have small out-of-control ARL value when a shift in one or more of the process' parameters is present. In Montgomery et al. (1995), presented the economic-statistical design of the EWMA control chart. They used a program developed by Torng et al. (1995) to solve the optimization problem. Furthermore, the economic-statistical designs of other control charts were studied in the literature, Performance of control charts (Prabhu et al., 1997;De Magalhães et al., 2002;Lu et al., 2013;Seif et al., 2015;Costa and Fichera, 2017;Lee and Khoo, 2018). In general, there are two phases of control charting with two different objectives; Phase I and Phase II. In Phase I, when the process parameters are unknown, they are estimated based on m in-control samples each of size n. On the other hand, the main objective of Phase II is monitoring the process to quickly detect shifts in the process parameters.
Many researchers have studied the effect of the estimated parameters on the performance of control charts with pure statistical design (Quesenberry, 1993;Jones et al., 2001;Saleh et al., 2013). All these papers depended only on the average of ARL (AARL) metric. However, using different Phase I data in estimating the unknown parameters leads to variability in the ARL between the practitioners. Thus, (Jones and Steiner, 2012) discussed the importance of using the standard deviation of ARL (SDARL) as a metric in investigating the performance of control charts with estimated parameters to reflect the variability between the practitioners. Since then, several authors used the SDARL metric to study the effect of the estimation on the statistical performance of control charts (Zhang et al., 2013;Lee et al., 2013;Aly et al., 2014;Saleh et al., 2015)].
In the unknown parameters case, the cost of the economic-statistically design chart is also a random variable due to using different data by the practitioners. Therefore, to study the consequences of parameter estimation on the economic performance of these charts, one should consider both the average and standard deviation of the cost distribution. In our paper we investigate the economic performance of three charts when parameters are estimated in terms of the average and standard deviation of the expected cost, as well as some percentiles for the cost distribution. These are the Shewhart, EWMA, and AEWMA control charts with economic-statistical design. As mentioned before, only the economicstatistical designs of Shewhart and EWMA charts are presented in literature. Thus, we develop the economic-statistical design of the third chart, i.e. the AEWMA chart. Then we compare the economic performance of the three charts in terms of expected cost distribution parameters.
The rest of this paper is organized as follows. In Section 2, a brief description of the competing charts is given. Then, in Section 3, we present the economic-statistical design of the competing charts, in addition to a numerical example to illustrate the use of the new design of the AEWMA chart. Comparisons between the economic performance in the unknown parameters case for the Shewhart, EWMA and AEWMA charts are presented in Section 4. Finally, conclusions are given in Section 5.

Competing charts
In this section, the three competing charts used in this paper, which are Shewhart, EWMA, and AEWMA charts are presented. Let X be the quality characteristic of interest which is assumed to follow the normal distribution with mean m and standard deviation s . To set up a control chart, samples are drawn at certain time interval, say every h hours, then sample statistics are calculated and plotted on the control chart. When the calculated sample statistic encroaches the upper control limit (UCL) or the lower control limit (LCL), the chart signals and the process is considered out-of-control.

Shewhart chart
Let X be a sample average which is the sample statistic plotted in the chart. Then the UCL and LCL of the Shewhart control chart are m X À L s X , where m X and s X are the expectation and standard deviation of X , respectively, and L represents the distance of the REPS 6,2 control limits from the center line, expressed in standard deviation units. The value of L is determined in order to attain a certain in-control ARL.
As mentioned before, the main disadvantage of a Shewhart control chart is that it depends only on the information derives from the last sample observation about the process and eliminates any other information derives from the previous observations. This feature makes the Shewhart control chart more efficient in detecting large shifts in process parameters, but not as good in detecting small process shifts.

Exponentially weighted moving average chart
The chart statistic Z i for the EWMA chart at the i th sampling instant is given by: where Z 0 ¼ m 0 and l is a suitable constant such that 0 < l # 1 and usually called smoothing or weighting parameter which determines the extent to which previous samples affect the current value of the chart statistic. According to this chart, to detect small shifts, small values of l should be used. Note that Shewhart chart can be viewed as a special case from the EWMA chart by setting l = 1. The asymptotic control limits m X 6Ls X ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi l = 2 À l ð Þ p are usually used in practice. Therefore, when Z i is outside these limits, the process is considered to be out of control.
Although the EWMA control chart can be designed to detect either small or large shifts, it cannot detect both shifts simultaneously (Lucas and Saccucci, 1990). In addition, (Yashchin, 1987) studied the "inertia problem" for the EWMA chart. This problem happens when the chart statistic is near UCL or LCL and a sudden change takes place in the other direction. In such case, the difference between the statistic and the real current level of the process can be very large. Thus, reaching the opposite control limit in order to give a signal will take a very long time. (Woodall and Mahmoud, 2005) proved that the EWMA chart can build up a large amount of inertia particularly for the small values of the smoothing parameter.

Adaptive exponentially weighted moving average chart
This chart can be viewed as a smooth combination of the previous two charts. Based on the difference size between the current observation and the previous chart statistic, this chart can adapt the weight of the previous observations. Therefore, it has the ability to detect in balance small and large shifts and in the same time it does not largely affected by the inertia problem. The statistic used in this chart is as follows: is the difference between the current observation X i and the previous statistic Y i-1 (i.e. e i ¼ X i À Y iÀ1 ), and U(e i ) is a score function. If e i = 0, the AEWMA chart statistic can be rewritten as follows: where U(e i ) is a score function which is monotonically increasing in e i , U(e i ) is an odd function, i.e U(e i ) = -U(-e i ), and U(e i ) % l e i when the absolute value of e i is small.

Performance of control charts
These modifications have been introduced to obtain a chart statistic that behaves like an EWMA chart when the absolute value of e i is large and like a Shewhart chart otherwise.
For the sake of simplicity, (Capizzi and Masarotto, 2003) suggested the following function, which called Huber's score function and satisfies the aforementioned conditions: where l and k are suitable constants such that 0 < l # 1 and k ! 0 and considered as two of the chart's design parameters. Most of the previous studies of AEWMA chart performance considered this score function, such as (Capizzi and Masarotto, 2003;Woodall and Mahmoud, 2005). It is worth to mention that this function is used also in the present paper. Whenever Y i is outside the control limits m X 6Ls X , the process is considered to be out of control, where L is a suitable constant chosen to satisfy a specified in-control ARL performance.

Economic and economic-statistical design of the control charts
This section is divided into two parts; in the first part of this section we introduce the economic and economic-statistical design of control charts in general. In the second part we introduce an economic-statistical design of the AEWMA control chart used for monitoring the process mean since it has not been introduced in previous studies.

Economic and economic-statistical design of control charts
The economic-statistical design of the control chart is defined as a design in which the cost function is minimized subject to statistical constraint. (Lorenzen and Vance, 1986) derived a unified expected cost function that can be applied to all types of control charts, regardless of the chart statistic used. It is assumed that the samples are independent and that the process starts in a state of statistical control with mean m = m 0 and the occurrence of an assignable cause in the process mean is a mean shift from m 0 to m 0 6 d s, where d is a positive constant. It is assumed also that there is only one assignable cause when a change occurs. The in-control time for the process follows an exponential distribution with a mean of 1 u where u > 0 is called the process failure rate. The process is allowed to continue during the search and/or during repair of the process.
Due to the complex form of the cost function introduced by Lorenzen and Vance (1986), many approximate methods have been presented in order to simplify it. In this paper, the approximation given by Chung (1990) is used to compute the optimal design parameters of the control chart. According to the approximation of Chung (1990), the expected cost per hour (EC) takes the following formula: where: where u = process failure rate which determines the expected time to the out-of-control shift E = time to sample and chart one item ARL 0 = average run length while process is in control ARL 1 = average run length while process is out of control T 0 = expected search time when the signal is a false alarm T 1 = expected time to discover the assignable cause T 2 = expected time to repair the process when assignable cause is discovered C 0 = cost per hour due to nonconformities produced while the process is in control C 1 = cost per hour due to nonconformities produced while the process is out of control Y = cost per a false alarm W = cost to locate and repair the assignable cause a = fixed cost per sample b = cost per unit sampled One of the economic design parameters of a control chart start is the sampling interval h. To get an explicit formula for h, first equation (1) is differentiated with respect to h, and then equated to zero; i.e. @ EC @h ¼ 0. The reader is referred to Yeong et al. (2012) for details of the derivation of h. The result of this differentiation yields h ¼ Àr 2 þ ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi r 2 2 À 4r 1 r 3 p 2r 1 ; (2) where: Let d be the set of design parameters of the control chart. The traditional model for the economic-statistical design of the Shewhart and EWMA charts is defined as: where EC (d) is the cost function associated with the parameters vector d and B 0 and B 1 are the desired bounds for the in-control and the out-of-control ARLs, respectively. Using this model, the chart parameters that satisfy the desired performance for the Shewhart and EWMA charts can be determined. In the case of Shewhart chart the vector d contains the sample size (n), control limit width (L), and sampling interval (h). However, in the case of EWMA chart, the design contains these parameters as well as the smoothing parameter (k). It should be noted that the optimal design parameters of the economic design of the control chart can be determined by omitting the statistical constraints in the above model. For example, if the cost parameters in  (u = 0.01, E = 0.05, T 0 =0, T 1 = 2, T 2 =0, C 0 =10, C 1 = 100, Y = 50, W = 25, a = 0.5, b = 0.1, g 1 = g 2 =1, m 0 =0, and s 0 =1) and the statistical constraints (B 0 =500, B 1 =65, and d = 0.1) are used in designing the EWMA chart, then the optimal design parameters of the chart are n = 10, k = 0.0233, and L = 2.3413. However, using the same cost parameters and the statistical constraints (B 0 =500, B 1 =1.5, and d = 1) in designing the Shewhart chart leads to optimal design parameters of n = 15 and L = 3.0903. Notice that the Shewhart chart is usually design to perform optimally for relatively large shifts while the EWMA chart is usually designed to perform optimally for relatively small shifts.
3.2 An economic-statistical design of the adaptive exponentially weighted moving average chart control chart used for monitoring the process mean In designing the AEWMA chart, two different shift sizes can be considered rather than only one shift size as in the case of Shewhart and EWMA charts. Thus the above REPS 6,2 economic-statistical design model which used for Shewhart and EWMA charts needed to be modified when applied to the AEWMA chart. In the case of the economicstatistical design of the AEWMA chart, the optimal design parameters are the sample size (n), smoothing parameter (k), control limit width (L), sampling interval (h) and reference parameter (k) which minimize EC in equation (1) subject to statistical constraints on the in-control ARL value.
To determine the optimal design parameters of the AEWMA control chart with reasonable performance for both small and large shifts, we propose a two-stage optimization approach similar to that suggested by Capizzi and Masarotto (2003). So, we proceed as follows: Choose a desired lower bound for the in-control ARL 0 , B 0 , and two values of the mean shift (a small shift d 1 and a large shift d 2 ). Find the parameter vector d* which is the solution of the following problem: is the cost function associated with the parameters vector d* when a shift of size d 2 is considered. Note that ARL 2 is the out-ofcontrol ARL corresponding to a shift size of d 2 and B 2 is the desired upper bound for ARL 2 . Choose a small positive constant r, where 0< r <1, and then find the optimal parameters vector d which is the solution of the following problem: 0 < k # 1, h > 0, k ! 0, and n is integer,where EC(d) and EC`(d) are the cost functions associated with the parameters vector d when shifts of sizes d 1 and d 2 are considered, respectively. Note that ARL 1 is the out-of-control ARL at shift of size d 1 and B 1 is the desired upper bound for ARL 1 . Clearly, the optimal design parameters of the economic design of the AEWMA control chart are obtained by omitting the statistical constraints in the previous procedure.
In this section a numerical example is used to illustrate the use of the economicstatistical design of the AEWMA control chart and to evaluate the proposed model and its solution. The cost parameters in this example are based on  mentioned in Section 3.1, while the statistical constraints used are (B 0 = 500, B 1 = 65, B 2 = 1.5, d 1 = 0.1 and d 2 =1). The ARL values are obtained by using a Markov chain approach as described in (Capizzi and Masarotto, 2003).
The solution procedure is carried out by using the NLPNMS subroutine in SASV R statistical software. This subroutine is based on the Nelder-Mead optimization method and Powell's Constrained Optimization BY Linear Approximations (COBLYA) method. For more details about the NLPNMS subroutine, see the SAS/IML 9.2 User's Guide (SAS Institute Inc, 2008, p. 803).

Performance of control charts
In the optimization process, to find the optimal design parameters n, k, L, h and k, the sample size is treated as a continuous variable, and the proposed procedure is applied to find the optimal value of n. Then, the nearest smaller and larger integers to the previously obtained sample size are determined. For each case, the problem is re-optimized to identify the optimal design parameters k, L, h and k, and then the design parameters which satisfy the minimum expected cost are chosen.
By applying the optimization procedure, the optimal design parameters and the expected cost are given in Tables 1 and 2 for the economic-statistical and economic designs, respectively.
In order to compare between the economic design of the AEWMA chart (ED/AEWMA) and the economic-statistical design of the AEWMA chart (ESD/AEWMA) from the economic point of view, the percentage increase (PI) in the expected cost resulting from adding the statistical constraint is used, where PI takes the following formula: From Tables 1 and 2, the PI value achieved by the economic-statistical design of the AEWMA chart for example, at the shift combinations d 1 = 0.1 and d 2 = 1 is 17.48%. Thus, it can be concluded that adding the statistical constraint leads to a small increase in the expected cost. However as shown in Tables 1 and 2 there is a substantial improvement in the statistical performance. Notice that, for example, at the shift combinations d 1 = 0.1 and d 2 = 1 the ARL 0 of the economic design is only 18.534 compared to an ARL 0 of 501.530 for the economic-statistical design. Tables 3 and 4 show the optimal design parameters of the AEWMA chart when different combinations of shifts than that in Tables 1 and 2 are considered for the economicstatistical and economic designs, respectively. The same input parameters used in Tables 1 and 2 are considered to produce the results in both tables. From these tables we can generally conclude that AEWMA charts designed to detect larger values of d 1 produce lower expected cost than those designed to detect smaller values of d 1 . In addition, it can be observed that the expected cost of the economic-statistical design is higher than that of the economic design under different shifts. The maximum PI value of the economic-statistical design of the AEWMA chart is 16.42% and it occurs at the shift combinations d 1 = 0.1 and d 2 = 1.5. While the minimum PI value is 4.29% and it occurs at the shift combinations d 1 = 0.3 and d 2 = 1.5. In general, larger shift values of d 1 or d 2 lead to wider control limits, less frequent samplings, larger reference parameter values k, and larger value of the smoothing parameter k for both economic and economic-statistical designs.

Performance comparisons under the unknown parameters case
As mentioned before, when the process parameters (m and s ) are estimated, the expected cost EC is a random variable. In such case, the evaluation of the economic performance of a chart should be evaluated through the probability distribution of EC; particularly through the average of the EC (AEC) and the standard deviation of EC (SDEC). When the in-control parameters are unknown, the estimation of the in-control process mean is done using the , where x ij represents the j th observation taken from the i th Phase I sample, i = 1, 2, 3, . . ., m. While the estimation of the process standard , S i is the standard deviation corresponding to i th Phase I sample, C 4 (.) is a tabulated constant (Montgomery, 2009) and = m(n -1). According to Jones et al. (2001) and Saleh et al. (2013), this estimator is considered the most efficient unbiased estimator for the EWMA chart as well as the AEWMA chart.
In this section, the design parameters used for the AEWMA are n = 14, k = 0.0308, L = 0.31023, and k = 3.6056, which are the optimal design parameters at pair of shifts (d 1 =0.1 and d 2 = 1). For the EWMA chart, the design parameters n = 10, k = 0.0233, and L = 2.3407  Note: For every value of shift size, the first value is the AEC, and the value between brackets is the SDEC Note: For every value of shift size, the first value is the AEC, and the value between brackets is the SDEC Note: For every value of shift size, the first value is the AEC, and the value between brackets is the SDEC Performance of control charts are used, which are optimal for the shift of size d = 0.1. However, n = 15 and L = 3.09024 are the optimal parameters of the Shewhart X at shift of size d = 1. Notice that the value of L for each chart is slightly different from that given in Section 3 in order to produce exactly an incontrol ARL of 500. In our study, the comparison between the competing charts is based on a standardized shift (d) of size (0.5, 1, 2, 3, 4, or 5) and different values of m, ranging from 20 to 1100. Tables 5-7 show the values of the AEC and SDEC corresponding to different shifts at different values of m for the three competing charts; Shewhart, EWMA, and AEWMA charts, respectively. The last row represents the values of expected cost in the known parameters case. In these tables, the values are obtained using simulation with 20,000 replications.
As shown in these tables, as m increases, the values of the AEC measure decrease and converge the costs in case of known parameters. This can be observed for the three charts. Moreover, it can be noted that at the shifts of size less than or equal 2, the EWMA chart has the best performance in the sense of having lowest AEC values, followed by the AEWMA chart and then the Shewhart X chart. On the other hand, by comparing the economic performance of the three considered charts at the shifts of size greater than or equal 3, it is found that Shewhart chart is better in terms of the AEC measure followed by the AEWMA chart and then the EWMA chart.
Furthermore, by considering the SDEC measure, it can be observed that at the size shift less than or equal 3, the EWMA chart has SDEC values less than that of the AEWMA chart. While the Shewhart chart has the lowest SDEC values at large values of the shift. Therefore, it can be concluded that the AEWMA chart provides a balance between the economic performance at small and large shifts. Thus, from the economic point of view, the most efficient chart to detect different shift sizes is the AEWMA chart.
Moreover, a histogram for the simulated values of the expected cost is used to study to what extent the m affecting the distribution of the EC for the AEWMA chart. For example, from Figure 1, we can see that the distribution of the expected cost is clearly skewed to the right when 20 samples are used to estimate the parameters at a shift of size 0.5. This observation is confirmed in Table 8, since the expected cost value would be between 24.170 and 39.062 and between 24.053 and 48.166 for 80% and 90% of the practitioners, respectively, at m = 20. In addition, the minimum value of expected cost is 23.564, while the maximum is 80.781.
More information is provided by the visual diagnostic presented in Figures 1-4. These figures show that the higher m, the lower skewness of the expected cost distribution. This is also confirmed in Table 8, where the expected cost value would be between 25.512 and 26.886 and between 25.375 and 27.140 for 80% and 90% of the practitioners, respectively, using m = 1100. In addition, the minimum value of expected cost increased to 24.755, while the maximum decreased to 29.647. It is worth to mention that this analysis was done using Performance of control charts various shift sizes for the three considered charts. The results are not shown here. However, the general conclusions obtained from the previous example considered are also supported through these results.

Conclusions
This paper proposes a procedure to obtain the optimal design parameters of the economic and economic-statistical designs of the AEWMA control chart for controlling process mean. In order to illustrate the applicability of this procedure and to show how the optimal design parameters of the AEWMA chart can be obtained, a numerical example is introduced. Comparisons between the optimal economic-statistical and the optimal economic designs in terms of cost and statistical performance are made. Theses comparisons reveal that adding the statistical constrains leads to a slight increase in the expected cost. However, the improvement in the statistical performance is substantial in return. Moreover, in this paper, comparisons are made between the economic performance of the AEWMA, EWMA and Shewhart charts in terms of the AEC and standard deviation of expected cost. In general, it is evident from these comparisons that a balanced performance can be obtained from the AEWMA chart at small and large shifts. Thus, from the economic point of view the AEWMA chart is the most efficient chart when we are interested in detecting shifts of different sizes.