One-Sided and Two-Sided w-ofw Runs-Rules Schemes : An Overall Performance Perspective and the Unified Run-Length Derivations

The one-sided and two-sided Shewhart w-of-w standard and improved runs-rules monitoring schemes to monitor the mean of normally distributed observations from independent and identically distributed (iid) samples are investigated from an overall performance perspective, i.e., the expected weighted run-length (EWRL), for every possible positive integer value of w. The main objective of this work is to use the Markov chain methodology to formulate a theoretical unified approach of designing and evaluating Shewhart w-of-w standard and improved runs-rules for one-sided and two-sided X schemes in both the zero-state and steady-state modes. Consequently, the main findings of this paper are as follows: (i) the zero-state and steady-state ARL and initial probability vectors of some of the one-sided and two-sided Shewhart w-of-w standard and improved runs-rules schemes are theoretically similar in design; however, their empirical performances are different and (ii) unlike previous studies that use ARL only, we base our recommendations using the zero-state and steady-state EWRLmetrics and we observe that the steady-state improved runs-rules schemes tend to yield better performance than the other considered competing schemes, separately, for onesided and two-sided schemes. Finally, the zero-state and steady-state unified approach run-length equations derived here can easily be used to evaluate other monitoring schemes based on a variety of parametric and nonparametric distributions.


