Trend Autoregressive Model Exact Run Length Evaluation on a Two-Sided Extended EWMA Chart

The Extended Exponentially Weighted Moving Average (extended EWMA) control chart is one of the control charts and can be used to quickly detect a small shift. The performance of control charts can be evaluated with the average run length (ARL). Due to the deriving explicit formulas for the ARL on a two-sided extended EWMA control chart for trend autoregressive or trend AR(p) model has not been reported previously. The aim of this study is to derive the explicit formulas for the ARL on a two-sided extended EWMA control chart for the trend AR(p) model as well as the trend AR(1) and trend AR(2) models with exponential white noise. The analytical solution accuracy was obtained with the extended EWMA control chart and was compared to the numerical integral equation (NIE) method. The results show that the ARL obtained by the explicit formula and the NIE method is hardly different, but the explicit formula can help decrease the computational (CPU) time. Furthermore, this is also expanded to comparative performance with the Exponentially Weighted Moving Average (EWMA) control chart. The performance of the extended EWMA control chart is better than the EWMA control chart for all situations, both the trend AR (1) and trend AR(2) models. Finally, the analytical solution of ARL is applied to real-world data in the health field, such as COVID-19 data in the United Kingdom and Sweden, to demonstrate the efficacy of the proposed method.


Introduction
The Control chart is one of the statistical process control instruments and has been applied in many fields such as finance, economics, industry, health, and medicine (see [1][2][3][4][5]). The concept of the control chart was initially introduced in 1931 by Shewhart [6]. The Shewhart control chart is more efficient in detecting large shifts in the processes. Next, the cumulative sum (CUSUM) [7] and the exponentially weighted moving average (EWMA) [8] control charts show that both are effective in detecting small shifts. After that, the EWMA control chart has been improved by many researchers, such as the modified exponentially weighted moving average (Modified EWMA) control chart that was originally presented by Patel et al. [9] and developed by Khan et al. [10]. These are effective in detecting small shifts quickly for where X t is a process with mean, λ is an exponential smoothing parameter with λ ∈ (0, 1] and Z 0 is the initial value of the EWMA statistic, Z 0 = u. The upper control limit (UCL) and the lower control limit (LCL) are where L is a suitable control limit width, μ is a process mean and σ is a process standard deviation.
The stopping time is given by where h is UCL and a is LCL.

Extended Exponentially Weighted Moving Average (Extended EWMA) Control Chart
The extended EWMA control chart was proposed by Neveed et al. [11]. It is developed from the EWMA control chart. That is a good performance control chart for detecting small shifts in the monitored process. The extended EWMA statistic can be expressed as follows: (4) where X t is a process with mean, λ 1 and λ 2 are exponential smoothing parameters with λ 1 ∈ (0, 1) and λ 2 ∈ (0, λ 1 ), E 0 is the initial value of the extended EWMA statistic, E 0 = u . The upper and lower control limits (UCL and LCL) are UCL ¼ l 0 þ Qr ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi k 2 1 þ k 2 2 À 2k 1 k 2 ð1 À k 1 þ k 2 Þ 2ðk 1 À k 2 Þ À ðk 1 À k 2 Þ 2 s and LCL ¼ l 0 À Qr where Q is a suitable control limit width, μ is a process mean and σ is a process standard deviation.
The stopping time is given by where b is UCL and a is LCL.
3 Analytical Solution of ARL on a Two-Sided Extended EWMA Chart for the Trend AR(p) Model The observations equation for the autoregressive with trend or the trend AR(p) model in the case of exponential while noise is defined as where η is a suitable constant, γ is a slop, f i is an autoregressive coefficient at i = 1, 2, …, p such that |f p | < 1 and ɛ t is white noise sequence of exponential (ɛ t ∼ Exp(α)). The probability density function of ɛ t is given by f ðxÞ ¼ 1 a e À x a where x ≥ 0. The extended EWMA statistics E t can be written as If a and b are the lower and upper control limits of E t for in-control process, then a < E t < b.
Consequently, the extended EWMA statistics E t can be written as Let L E (u) denote the ARL on a two-sided extended EWMA control chart for the trend AR(p) model. The function L E (u) can be derived by Fredholm integral equation of the second kind [29], L E (u) is defined as follows: So, the function L E (u) is obtained as follows: Next step, Eq. (10) is changed by the variable of integration, and then L E (u) is obtained as: If ɛ t ∼ Exp(α), then when HðuÞ ¼ e Consequently, Consider the constant K and take turn L(k) with Eq. (13), Substituting constant K form Eq. (14) into Eq. (13), then L E (u) can be written as Finally, the solution of Eq. (15) is the explicit formula of ARL on a two-sided extended EWMA control chart for the trend AR(p) model. The process is in-control with the exponential parameter α = α 0 , whereas the process is out-of-control with the exponential parameter α = α 1 , and then α 1 = (1 + δ)α 0 where α 1 > α 0 and δ is the shift size.

