A STUDY OF THE MEDIAN RUN LENGTH ( MRL ) PERFORMANCE OF THE EWMA t CHART FOR THE MEAN

The exponentially weighted moving average (EWMA) X chart is effective in detecting small shifts. However, the EWMA X chart is not robust enough to prevent errors in estimating the process standard deviation or a changing standard deviation. To overcome this problem, Zhang et al. suggested the EWMA t chart in 2009. The existing optimal design of the EWMA t chart is based on the average run length (ARL) criterion. This paper proposes that the optimal design of the EWMA t chart be based on the median run length (MRL). The MRL performances of the optimal EWMA X and optimal EWMA t charts are compared.

In the application of the EWMA X chart, the process standard deviation is usually assumed to be well estimated, and does not change.Unfortunately this is not always the case in practice [20].Therefore Zhang et al. [20] proposed the EWMA t chart to overcome this problem, by showing that the EWMA t chart is more robust than the EWMA X chart in preventing estimation errors or changes in the process standard deviation.In addition, it was shown that the EWMA t chart always has a lower size of the Type II error than the EWMA X chart for mean shifts a[0, 0.5] when the charts are optimally designed for a quick detection of moderate and large shifts (see Figure 7 in Zhang et al. [20]).However, when the two charts are optimally designed for a quick detection of small shifts, the EWMA X chart has a slightly lower size of the Type II error than the EWMA t chart, but the difference is very small -for mean shifts a[0, 0.5] (again, see Figure 7 in [20]).
In most situations, the average run length (ARL) or the median run length (MRL) is used to measure a chart's performance.The ARL and MRL are defined as the average and median number of sample points that are plotted on a chart before an out-of-control signal is issued.The ARL is more commonly used than the MRL in measuring a chart's performance.This is due to the relative difficulty in computing the run length distribution.Furthermore, the run length distribution is nearly geometric; hence the run length distribution can be characterised by its average, i.e. the ARL [21,22].
Interpretations based on ARL alone can be misleading, as the in-control run length distribution of a control chart is highly skewed.The interpretations become more difficult as the shape of the run length distribution changes according to the magnitude of the shift [21,22].On the other hand, when using the MRL this interpretation problem will not occur.For example, even though the in-control ARL of the Shewhart X chart with ±3 standard deviations width is 370, the fact is that 60% to 70% of the run lengths will be less than 370.In fact, 50% of the run lengths will be less than 257, which is the in-control MRL.Thus in using the ARL as a performance measure, a practitioner may have an incorrect understanding that half the time, an out-of-control will be signaled by the 370 th sample when the process is in-control; although in an actual situation, an out-of-control will be given by the 370 th sample 60-70 percent of the time.In fact, the in-control MRL of 257 indicates that half the time (or 50%), an out-of-control signal is issued by the 257 th sample [23].The MRL provides a more meaningful interpretation for the in-control and out-ofcontrol performances of a chart, and is readily understood by quality practitioners, as it gives the probability of a signal by a certain number of samples.In contrast, the ARL only provides the average number of samples to signal, which does not provide any probabilistic measure of the time to signal.Charts that are optimally designed based on MRL were presented by Gan [21,22] and Khoo et al. [24].
The EWMA t chart proposed by Zhang et al. [20] is optimally designed when based on the ARL alone.Thus this paper studies the MRL performance of the EWMA t chart, and also provides an optimal design procedure, based on the MRL and the computed optimal parameters of the chart.The MRL performances of the EWMA t and EWMA X charts are compared.The objective of this study is to facilitate the work of quality practitioners in selecting the optimal parameters of the EWMA t chart, whose design is based on MRL.This paper is organised as follows: Section 2 presents the EWMA X chart.The EWMA t chart is given in Section 3. In Section 4, the Markov chain approach in computing the MRLs of the EWMA t and EWMA X charts is discussed.The optimal design procedure for the EWMA t and EWMA X charts, based on the MRL, is described in Section 5.An illustrative example is provided in Section 6. Section 7 compares the MRL performances of the EWMA t and EWMA X charts.Conclusions are drawn in Section 8.