Introduction
Balakrishnan and Koutras [1] define a run as an uninterrupted sequence of the same elements bordered at each end by other types of elements.Supplementary runs-rules have been used since the 1950s to improve the performance of the basic Shewhart control charts; see some detailed discussions of some of these earlier works in [2][3][4][5][6].Some of the commonly cited and recent research works on runs-rules are done in [7][8][9][10][11][12][13][14][15][16][17][18][19][20][21].For a literature review on the parametric runs-rules charts that cover articles up to 2006, a reader is referred to Koutras et al. [22], whereas, for the full discussion of nonparametric runs-rules charts until 2017, see the book by Chakraborti and Graham [23].While runs-rules have been mostly applied in statistical process control and monitoring to improve the detection rate of the basic Shewhart charts, more recently, these have also been used to further increase the detection rate of the exponentially weighted moving average (EWMA) and cumulative sum (CUSUM) schemes; see [24][25][26][27][28].
To differentiate between common and special causes of variation, control charts are the most used tools of statistical process control and monitoring to achieve this goal.That is, when a process has only common causes of variation present, a control chart will indicate that the process is in statistical control, or in short, in-control (IC); however, when a process has special causes of variation present, it is said to be in a state of out-of-control (OOC).Assume that {  :  ≥ 1;  = 1, 2, . . ., } is a sequence of samples from iid ( 0 ,  2 0 ) distribution.Let   denote the plotting statistic calculated from {  } at sampling point .In a production process, say, samples are usually taken at each sampling point to be inspected and then each of these samples is classified as either conforming or nonconforming depending on where the sample plots on the control charting regions are shown in Figure 1.
Consider Figure 1, given that  0 and  2 0 are the specified IC mean and variance (process parameters), respectively; let LCL and UCL denote the lower control limit and the upper control limit of some monitoring scheme with limits given by   =  ,0 ±  ,0 .
In addition to the limits in (1) (however, with different charting constant (i.e., k value)), let LWL and UWL denote the lower and upper warning limits of the  monitoring scheme given by   =  ,0 ±  1  ,0 ,   =  ,0 ±  2  ,0 , where  ,0 and  ,0 are the specified IC mean and variance of the plotting statistic , respectively.Note that the UCL and LCL in (1) and in (2) are not equal because the control limits constants have the following relation:  <  1 .This is so that the resulting control limits yield the constraint that the actual average run-length (ARL) must equal the nominal IC ARL (denoted by ARL 0 ); otherwise, if  >  1 , the additional warning limits in (2) will lower the ARL 0 .The charting regions in the left panel of Figure 1 correspond to the one-sided and two-sided standard runs-rules (i.e., standalone w out of the last w consecutive plotting statistics rule; denoted by SRR); see, for instance, [7,8].A one-sided upper (lower) SRR scheme issues an OOC signal when there are w consecutive plotting statistics that fall in Zone A (Zone C), respectively.A non-side-sensitive (denoted by NSS) two-sided SRR scheme issues an OOC signal when there are w consecutive plotting statistics that fall in Zone A or Zone C. A side-sensitive (denoted by SS) two-sided SRR scheme issues an OOC signal when there are w consecutive plotting statistics that fall in Zone A (Zone C), respectively.
However, the charting regions in the right panel of Figure 1 correspond to the one-sided and two-sided improved runs-rules (i.e., combination of the 1-of-1 and SRR; denoted by IRR); see, for instance, Khoo and Ariffin [10].A onesided upper (lower) IRR scheme issues an OOC signal when a single sampling point plots in Zone 1 (Zone 5) or w out of the last w consecutive plotting statistics fall in Zone 2 (Zone 4), respectively.A NSS two-sided SRR scheme issues an OOC signal when a single sampling point plots in Zone 1 or Zone 5 or w out of the last w consecutive plotting statistics fall in Zone 2 or Zone 4. A SS two-sided IRR scheme issues an OOC signal when a single sampling point plots in Zone 1 (Zone 5) or w out of the last w consecutive plotting statistics fall in Zone 2 (Zone 4), respectively.
The zero-state and steady-state mode of analysis are used to characterize the short-term and long-term run-length properties of a monitoring scheme.It should be noted that Champ [6] discussed the steady-state one-sided IRR schemes performance and derived some of its ARL expressions.Next, Balakrishnan and Koutras [1] showed that the zero-state NSS SRR scheme's run-length distribution is the same as the geometric distribution of order w.Shmueli and Cohen [29] derived some closed-form ARL expressions of the SS twosided SRR scheme.Acosta-Mejia [30] conducted an empirical zero-state ARL performance of the two-sided SS SRR and IRR schemes.More recently, Lim and Cho [31] conducted an extensive investigation into the empirical performance and derived the steady-state closed-form ARL expressions for the SS two-sided IRR scheme.
The main objective of this paper is to unify these publications (i.e., Champ [6], Balakrishnan and Koutras [1], Shmueli and Cohen [29], Khoo and Ariffin [10], Acosta-Mejia [30], and Lim and Cho [31]) and formulate a unified approach to evaluate one-sided and two-sided w-of-w SRR and IRR schemes for any possible integer value of w, separately, for the zero-state and the steady-state contexts.More specifically, in this paper, we show the following: (i) There is an ideal manner to define the w-of-w scheme's transition probability matrices (TPM) so that it can easily be formulated for any possible integer value of w for both one-and two-sided schemes.(ii) The design structure of the TPM and other run-length distribution properties of the upper/lower one-sided w-of-w SRR and IRR schemes are actually similar to those of the two-sided NSS w-of-w SRR and IRR schemes with different probability elements.(iii) Derive initial probabilities and ARL vectors, so that we formulate the zero-state and steady-state closed-form ARL expressions for the one-sided and two-sided w-of-w SRR and IRR schemes for any possible integer value of w.
(iv) In the papers by [6,10,30,31] that go into detail about w-of-w runs-rules monitoring schemes, it is not easy to figure out how one should select a specific best value of w to use as the ARL metric is based on a specific size shift which must be determined in advance.To bypass this problem, in this paper, we propose the use of overall performance measures to examine the performance of one-and two-sided SRR and IRR schemes for a range of small, medium, and large shift sizes.The overall performance measures are better measures than ARL when the quality practitioner does not know beforehand the magnitude of the target shift size, that is, when the shift size is random.
The rest of the paper is structured as follows: In Section 2, we illustrate the difference between the design structure of the one-sided and the two-sided (NSS and SS) SRR and IRR schemes' TPMs.In Section 3, we describe some runlength properties as well as the overall performance metrics.
In Sections 4 and 5, an empirical discussion of the onesided and two-sided runs-rules schemes is done, respectively.An example is shown in Section 6 illustrating how the monitoring schemes discussed here are implemented in real life.In Section 7, some concluding remarks are given.Finally, in the Appendix, we derive the closed-form expressions of the expected run-length distribution for the one-sided and two-sided SRR and IRR schemes in a different approach from those that exist currently in the literature as separately documented in [1,6,29,31].Moreover, expressions of the false alarm rate (FAR) are derived in the Appendix for the one-and two-sided SRR and IRR monitoring schemes discussed here.