NIE Method of ARL on a Two-Sided Extended EWMA Chart for the Trend AR(p) Model
The NIE method is one of the techniques that is used to approximate the ARL on a two-sided Extended EWMA chart for the trend AR(p) model. Let L N (u) be the estimated value of the ARL with the m linear equation systems by using the composite midpoint quadrature rule [16].
The ARL approximating NIE method on a two-sided extended EWMA chart is evaluated as follows: The system of m linear equation is showed as: . . . ; 1Þ and 1 mÂ1 ¼ ½1; 1; . . . ; 1 T : Let R m×m be a matrix, the definition of the m to m th element of the matrix R is given by So, the solution of numerical integral equation can be explained as . . . ; m, w j is a weight of the composite midpoint formula w j ¼ bÀa m .
5 Existence and Uniqueness of ARL By using the Banach's Fixed-Point Theorem, the ARL solution demonstrates that the integral equation for explicit formulas exists only once. Let T be an operation in the class of all continuous functions.
If an operator T is a contraction, then the fixed-point equation T(L E (u)) = L E (u) has a unique solution. To show that Eq. (18) exists and has a unique solution, theorem can be used as follows below.
Theorem 1 Banach's Fixed-point Theorem: Let X be a complete metric space and T:X → X be a contraction mapping with contraction constant r ∈ [0, 1) such that ‖T(L 1 ) − T(L 2 )‖ ≤ r‖L 1 − L 2 ‖, 8L 1 ; L 2 2 X . Then there exists a unique L( ⋅ ) ∈ X such that T(L E (u)) = L E (u), i.e., a unique fixed-point in X .
Comparing the ARL Results According to Eq. (17), the ARL of the NIE method is approximated by division points m = 1,000 nodes. The solution of the NIE method is compared to the explicit formula for the trend AR(p) model on the extended EWMA chart by using the computation time (CPU time) and the absolute percentage relative error (APRE) [30], which can be computed as The speed test results were computed by the CPU time (PC System: windows10, 64-bit, Intel® Core™ i5-8250U 1.60, 1.80 GHz, RAM 4 GB) in seconds. In addition, the numerical results were computed by MATHEMATICA. The initial parameter value was studied at ARL 0 = 370 on a two-sided extended EWMA chart for the trend AR(p) model namely the trend AR(1) and trend AR(2) models with exponential white noise and given λ 1 = 0.05, λ 2 = 0.01. The in-control process was presented a parameter value as α = α 0 with shift size (δ = 0). On the other hand, the out-of-control process was presented parameter values as α 1 = (1 + δ)α 0 with shift sizes (δ = 0.001, 0.003, 0.005, 0.010, 0.030, 0.050, 0.100, 0.500, 1.000). Moreover, the coefficient parameters of the process (f 1 = 0.1, − 0.1) and (f 1 = 0.1, f 2 = 0.1, − 0.1) were used for the trend AR(1) model, and the trend AR(2) model, respectively. The process has determined that slope γ equals 0.1.
The performance comparisons of the explicit formula (as Eq. (15)) and NIE method (as Eq. (17)) are explained with ARL. In Tabs. 1 and 2, the ARL values derived from the explicit formula can help decrease the CPU time. The analytical results agree with NIE approximations with an APRE(%) less than 0.0000043% and 0.0000035%, and then the CPU time of approximately 8.8-10.5 and 9.3-11.5 s, for the trend AR(1) and trend AR(2) models, respectively, whereas the CPU time of the explicit formulas is less than 0.1 s, as well as the trend AR(1) and trend AR(2) models Table 1: Comparing ARL values on the extended EWMA control chart for the trend AR(1) model using explicit formulas against the NIE method given λ 1 = 0.05, λ 2 = 0.01, η = 0, a = 0, γ = 0.1 for ARL 0 = 370   Comparing ARL values on the extended EWMA control chart for the trend AR(2) model using explicit formulas against the NIE method given λ 1 = 0.05, λ 2 = 0.01, η = 0, a = 0, γ = 0.1 for ARL 0 = 370