THE EWMA
, ,..., are taken at time i =1,2, …, where n is the sample size.It is assumed that independence exists within and between subgroups, and that i, j , and 1 ≤ j ≤ n, where 0 μ and 0 σ are the nominal mean and standard deviation respectively.The process is in-control when a = 0 and b = 1.
On the other hand, the process is out-of-control when the mean has changed (a ≠ 0), or the standard deviation has changed (b ≠ 1), or both have changed.
The plotting statistic of the EWMA X chart, i.e. i Z , is defined as follows: where λ is the smoothing constant that satisfies 0<λ≤1, i X is the sample mean at time i with and Z 0 =μ 0 [20].The upper and lower control limits of the EWMA X chart are

THE EWMA t CHART
The plotting statistic i Y for the EWMA t chart suggested by Zhang et al. [20] is defined as follows: Here, i S is the sample standard deviation at time i, i.e.
. Note that i T follows a t distribution with n1 degrees of freedom, and that the t distribution is symmetrical about 0, so that     the process is in-control.Hence the upper and lower control limits of the EWMA t chart satisfy  LCL = UCL t t [20].The UCL t of the EWMA t chart is a function of the sample size, n, smoothing constant, λ, and 0 MRL (or 0 ARL ).

A MARKOV CHAIN APPROACH IN COMPUTING THE MRLs OF THE EWMA X AND EWMA t CHARTS
This section discusses the Markov chain approach of Brook & Evans [25] to evaluate the MRLs of the EWMA X and EWMA t charts.Zhang et al. [20] also employed the Markov chain approach of Brook & Evans [25] to evaluate the ARLs of these two EWMA charts.A discretetime Markov chain has p+1 states, where states 1, 2, …, p are transient while state p+1 is absorbing.Zhang et al. [20] showed that the transition probability matrix P of this discretetime Markov chain is
Figure 1, taken from Zhang et al. [20], shows how the interval between UCL and LCL

 
UCL and LCL , t t for the EWMA X (EWMA t) chart is divided into p = 2m + 1 subintervals.
For simplicity, UCL and LCL will be used to represent the limits of the two EWMA charts in this section.The width of each subinterval is 2δ, where . Note that j H is the midpoint of the j th subinterval, for j = m, …, 1, 0, +1, … , +m, where m denotes the subinterval number [20].

Figure 1: Interval between UCL and LCL divided into p = 2m + 1 subintervals
Let N denote the run length of the EWMA X and the EWMA t charts.Here, N is a Discrete Phase Type random variable.The cumulative distribution function (cdf) of N for the zero state process [25] is: where I represents the (p×p) identity matrix, s represents the (p×1) initial probability vector, 1 represents the (p×1) vector of all ones.The 100 (0 <  < 1) percentage points of the run length distribution are defined as the value  z , such that [21,22]: By letting  = 0.5 in equation ( 5), we obtain MRL = 0.5 z .
The transition probability , i j R of the in-control transition probability matrix R for the EWMA X chart [20] is: where N F represents the cdf of the standard normal distribution.For the EWMA t chart, the transition probability, , where is the cdf of a non-central t-distribution with n1 degrees of freedom and noncentrality parameter β.
The generic element j s of the initial probability vector s for the EWMA X chart [20] is: For the EWMA t chart, the generic element j s of vector s is