The Design of the w-of-w SRR and IRR Control Chart
Given the charting zones in Figure 1, consider Zone A. The probability of a charting statistics falling in Zone A may be calculated as follows: The main requirement of the Markov chain procedure is the TPM of a w-of-w scheme of interest.To construct the TPM, we need to discretize the charting regions of each SRR and IRR monitoring scheme as done in Figure 1.The charting regions corresponding to each SRR scheme are as follows: (i) One-sided: Upper {A, D} and Lower {C, E}.
In Tables 1 and 2, we illustrate how the TPM is constructed for each SRR and IRR monitoring scheme when w = 3.That is, in Table 1, we give all the compound patterns, denoted by "OOC", which depicts consecutive elements plotting on distinct zones in Figure 1 that result in OOC signaling events.The steps involved in constructing the TPMs of the SRR and IRR schemes are as follows for any : Step (i): Outline the absorbing states that lead to an OOC signal and denote these as OOC.
Step (ii): Define the conforming zone that represent the IC state, denoted by , where  = {  1 , for one-sided and two-sided NSS schemes  w , for two-sided SS schemes. (3) Step (iii): Decompose the absorbing states in Step (i) into their corresponding transient states and denote these as   .
Step (iv): Define the state space, denoted by Ω, which is an amalgamation of Steps (i) to (iii).
Therefore, following the latter description, the state spaces for each of the schemes are shown in Table 1 and these are used to construct each of the TPMs in Table 2 for the one-sided (upper and lower) and two-sided SRR and IRR monitoring schemes when w = 3.We see from Table 2 that the TPM consists of absorbing and transient states defined within Ω, and its structure is such that, for any positive integer , it is given by an ( + 1) × ( + 1) matrix, : where the  × 1 vector r satisfies r = 1 ( The construction and properties of TPMs of the one-sided and two-sided SRR and IRR schemes for any possible integer value of w are thoroughly discussed in the Appendix.

Run-Length Characteristics of the w-of-w SRR and IRR Control Chart
3.1.Some Run-Length Characteristics.Let N denote the runlength of some w-of-w control chart.Then N is the number Table 1: Decomposition of the state space of the 3-of-3 standard and improved runs-rules (SRR and IRR) schemes.
The transition probability matrices of the 3-of-3 standard and improved runs-rules (SRR and IRR) charts.

Upper one-sided
Lower one-sided of sample points plotted on the control chart until it gives an OOC signal for the first time.In this paper, we compute the expected run-length of the chart using the Markov chain technique best explained in Fu and Lou [32]; this is further discussed in the Appendix.The most used quantity to measure the performance of a monitoring scheme is the (), and we denote this here as ARL given by where  is the  × 1 initial probability vector (see Section 3.2) that depends on whether a zero-state or a steady-state analysis is of interest and, where I is the  ×  identity matrix.The R closed-form expressions are formulated in the Appendix for each of the considered schemes.

Initial Probabilities
Vectors. = q is the vector of initial probabilities associated with the zero-state mode and it has a one in the component associated with the state in which the chart begins (i.e., state ) and each of the other components of the vector is equal to zero; this is further shown in the Appendix. = s is the vector of initial probabilities associated with the steady-state mode and its elements are nonzero.There are a number of methods used to compute s, and in this paper, we focus on three of these steady-state probability vector (SSPV) methods which are denoted here by SSPV1, SSPV2, and SSPV3 (each of these is computed while the process is IC; i.e.,  = 0).
(i) SSPV1 Method.The SSPV1 method (by Crosier [33]) entails computing P * , by altering P in (4) so that the control statistic is reset to the "initial state" whenever it goes into an "OOC state".That is, the last row of the TPM is changed such that the value of one is moved to the respective initial state (i.e., state ) instead of the OOC state.That is, (4) becomes P * = ( Q r e   0 ), where e  is the j th unit vector.Note that e  corresponds to e 1 for the one-sided (upper or lower) and the two-sided NSS SRR and IRR schemes.However, e  corresponds to e w for the two-sided SS SRR and IRR schemes.Consequently, we then use P * to find the (+1)×1 probability vector  such that the following equation is satisfied: where z is the ×1 vector obtained from  by deleting the (+1) th component associated with the absorbing state.
(iii) SSPV3 Method.The SSPV3 method (used by [31,[34][35][36], etc.) is obtained by dividing each element of Q by its corresponding row sum, so that we may have an ergodic altered version of the essential TPM called the conditional essential TPM, which is denoted by Q  .Consequently, the SSPV3 method is a vector such that s The SSPV1, SSPV2, and SSPV3 are each formulated in the Appendix for each of the runs-rules schemes discussed in this paper.Calculations in this paper were done using SSPV2 method.

Overall Performance Measures.
A number of authors have argued that if a control chart is designed based on one specific size of a shift, it would perform poorly when the actual size of a mean shift is significantly different from the assumed size; see [36][37][38][39][40][41].Hence, they recommend that control charts should be designed in terms of the overall performance rather than a specific shift size performance.The expected weighted run-length (EWRL) is a quality loss function that describes the relationship between the shift size and the quality impact of a control chart, overall; and this is given by where  follows some probability distribution function with a density function () and a range [ min ,  max ], where  min and  max are the lower and upper bound of the range of , and () is a weight function associated with .Note that the EWRL is a generalized quality loss function and by assigning different weight functions, it yields the following different common quality loss function metrics: (i) Extra quadratic loss () if  () =  2 ; (ii) Expected  () if  () = 1.(10) Note that the logic behind the EQL weight function is that the larger the shift size, the greater the quality loss, whereas the EARL assigns the same weight on each ARL value, irrespective of the shift size.
Here we compute both the zero-state and steady-state EQL and EARL to investigate whether different EWRL functions have a similar or different effect on the choice of the optimal value of w for each of the w-of-w SRR and IRR schemes.Moreover, we consider only the case where () follows a Uniform (0, 1) distribution, which in a way implies that the objective function (i.e., (9)) that needs to be minimized can equivalently be written as Throughout this paper, we use the increment in the shift, i.e., Δ, equal to 0.1.Finally, for any competing schemes, the best scheme will be the one that yields the smallest EWRL value.

Performance of the One-Sided w-of-w SRR and IRR Monitoring Schemes
A monitoring scheme is designed such that when the process is IC, the ARL 0 is set at some desirable level (or equivalently, the significance level is set at some standard value).For instance, a significance level of sizes 0.005, 0.0027, 0.0020, and 0.0010 implies that the ARL 0 = 200, 370.4,500, and 1000, respectively.Due to writing space constraint, only the performance relating to ARL 0 = 370.4 is illustrated and for the other ARL 0 values, a similar conclusion follows.
We conduct the analysis of the OOC performance by separately looking at two run-length characteristics, i.e., the ARL and EWRL.
(i) Based on the ARL: note that, for w > 7, there is no k > 0 such that the actual IC ARL is equal to 370.4 in Table 3. Next, we use (A.4) and (A.5) to compute the zero-state and steady-state ARLs which are shown in Table 3.In zero-state, each one-sided w-of-w scheme converges to a lower bound ARL value equal to w for any large shift value; that is, a one-sided w-ofw scheme can only signal after exactly w sampling points.Note though, in steady-state, the lower bound is slightly less than the value of w.For small shifts, i.e.,  < 1, the higher the value of w, the better, as this yields smaller OOC ZSARL and SSARL values.However, for large shifts, increasing w is not advisable due to the lower bound just explained.For  > 1.5, the basic one-sided  chart tends to be more competitive, as it outperforms the one-sided w-of-w schemes with higher values of w.Due to a lack of a single monitoring scheme outperforming the rest, for all shift values, separately in zero-state and steady-state modes, it is not easy to choose the optimal value of w. (ii) Based on the EWRL: using (A.12) and (A.13) in the Appendix, we calculate the zero-state and steady-state EARL and EQL given in Table 4.In both states, as  max decreases, the optimal w increases; see the boldfaced values that yield a minimum EWRL for a given range of w values.We see that, in each state, the EARL of the w-of-w schemes is better than that of the one-sided  chart.On the contrary, only w = 2, 3, 4 in both states yield EQLs less than that of the  chart when  max = 3.
Based on this example, it is apparent that the different EWRL functions do lead to different recommended values of w.Hence, the choice between any EWRL function needs to depend on each user as per weight function structure preference in (10) and the magnitude of shifts of interest.That is, we recommend w found using EARL approach when all the shifts are equally important (i.e., the quality practitioner is interested in all magnitudes of shifts) and recommend w found using EQL approach when the magnitude of the shift is more important (i.e., the quality practitioner is interested in shifts according to their magnitude).Thus, moving forward, we separately present both the results of the EARL and EQL so that we may see the resulting optimal values in each case.
Firstly, as expected, in each state and for each w (wherever both the one-sided w-of-w SRR and IRR exist), the IRR scheme has a better overall performance.Secondly, using either the EARL or EQL, we see that, for each w, the zero-state one-sided SRR scheme has the worst performance (or least improvement from the basic one-sided  chart) whereas the steady-state one-sided IRR scheme has the best performance.Thirdly, in terms of EARL, the one-sided w-of-w SRR and IRR schemes always outperform the  chart; however, in terms of the EQL, the zero-state and steady-state one-sided SRR schemes are outperformed by the  chart once w≥ 5 when  max = 3. Fourthly, in general, for small shifts (i.e.,  max = 1), there seem to be a small difference in the performance of the different runs-rules schemes using either EARL or EQL; however, for large shifts (i.e.,  max = 3), there seem to be a noticeable significant difference among the one-sided runsrules schemes, especially when using the EQL metric due to the weight structure in (10).Finally, we observe that each of these EWRL functions (i.e., (A.12)-(A.13))tends to decrease and then at some point, the curve increases (i.e., concave up function); hence these minimum turning points represent the value of w that yields the lowest EWRL for that particular SRR or IRR scheme.
Thus, based on the EARL, we recommend the use of steady-state mode one-sided IRR scheme with w = 7 for all shift types; however, based on the EQL, we recommend the steady-state one-sided IRR scheme with w = 7, 4, and 3, for small, moderate, and large shifts, respectively.The steady-state mode performance is slightly better than the corresponding zero-state mode; hence, we recommend the steady-state mode to evaluate the performance of the w-of-w monitoring schemes.

Performance of the Two-Sided w-of-w SRR and IRR Monitoring Schemes
Similar to the calculations done in Tables 3, 4, 5, and 6 and Figure 2 in the one-sided case, in Figures 3 and  4, we show the zero-state and steady-state EWRL for the two-sided SS case using (A.14) and (A.15).For the twosided NSS and SS IRR schemes, at each w value, using the corresponding optimal design parameters ( 1 ,  2 ) and (A.12) to (A.15), the zero-and steady-state EARL and EQL that satisfy min  1 ∈{3.1,3.2,...5.0}  and min  1 ∈{3.1,3.2,...5.0} , for a given  max = 1, 2, 3 (with  min = 0) are the ones that are plotted in Figures 3 and 4, respectively.The two-sided NSS SRR and IRR schemes in Figure 3 are not recommended, at all, because (i) increasing w leads to deteriorating overall performance because the EARL and EQL increase as w increases; (ii) for values of w > 3, the two-sided NSS SRR schemes are outperformed by the basic  chart.
Unlike the two-sided NSS schemes, the two-sided SS SRR and IRR schemes given in Figure 4 have a similar general behavior as those discussed in Figure 2. Thus, following a similar argument as in Figure 2, based on the EARL, we recommend the use of the two-sided SS IRR scheme with w = 8 for all shift types; however, based on the EQL, we recommend the use of the two-sided SS IRR scheme with w = 8, 4, and 3 for small, moderate, and large shift sizes, respectively.

Application Example
To illustrate the use and the application of the one-sided and two-sided w-of-w SRR and IRR schemes, we consider a well-known dataset from Montgomery [42] on the inside diameters of piston rings manufactured by a forging process.This data set contains 25 retrospective or Phase I samples, each of size 5, that were collected when the process was thought to be IC.These data are considered to be the Phase I reference data for which a goodness of fit test for normality is not rejected.This data set also contains 15 prospective (Phase II) samples each of 5 observations (i.e., n = 5).Note that when the distribution parameters of a particular process are unknown, it is generally accepted that there are two phases of application for a monitoring scheme, namely, Phase I (for estimation of distribution parameters) and Phase II     (continuous monitoring using the parameters estimated in Phase I); see the book by Chakraborti and Graham [23] for further discussion on these phases of application.Using Phase I techniques, with an IC data, we estimate that the mean and standard deviation of the piston rings data are equal to 74.0011 and 0.0048, respectively.Consequently, the limits in (1) and ( 2) are given in Table 7 for the upper one-sided SRR and IRR schemes and the sidesensitive two-sided SRR and IRR schemes with w = 4 that yield an IC ARL equal to 370.4.
Using the limits in Table 7, we construct the corresponding monitoring schemes in Figure 5 for the upper one-sided and side-sensitive two-sided schemes.In Phase I, all the monitoring schemes depict processes that have

Concluding Remarks
In this paper, we revisited the design of the w-of-w standard and improved runs-rules schemes for one-sided and twosided charts based on the mean of the normal distribution from iid samples.Then, we implemented a unified approach in designing these schemes and unlike the existing studies which are based on the ARL only (see [6,10,30,31]), we base our recommendations on the overall performance, using specifically, the extra quadratic loss and the expected average run-length.Using these overall performance measures, we show that the one-sided and the two-sided side-sensitive steady-state improved runs-rules schemes have a much better performance than the other competing one-sided and twosided schemes considered here, respectively.Moreover, we showed that the two-sided non-sided-sensitive standard and improved runs-rules schemes should never be used as they yield a uniformly deteriorating overall performance as w increases.
Furthermore, for ease of calculating expected run-length characteristics, in the Appendix, we derived some closedform expressions (in a slightly different manner as currently available in the literature) that can easily be used to obtain the zero-state and steady-state average run-length values of the one-sided and two-sided standard and improved runs-rules schemes.These closed-form expressions are valuable because any user with or without prior knowledge of Markov chain or simulation or possessing any advanced statistical software can easily use a pocket calculator to compute the performance measurements of the schemes considered here.
)  with each of the probability elements as given in Table 10.
essential TPM consisting of transient states, where, for both the w-of-w SRR and IRR monitoring schemes, we have  = { w, for one-sided and two-sided NSS schemes 2w − 1, for two-sided SS schemes.
for the one-sided w-of-w IRR max = 1

Figure 2 :
Figure 2: The zero-state and steady-state EARL and EQL values (with  min = 0) of the one-sided SRR and IRR schemes when ARL 0 = 370.4.

Figure 3 :
Figure 3: The zero-state and steady-state EARL and EQL values (with  min = 0) of the two-sided non-side-sensitive SRR and IRR schemes when ARL 0 = 370.4.

Figure 5 :
Figure 5: Upper one-sided and two-sided SRR and IRR schemes to monitor the mean of piston ring size.

Table 3 :
The zero-and steady-state ARL for the one-sided w-of-w SRR  charts when ARL 0 = 370.4.

Table 4 :
The zero-state and steady-state EARL and EQL (with

Table 5 :
The zero-and steady-state EARL (with

Table 6 :
The zero-and steady-state EQL (with

153.4 156.5 159.4
Figure 4: The zero-state and steady-state EARL and EQL values (with  min = 0) of the two-sided side-sensitive SRR and IRR schemes when ARL 0 = 370.4.
some suspect samples but none are OOC according to SRR and IRR guidelines.We observe that, in Phase II, for this specific dataset, the upper one-sided and twosided schemes issue an OOC signal for the first time at time points 40 and 38 (or, on time points 15 and 13 on Phase II) for the SRR and IRR, respectively, showing the improvement that is brought by the IRR design over the SRR design.

Table 7 :
The design parameters and limits of the piston ring data.