Performance Comparing the ARL Results
The relative mean index (RMI) [31] is used to test the performance of a two-sided extended EWMA control chart on different bound control limits [a, b] and the comparative performance of the ARL under various λ conditions. The RMI can be computed as where ARL i (c) is the ARL of the control chart for the shift size of row i, ARL i (s) is the smallest ARL of all of the control chart for the shift size of row i. The control chart's RMI value was the lowest, indicating that the control chart had the best performance at change detection.  Besides, a two-sided extended EWMA control chart under various conditions (λ 2 = 0.01, 0.02, 0.04) are compared to the EWMA control chart (λ 2 = 0) at λ 1 = 0.05, 0.10, γ = 0.1, η = 0, a = 0.05 and ARL 0 = 370 for f 1 = 0.3 (as the trend AR(1) model) and f 1 = f 2 = 0.3 (as the trend AR(2) model). The lower and upper control limits of the EWMA and extended EWMA control charts for the trend AR(1) and trend AR(2) models are obtained in Tabs. 5 and 6. The results in Tabs. 7 and 8 show that the RMI value of λ 1 = 0.05 is equal to 0. The exponential smoothing parameter of 0.05 is recommended. In addition, the RMI results show that the extended EWMA chart with λ 2 = 0.04(EEWMA0.04), (RMI = 0) had fewer RMI values than the extended EWMA chart with either λ 2 = 0.01(EEWMA0.01) or λ 2 = 0.02(EEWMA0.02) and the EWMA(λ 2 = 0) control chart for all situations, both the trend AR(1) and the trend AR(2) models.      The results indicate that the performances of the control charts were, in ascending order, the extended EWMA with λ 2 = 0.04, extended EWMA with λ 2 = 0.02, extended EWMA with λ 2 = 0.01 and EWMA control charts, as illustrated in Figs. 1 and 2.

Application to Real Data
The ARL was constructed using explicit formulas on a two-sided extended EWMA control chart with ARL 0 = 370 for λ 1 = 0.05 and various λ 2 = 0.01, 0.02, 0.04, and its performance was compared with the EWMA (λ 2 = 0) control chart using data on the number of COVID-19 patients in hospitals per million people in the United Kingdom and Sweden. The observations were made daily from June 26 th to September 10 th , 2021 and from January 24 th to April 20 th , 2021, respectively. This data is a stationary time series by looking at the autocorrelation function (ACF) and partial autocorrelation function (PACF). The dataset for the trend AR(1) model was assigned as the significance of the mean and standard deviation were 79.32026 and 27.69376, respectively. The trend AR(p) model in Eq. (7), the observations of the trend AR(1) model was defined as X t = (0.810841)t + (0.964959)X t−1 + ɛ t and the error was exponential white noise (α 0 = 1.684939). Meanwhile, the observations of the trend AR(2) model was defined as X t = (0.592171)t + (0.744252)X t−1 + (0.219693)X t−2 + ɛ t and the error was exponential white noise (α 0 = 0.544925). The RMI results show that the extended EWMA with λ 2 = 0.04 chart reduced the RMI values more than the extended EWMA chart with either λ 2 = 0.01 or λ 2 = 0.02 and the EWMA control chart for all situations, both the trend AR(1) and trend AR(2) models. The results in Tab. 9 agree with the simulation results in Tab. 7. Similarly, the results in Tab. 10 agree with the simulation results in Tab. 8.
Hence, the extended EWMA (λ 2 = 0.04) and EWMA (λ 2 = 0) control charts were plotted by calculating E t and Z t for the two datasets when given λ 1 = 0.05. Detecting the process with real data of the number of COVID-19 patients in hospitals per million people in the United Kingdom and Sweden were shown in Figs. 3 and 4, respectively. In Fig. 3, the ARL of the extended EWMA and EWMA control charts indicates that, the process was signaled as out-of-control at the 7 th and 13 th observations, respectively. In  4, the ARL of the extended EWMA and EWMA control charts indicates that the process was signaled as out-of-control at the 1 st and 27 th observations, respectively. As a result, a two-sided extended EWMA control chart can detect shifts faster than the EWMA control chart.

Discussions and Conclusions
The performances of control charts were evaluated by using ARL. The explicit formulas comprise a good alternative to the NIE method for constructing the ARL, both the trend AR(1) and trend AR(2) models. The performance comparison of the ARL using explicit formulas on a two-sided extended EWMA on different bound control limits [a, b] and the comparative performance of the ARL under various λ conditions is further tested by using the relative mean index (RMI). The RMI values of the lower bound (a = 0.05) are 0. The extended EWMA control chart has given a higher capability for detecting shifts if the lower bound has been higher. When the comparative performance of the ARL under various λ 1 conditions is examined, the RMI value with λ 1 = 0.05 is equal to 0. So, the exponential smoothing parameter of 0.05 is recommended. Furthermore, the extended EWMA control chart has a higher efficiency if λ 2 is increased. After that, the extended EWMA control can detect shifts faster than the EWMA control chart when the datasets were verified by calculating the control charts. Finally, the simulation study and the performance illustration with real data using data on the number of COVID-19 patients in hospitals per million people in the United Kingdom and Sweden provided similar results.