OPTIMAL DESIGNS OF THE EWMA X AND EWMA t CHARTS, BASED ON MRL
The optimal parameters of the EWMA X and EWMA t charts can be computed using the Markov chain approach discussed in Section 4. A chart is optimal in detecting a shift if, among all the competing charts with the same 0 MRL , it has the smallest out-of-control MRL for the said shift.The MRL is a discrete number, so it is possible that more than one optimal parameter combination exists for a particular magnitude of shift of interest.For such cases, the (λ, UCL t ) combination corresponding to the median λ of all optimal λ in the range [a, b], where 0<a<b<1, is taken as the optimal parameter combination.Note that any (λ, UCL t ) combination where λ[a, b] can be selected by the user as the optimal combination if desired.
The following steps explain how the optimal   t λ, UCL parameter combination of the EWMA t chart is computed: Step 1: Specify the desired 0 MRL value, sample size, n, and mean shift a opt , where a opt is the magnitude of a shift for which a quick detection is needed.Here, a opt is measured in terms of the number of standard deviation units.
Step 3: With the current λ value, compute the corresponding t UCL to attain the 0 MRL specified in Step 1, when the process is in-control.Here, matrix R is obtained by setting a=0 and b=1, as t UCL is computed based on an in-control process.
Step Note that the optimal (λ, L) parameter combination of the EWMA X chart is also obtained using the above six-step procedure.However, for the EWMA X chart the transition probability , i j R in equation ( 6) is employed.
Statistical Analysis System (SAS) programs are written incorporating this six-step procedure to compute the optimal parameter combinations for the EWMA t and EWMA X charts using the Markov chain approach.(These optimisation programs -which compute the optimal parameters for any desired input parameters ( 0 MRL , a opt , and n) set by the user -can be requested from the first author.) Tables 1 and 2 provide the optimal parameter combinations and the corresponding a opt MRL s for the EWMA t and EWMA X charts, when 0 MRL  {200, 370}, a opt  {0.1, 0.2, …, 1.9, 2.0}, and n  {3, 5, 7, 9}.The bold type entries represent the optimal parameters and a opt MRL s for the EWMA t chart.Tables 1 and 2 facilitate a quick selection of optimal parameters by a practitioner.For example, if a practitioner wishes to design an EWMA t chart that is optimal for a shift of a opt = 0.  1 and 2 has been verified with simulation.Here, the simulation programs for the EWMA t and EWMA X charts are written using SAS, each based on 10,000 simulated trials.(These simulation programs can be requested from the first author.)For example, to verify the accuracy of the the SAS optimisation program incorporates the six-step procedure discussed at the beginning of this section.Some discussions that might be useful to the reader are presented here.The probability that a process is in-control, even though the chart indicates otherwise, is defined as the size of the Type I error.Here, fixing the value of this probability corresponds to fixing the value of the 0 MRL .A higher 0 MRL value corresponds to a smaller size of the Type I error, and vice versa.On the other hand, the probability that a process is out-of-control, even though the chart does not indicate this, is the size of the Type II error.The size of the Type II error is related to the value of a opt MRL .The value of a opt MRL increases as the probability of the Type II error increases, and vice versa.In this section, an 'optimal' chart refers to the chart where the size of its Type I error is fixed, while the size of its Type II error for a specified shift of interest ( a opt ) is minimised.This is equivalent to the approach employed in the paper by fixing the 0 MRL value and minimising the a opt MRL value.
with an electronic screwdriver.Note that a sample of five torque measurements is taken every hour.
The Phase I data, which consist of 25 samples, each of size n = 5, are shown in Table 3. Table 3 also gives the sample mean i X and sample standard deviation i S , for i = 1, 2, ..., 25, where i denotes the sample number.

