# Optimal Design of One-Sided Exponential Adaptive EWMA Scheme Based on Median Run Length
## 3 RL Properties of the One-Sided Exponential AEWMA Schemes
### A Markov Chain Method to RL Properties
\begin{array}{ll}F_{8}\biggl{(}\frac{\phi^{-1}(H_{j}^{-}-H_{i }^{+}+\Delta^{+})+H_{i}^{+}}{c}\biggr{)},&j=1,\\ F_{8}\biggl{(}\frac{\phi^{-1}(H_{j}^{+}-H_{i}^{+}+\Delta^{+})+H_{i}^{+}}{c} \biggr{)}-F_{8}\biggl{(}\frac{\phi^{-1}(H_{j}^{+}-H_{i}^{+}-\Delta^{+})+H_{i}^ {+}}{c}\biggr{)},&j=2,\ldots,N.\end{array} \right. \tag{17}\]  
For the lower-sided exponential AEWMA scheme, the in-control interval \((LCL^{-},B^{+}]\) is divided into \(N\) subintervals, each subinterval \((H_{i}^{-}-\Delta^{-},H_{i}^{-}+\Delta^{-}]\) with a width of \(2\Delta^{-}=\frac{B^{-}-LCL^{-}}{N}\), where \(H_{i}^{-}\) represents the center value of the \(i\)th subinterval:  
\[H_{i}^{-}=B^{-}-(2i-1)\Delta^{-},\quad i=1,2,\cdots,N. \tag{18}\]  
Similarly, the transient transition probability matrix \(\mathbf{Q}=[p_{i,j}]_{N\times N}\) for the lower-sided exponential AEWMA scheme can be obtained, where  
\[p_{i,j}=\left\{ \begin{array}{ll}\Pr(A_{t}^{-}>H_{j}^{-}-\Delta^{-}|A_{t-1}^ {-}=H_{i}^{-}),&j=1,\\ \Pr(H_{j}^{-}-\Delta^{-}<A_{t}^{-}\leq H_{j}^{-}+\Delta^{-}|A_{t-1}^{-}=H_{i}^ {-}),&j=2,\ldots,N.\end{array} \right. \tag{19}\]  
Substituting Equations (3), (9) and (15) into Equation (19) and combining with Equation (4) yields:  
\[p_{i,j}=\left\{ \begin{array}{ll}1-F_{8}\biggl{(}\frac{\phi^{-1}(H_{j}^{-}-H_ {i}^{-}-\Delta^{-})+H_{i}^{-}}{c}\biggr{)},&j=1,\\ F_{8}\biggl{(}\frac{\phi^{-1}(H_{j}^{-}-H_{i}^{-}+\Delta^{-})+H_{i}^{-}}{c} \biggr{)}-F_{8}\biggl{(}\frac{\phi^{-1}(H_{j}^{-}-H_{i}^{-}-\Delta^{-})+H_{i} ^{-}}{c}\biggr{)},&j=2,\ldots,N.\end{array} \right. \tag{20}\]  
Assume the initial probability vector for the process is \(\mathbf{q}=(q_{1},q_{2},\ldots,q_{N})^{\intercal}\), where  
\[q_{j}=\left\{ \begin{array}{ll}1,&A_{0}^{+}\in[H_{i}^{+}-\Delta^{+},H_{i}^{+} +\Delta^{+})\text{ or }A_{0}^{-}\in[H_{i}^{-}-\Delta^{-},H_{i}^{-}+\Delta^{-}),\\ 0,&\text{others}.\end{array} \right. \tag{21}\]  
As discussed in [33; 34], the steps required for a Markov chain to reach the absorbing-state can be modeled as a Discrete Phase random variable, characterized by \((\mathbf{Q},\mathbf{q})\). The probability mass function (p.m.f.) \(f_{RL}(\ell|\mathbf{Q},\mathbf{q})\) and the c.d.f. \(F_{RL}(\ell|\mathbf{Q},\mathbf{q})\) of the RL distribution for the one-sided exponential AEWMA schemes are given by:\[f_{RL}(\ell|\mathbf{Q},\mathbf{q}) = \mathbf{q}^{\intercal}\mathbf{Q}^{\ell-1}\mathbf{1}-\mathbf{q}^{ \intercal}\mathbf{Q}^{\ell}\mathbf{1}, \tag{22}\] \[F_{RL}(\ell|\mathbf{Q},\mathbf{q}) = 1-\mathbf{q}^{\intercal}\mathbf{Q}^{\ell}\mathbf{1}. \tag{23}\]  
Finally, the ARL and MRL values of the proposed one-sided exponential AEWMA scheme can be computed as follows:  
\[ARL=\mathbf{q}^{\intercal}(\mathbf{I}-\mathbf{Q})^{-1}\mathbf{1}, \tag{24}\]  
\[F_{RL}(MRL-1|\mathbf{Q},\mathbf{q})\leqslant 0.5\qquad\text{and}\qquad F_{RL}( MRL|\mathbf{Q},\mathbf{q})>0.5. \tag{25}\]  
However, the Markov chain method can be computationally intensive due to the complexity involved in calculating the transient transition probability matrix \(\mathbf{Q}\). To address this issue, it is recommended to set the number of states \(N\) in \(\mathbf{Q}\) to 300. This adjustment significantly enhances computational speed while incurring only a minimal loss in precision. Empirical studies have demonstrated that an \(N\) value of 300 provides a good balance between accuracy and efficiency, making it suitable for practical applications [35; 36]. Furthermore, when calculating the MRL, it is suggested to employ the bisection method to improve computational efficiency.