Introduction

Reynolds and Stoumbos (2001) extended a Bernoulli CUSUM control chart to be utilized in process monitoring when there is a stream of such binary inspection data. In this regard, their control chart can be applied to show a shift in p from the in-control value p0 resulting in assignable causes in the process monitoring. An augment in p would indicate worsening in the performance of the considered process. On the other hand, showing a decline in p is significant for alarming-enhanced process quality. For example, consider a decrease in the value of p; in this situation, the control limits for the control chart should be recomputed to better process monitoring in the future changes.

Cumulative sum (CUSUM) control charts and their applications have been considerably discussed in the statistical literature; see, for example, Ewan and Kemp (1960), Van Dobben de Bruyn (1968), Bissell (1969), and Kemp (1971). In this respect, a general definition of the construction of one-sided and two-sided CUSUM control charts is proposed by Van Dobben de Bruyn (1968), in which the run length distribution, its parameters measure the performance of a CUSUM procedure and are applied in real cases to obtain a suitable scheme. The average run length (ARL) has most often been used to measure and compare the performance of CUSUM procedures. However, the exclusive use of the ARL has been criticized, and the use of percentage points of the run length distribution has been suggested; see, for example, Bissell (1969). In this regard, some works on CUSUM chart relate to the healthcare context, for example Zhang and Woodall (2015), in which they proposed a dynamic probability control limits for risk-adjusted Bernoulli CUSUM charts.

The properties of the one-sided CUSUM control chart have received more attention than two-sided CUSUM control chart in which two one-sided control charts monitored process simultaneously. Different expressions for the exact run length distribution and its parameters have been proposed for the one-sided CUSUM procedure by Ewan and Kemp (1960), Brook and Evans (1972), Zacks (1981), and Woodall (1983). In addition, different estimations have been presented by many authors.

Kemp (1971) proposes the ARL in the two-sided CUSUM control chart in terms of the ARL in the two-component one-sided control chart. Nadler and Robbins (1971) utilized a Wiener process to estimate the run length distribution as a special case of the two-sided control chart. More recently, Lucas and Crosier (1982) applied a Markov chain description of the two-sided CUSUM control chart to set the ARL and the run length distribution. In this paper, we present results that will allow a more accurate Markov chain approach in two-sided Bernoulli-based CUSUM control chart with autocorrelated observation.