Table 3: Torque measurements (in Ncm) for the screwing process
The sample grand average for the Phase I data is computed as ˆ0 μ = X = 50.25.Then is computed for each of the 25 samples.Assume that the EWMA t chart is to be designed to be optimal for a mean shift a opt = 0.6, where 0 MRL = 200.Then the optimal parameters λ = 0.131 and t UCL = 1.079 (see Table 1) are selected.Thus the lower control limit of the EWMA t chart is t LCL = 1.079because  LCL = UCL t t , as discussed in Section 3. The EWMA t statistics, computed using equation (3) with Y 0 = 0 and λ = 0.131, are also shown in Table 3.The EWMA t chart corresponding to the Phase I data is plotted in Figure 2. In Figure 2 no point falls beyond the limits, so the Phase I process is said to be in-control.Therefore the limits of the EWMA t chart, established in Phase I, can be used to monitor the Phase II process.
-  The Phase II process consists of 23 samples (samples 26-48), each of size n = 5.The sample measurements and the associated i X , i S , i T , and i Y statistics are shown in Table 4.The EWMA t chart for the Phase II data is plotted in Figure 3.The chart detects an out-ofcontrol point at the 48 th sample.Furthermore, the chart shows an upward trend from sample 42 onwards, indicating that the Phase II process is out-of-control.Thus an investigation should be conducted to identify the assignable cause(s).For example, when opt a = 0.7, the MRL curves for the EWMA X chart when b  1, display great differences from the MRL curve associated with b = 1, for a [0, 0.25].Also, the MRLs, when a = 0 and b  1, are far from the specified target value 0 MRL = 370 (see Figure 4).The differences among the MRL curves for the EWMA X chart become more pronounced when λ increases.In contrast, the MRL curves among the different values of b for the EWMA t chart in Figure 4 are hard to distinguish for each of the three values of opt a considered.The results show that the EWMA t chart is more robust in preventing changes in b than the EWMA X chart.
Note that the range of the a values on the x-axis in Figure 4 is set, based on the range considered in Zhang et al. [20].Zhang et al. [20] considered the opt a values that did not include the range of the a values on the x-axis.Furthermore, since all the MRL curves for different b values overlap from a = 0.5 onwards (see Figure 4), it is pointless to show the curves for a > 0.5, as the differences among the curves for the various b values are not visible when a > 0.5.
This section compares the MRL performances of the EWMA t and EWMA X charts.The results show that the EWMA t chart is more robust in preventing changes in b than the EWMA X chart.It is also interesting to note that the optimal EWMA t chart is better than the optimal EWMA X chart in detecting process mean shifts in terms of the ARL, as illustrated in Section 1, paragraph 2. a a a a

CONCLUSION
The main objective of this paper is to extend the work of Zhang et al. [20] by suggesting an optimal design of the EWMA t chart based on MRL.Its aim is not to study the chart's performance in detecting shifts, as this work has been done by Zhang et al. [20] (see Section 1, paragraph 2, line 5 onwards).As explained in Section 1, the MRL provides useful information not given by the ARL, and the former is also more readily understood by practitioners.This paper complements the work of Zhang et al. [20] who designed the EWMA t chart using the ARL.Note that the optimal designs of the EWMA X chart, based on both the ARL and MRL criteria, are available in the literature.Thus the optimal design of the EWMA t chart based on MRL, as presented in this paper, should be made available to practitioners.This is because the MRL optimisation procedure of the EWMA t chart is not currently available.A comparison of the MRL curves for the EWMA X and EWMA t charts shows that the latter performs better than the former against changes or estimation error in the process standard deviation.
multiplier k is to be determined by the user, based on a desired in-control ARL   0 ARL or in-control MRL   0 MRL .

5 , when n = 5
the smallest among the out-of-control MRLs of all the EWMA t charts that are designed to have 0 MRL = 200.The accuracy of the entries in Tables , n = 3, and a opt = 0.8, the optimal parameters (λ = 0.032, t UCL = 0.932) (see

Figure 2 :
Figure 2: The EWMA t chart for the Phase I data

Figure 3 :
Figure 3: The EWMA t chart for the Phase II data 7. PERFORMANCE COMPARISON The MRL performances of the EWMA t chart and EWMA X chart are compared.The optimal parameter combinations of the EWMA t and EWMA X charts are selected, for 0 MRL  {200, 370, 500}, opt a  {0.2, 0.7, 1.5}, and n = 5, where opt a is the magnitude of a mean shift that needs a quick detection.Note that 0 ≤ a ≤ 0.5 and b {0.90, 0.95, 1.00, 1.05, 1.10} are considered.Only the results for 0 MRL = 370 are shown in Figure 4, because the results for

Table 2 )
are entered into the simulation program for the EWMA t chart, where the program's output shows that