Most of the published works on control charts for autocorrelated binary observations assume that the observations can be modeled as a two-state Markov chain in which the probability of an observation being defective depends on the value of the previous observation (first-order dependence). In this regard, see, for example, Shepherd et al. (2007), Keramatpour et al. (2013), Vakilian et al. (2015), and Ashuri and Amiri (2015), in which observations are autocorrelated according to first-order dependence. Some additional published works have considered monitoring problems more related to what is studied here. For example, Bhat and Lal (1990) considered monitoring autocorrelated binary observations when samples have a continuous stream of observations and are available from the process. Moreover, Niaki and Abbasi (2007) considered the situation in which there is autocorrelation and a defective item can have more than one defect. It is worth mentioning that when constructing control charts to monitor a process with binary observations, it is significant to explicitly account for autocorrelation when it is present. The main objective of this paper is to extend a two-sided Bernoulli-based CUSUM control chart, called the two-sided Markov binary CUSUM (MBCUSUM) chart, for monitoring a process in which the observations follow the two-state Markov chain model and are binary. We consider the situation in which a continuous stream of binary observations is available for process monitoring. It is assumed that these binary observations become available individually, so the control charts can be based on samples of n = 1. The two-sided Markov binary CUSUM (MBCUSUM) control chart is based on a log-likelihood-ratio statistic obtained from the two-state Markov chain model. This study can be considered to be an extension of the Stoumbos and Reynolds (2008) work, which extended the MBCUSUM procedure for a continuous stream of autocorrelated binary observations (for more details, see Reynolds and Stoumbos (2000).

We next propose the two-sided Bernoulli CUSUM chart by defining the two-state Markov chain model. Finally, the performance of the proposed control chart is appraised in terms of the ARL criterion.

Proposed control chart

In situations that autocorrelation is known to be present, one approach is to adjust the control limits of the traditional charts to try to produce more acceptable values for the in-control average number of observations to signal. However, we next extend a CUSUM chart when there is autoregressive (1) autocorrelation and show that this chart has better ability to detect shifts in parameter p than the other traditional charts, even with adjusted control limits. For this aim, in the next section, a two-state Markov chain model is defined. Then, the two-sided Bernoulli CUSUM chart is proposed. Finally, a two-sided MBCUSUM chart is given for autocorrelated data using assumption and definitions in these subsections.

The two-sided markov chain model

Consider a sequence X1, X2, X3, … of binary observations with the values 0 or 1 (non-defective and defective, respectively). The first observation Xl will be observed without understanding the value of a previous observation. Then, consider that X1 is a binary observation with P(X1 = 1) = p and P(X1 = 0) = 1 − p. When X1 is observed, the other X2, X3, X4,… can be generated using the two-state Markov chain model. The transition probabilities, pij, i, j = 0, 1, for the two-state Markov chain model satisfy pio = 1 − pil, i = 0, 1, In this regard, this model can be characterized using only two parameters, pi0 = P(Xk = 1|Xk − 1 = 0) and p10 = P(Xk = 0|Xk − l = 1) (see Bhat and Lal (1990)). The long-run proportion defective p and the correlation coefficient ρ between successive observations can be defined as p = P(Xk = 1) = p01/(p0l + p10) and ρ = 1 − (p01 + p10), respectively. For process monitoring applications, it seems more suitable to parameterize the process in terms of p and ρ instead of p01 and p10. In addition, let p0 be the in-control value of p. Then, for specialized values of p and ρ, some transition probabilities are as follows:

$$\begin{aligned} p_{00} & = 1 - p(1 - \rho ), \\ p_{10} & = (1 - p)(1 - \rho ), \\ \end{aligned}$$
(1)

where \(p_{01}\) and \(p_{11}\) can be derived easily from them using this model in practice which usually needs that the in-control parameter values be estimated during a Phase I analysis when process data are gathered for this aim. Suppose that there are N observations in the Phase I data set, so that the observed number of transitions between two states is N − 1. The maximum likelihood estimator of pij is pij= Nij/Nio + Nil, according to Bhat and Lal (1990), where Nij is the number of transitions from state i to state j for i, j = 0, 1. Then, the estimators of p0 and ρ are according to Eq. (2):

$$\begin{aligned} \hat{p}_{0} & = \frac{{\hat{p}_{01} }}{{\hat{p}_{01} + \hat{p}_{10} }}, \\ \hat{\rho } & = 1 - (\hat{p}_{01} + \hat{p}_{10} ). \\ \end{aligned}$$
(2)

The two-sided Bernoulli cusum chart

Using the two-sided Bernoulli CUSUM chart needs one to specify p0 and the sizes of the different shifts that need to be detected rapidly. In this paper, we follow the notation of Stournbos and Reynolds (2008), where p1 shows the enlarged value of p to be detected rapidly and p2 is the corresponding decreased value, where p2 < p0 < p1. The two-sided Bernoulli CUSUM statistics are according the following equation:

$$\begin{aligned} S_{i} = \hbox{max} \left( {0,S_{i - 1} + X_{i} - \gamma_{1} } \right),\quad i = 1,2,3, \ldots \hfill \\ T_{i} = \hbox{max} \left( {0,T_{i - 1} + X_{i} - \gamma_{2} } \right),\quad i = 1,2,3, \ldots , \hfill \\ \end{aligned}$$
(3)

where S0= T0= 0, and Xi is the Bernoulli random variable that becomes equal to 1 if the ith inspected item is nonconforming and 0 if it is conforming. The control chart signals when either Si> h1 or Ti< − h2. The upper CUSUM control chart is constructed to show unnormal condition in the process while the lower CUSUM control chart is constructed to show betterments. (Stournbos and Reynolds 2008) provided the likelihood ratio-based reference values \(\gamma_{1}\) and \(\gamma_{2}\) calculated using Eq. (4):

$$\gamma_{1} = \frac{{ - \log \left( {\frac{{1 - p_{1} }}{{1 - p_{0} }}} \right)}}{{\log \left( {\frac{{p_{1} \left( {1 - p_{0} } \right)}}{{p_{0} \left( {1 - p_{1} } \right)}}} \right)}},\text{and }\gamma_{2} = \frac{{ - \log \left( {\frac{{1 - p_{2} }}{{1 - p_{0} }}} \right)}}{{\log \left( {\frac{{p_{2} \left( {1 - p_{0} } \right)}}{{p_{0} \left( {1 - p_{2} } \right)}}} \right)}}.$$
(4)

It should be noted that 1 − \(\gamma_{1}\) and 1 − \(\gamma_{2}\) show growth in the Si and Ti statistics, respectively, attributed to Xi when Xi= 1. In addition, we have \(\gamma_{1}\) > \(\gamma_{2}\) because p1 > p0 > p2.

It is important in the applicable cases to evaluate the effect of the selection of control limits on the performance of the monitoring procedure. The average run length is often the metric applied in checking the performance of control charts, where we descript the average run length as the average number of items inspected until a signal from the chart is given. Consider ARLT referring to the ARL of the two-sided Bernoulli CUSUM control chart and ARLU and ARLL to be the corresponding ARLs of the upper and lower control charts, respectively. Stournbos and Reynolds (2008) stated Eq. (5).

$$\frac{1}{{\text{ARL}_{\text{T}} }} \ge \frac{1}{{\text{ARL}_{\text{U}} }} + \frac{1}{{\text{ARL}_{\text{L}} }}.$$
(5)

Hence, we determine the conditions in which Eq. (5) is an equality so that the two-sided Bernoulli CUSUM control chart performance can be derived from the ARL performance of the two one-sided control charts. Reynolds and Stoumbos (1999) detected that the ARL of the one-sided Bernoulli CUSUM control charts should be estimated partly using Markov chains or revised processes. Appling Eq. (5) as an equality could be used with the Markov chain approach since one can avoid the more awkward two-dimensional Markov chain representation of the two-sided CUSUM control chart stated by Woodall (1983). The use of Eq. (5) as an equality is also useful in simulation studies in which one wants to fix the value of ARLT when maintaining the same values for ARLU and ARLL.

The two-sided MBCUSUM chart for autocorrelated data

As aforementioned, in this paper, the proposed two-sided MBCUSUM control chart is based on the log-likelihood-ratio statistics for an increase in p from p0 to p1 in the two-state Markov chain model. On the other hand, the Si statistics are derived according to Mousavi et al. (2000) in that notation Ci denotes Si. Similarly, Ti statistics are computed for two-sided MBCUSUM control chart; the joint density of X1, X2, …, Xk is as follows:

$$L_{{_{k} }}^{\prime } = \left\{ {\begin{array}{*{20}l} {\ln \frac{{f\left( {x_{1} |p_{2} } \right)}}{{f(x_{1} |p_{0} )}},k = 1,} \hfill \\ {\ln \frac{{f(x_{k} |x_{k - 1} ,p_{2} )}}{{f(x_{1} |x_{k - 1} ,p_{0} )}},k = 2,3, \ldots } \hfill \\ \end{array} } \right.$$
(6)

Using the Bernoulli distribution of X1 gives

$$L_{{_{1} }}^{\prime } = x_{1} ln\frac{{p_{2} }}{{p_{0} }} + (1 - x_{1} )ln\frac{{1 - p_{2} }}{{1 - p_{0} }}.$$
(7)

Now for \(k \ge 2,\)

$$f(x_{k} |x_{k - 1} ) = p_{{_{00} }}^{{(1 - x_{k - 1} )(1 - x_{k} )}} \times p_{{_{01} }}^{{(1 - x_{k - 1} )x_{k} }} \times p_{10}^{{x_{k - 1} (1 - x_{k} )}} \times p_{{_{11} }}^{{x_{k - 1} x_{k} }} ,$$
(8)

and this gives

$$L_{{_{k} }}^{\prime } = \left( {1 - x{}_{k - 1}} \right)\left( {1 - x_{k} } \right)l_{{_{00} }}^{'} + \left( {1 - x_{k - 1} } \right)x_{k} l_{{_{01} }}^{'} + x_{k - 1} \left( {1 - x_{k} } \right)l_{{_{10} }}^{'} + x_{k - 1} x_{k} l_{{_{11} }}^{'} ,$$
(9)

which

$$\left\{ {\begin{array}{*{20}l} {l_{00}^{\prime } = \ln \frac{{1 - p_{2} (1 - \rho )}}{{1 - p_{0} (1 - \rho )}}} \hfill \\ {l_{{_{01} }}^{\prime } = \ln \frac{{p_{2} }}{{p_{0} }}} \hfill \\ {l_{{_{10} }}^{\prime } = \ln \frac{{1 - p_{2} }}{{1 - p_{0} }}} \hfill \\ {l_{{_{11} }}^{\prime } = \ln \frac{{1 - (1 - p_{2} )(1 - \rho )}}{{1 - (1 - p_{0} )(1 - \rho )}}} \hfill \\ \end{array} } \right.,$$
(10)

Hence, we have for \(k \ge 2,i,j = 0,1\)\(L_{{_{k} }}^{'} = l_{{_{ij} }}^{'}\) if xk − 1= i and xk= j. The Ti statistics for the two-sided MBCUSUM control chart for k = 1, 2, … are as follows:

$$T_{k} = \hbox{min} \left\{ {0,T_{k - 1} } \right\} + L_{k}^{\prime } ,$$
(11)

in which T0 = 0. An alarm is released if \(T_{k} \ge h_{T}^{\prime } .\) Note that, when ρ = 0, we get \(l_{00}^{\prime } = l_{10}^{\prime }\) and \(l_{01}^{\prime } = l_{11}^{\prime }\); the MBCUSUM control chart decreases to the Bernoulli CUSUM control chart when we divide Tk by \(l_{01}^{\prime } - l_{10}^{\prime }\).

Note that properties of the Bernoulli CUSUM control chart can be appraised using a small adjustment of the monitoring scheme. In this regard, let the CUSUM control statistic is a lattice random variable with values that are integer multiples of \(\frac{1}{{m^{'} }}\), in which m’ is a positive integer. This modification permits the Bernoulli CUSUM to be modeled as a Markov chain. Similarity, for the MBCUSUM control chart, we adopt the same approach and obtain an estimation MBCUSUM control chart by estimating \(L_{k}^{'}\) by a random variable where the values are integer multiples of a fixed value. The strategy applied to estimate Lk is to get the integer \(m^{\prime } = \text{nint}\left( {|\frac{1}{{l_{{_{00} }}^{\prime } }}|} \right),\) in which nint(·) represents the nearest integer value. Then, \(L_{k}^{'}\) is estimated using a new statistic denoted as \(L_{k}^{'*}\) for which the possible values are integer multiples of \(\frac{1}{{m^{'} }}\). Hence, we have Eq. (12) according to Mousavi and Reynolds (2009) for \(k \ge 2,\)

$$L_{k}^{'*} = \left\{ {\begin{array}{*{20}c} {l_{00}^{'*} = \text{n}\text{int} (l_{00}^{\prime } m^{\prime } )/m^{\prime } {\text{ if }}x_{k - 1} = 0{\text{ and }}x_{k - 1} = 0} \\ {l_{01}^{'*} = \text{n}\text{int} (l_{01}^{\prime } m^{\prime } )/m^{\prime } {\text{ if }}x_{k - 1} = 0{\text{ and }}x_{k - 1} = 1} \\ {l_{10}^{'*} = \text{n}\text{int} (l_{10}^{\prime } m^{\prime } )/m^{\prime } {\text{ if }}x_{k - 1} = 1{\text{ and }}x_{k - 1} = 0} \\ {l_{11}^{'*} = \text{n}\text{int} (l_{11}^{\prime } m^{\prime } )/m^{\prime } {\text{ if }}x_{k - 1} = 1{\text{ and }}x_{k - 1} = 1.} \\ \end{array} } \right.$$
(12)

Here, for the first observation, \(L_{1}^{'} = l_{10}^{'}\) when x1 = 0 and \(L_{{_{1} }}^{'} = l_{{_{01} }}^{'}\) when x1 = 1, so \(L_{1}^{'*} = l_{10}^{'*}\) when x1 = 0 and \(L_{1}^{'*} = l_{01}^{'*}\) when x1 = 1. Then, the estimation MBCUSUM control statistic is as follows:

$$T_{k}^{*} = \hbox{min} \left\{ {0,T_{k - 1}^{*} } \right\} + L_{k}^{'*} ,\quad k{ = 1,2,} \ldots$$
(13)

in which \(T_{0}^{*} = 0.\) An alarm is released if \(T_{k}^{*} \ge h_{T}^{'} ,\) and hc is denoted as an integer multiple of \(\frac{1}{{m^{'} }}.\) For more details, see Mousavi and Reynolds (2009).

Performance evaluation

Not that the ARL is not an suitable performance index when comparing control charts based on various sample sizes, Hence, instead we utilize the average number of observations to signal (ANOS), considered as the expected number of observations from the start of process monitoring until an alarm is released using the control chart (Reynolds and Stoumbos 1999, 2000). When the process is in-control, the ANOS should be large and the number of false alarms should be small. Moreover, if p shifts, it needs an index of how rapidly this augment is shown.

In some control charts, such as CUSUM control charts, the control statistics may not be at their starting values when the shift in parameter occurs. Because observations are gathered accumulately in the during time. Hence, the steady state ANOS is applied based on the assumption that the distribution of the control statistic occurs is the steady-state distribution of this statistic when the increase in p, conditional on any false alarms. In this regard, consider first a process with p0 = .010 and p = .05 and the proposed control chart based on samples of n = 100.

Table 1 shows the in-control ANOS and out-of-control SSANOS values for the Bernoulli CUSUM chart and the one-sided MBCUSUM chart as well as the two-sided MBCUSUM chart. It is worth mentioning that control limits in the CUSUM control charts have been set to obtain an in-control ANOS nearly the same as for the Shewhart control chart. Also, the ANOS and SSANOS values were calculated by a simulation study using 10,000 simulation runs for the exact MBCUSUM. In addition, the number of states used is given at the bottom of the table when the ANOS and SSANOS values of a control chart were given using a Markov chain model. Note that the properties of the approximate two-sided MBCUSUM control chart were evaluated by modeling the statistics Tk and Sk as a Markov chain similar to Mousavi and Reynolds (2009).

Table 1 ANOS and SSANOS values for Shewhart, CUSUM, and two-sided MBCUSUM charts for detecting shifts in p when p0 = .010 and p = 0.05

Succinctly, as seen in this table, the two-sided MBCUSUM chart has better performance than the Bernoulli CUSUM and Shewhart control chart. In other words, the proposed monitoring procedures work well and provide appropriate ARL criteria. The results of simulation studies show that the proposed MBCUSUM control chart performs better than monitoring the autocorrelated Bernoulli observations. So we conclude that the MBCUSUM is a better choice when there is autocorrelation.

Conclusion and future researches

Sometimes, there are binary observations from a process that follow a two-state Markov chain model. In these situations, it has shown that the autocorrelation affects a deleterious on traditional procedures designed for independent observations due to many false alarms. Thus, the two-sided MBCUSUM control chart proposed here is based on a log-likelihood-ratio statistic obtained from the two-state Markov chain model. The two-sided Bernoulli-based MBCUSUM control chart can be well estimated using a Markov chain, and this allows the two-sided MBCUSUM chart to be set up to have specific desired statistical properties. For this aim, we used the general result by Megahed et al. (2011) to set sufficient conditions in which the ARL of the two-sided MBCUSUM procedure can be obtained exactly from the ARLs of the corresponding upper and lower CUSUM control charts. The simulation studies showed the satisfactory performance of the proposed control chart. Considering the other distributed observations and self-starting procedure could be considered as future researches in this context.