Adaptive CUSUM for Steady State Normal Data

This chapter deals with monitoring plans that exploit temporal predictable trends by adjusting the cumulative sum (CUSUM) plan to be efficient for their early detection. The adjustment involves changing the amount of memory the chart retains to detect persistent changes in location early. The focus is on steady-state situations when either the shift size is known in advance or when it is unknown. Several options are explored using simulation studies, and an example of application is considered.


Introduction
The adaptive CUSUM of Sparks [12] exploits temporal predictable trends by adjusting its design to be efficient for the early detection of such trends.The adjustment involves changing the amount of memory the chart retains to detect persistent changes in location earlier.
In the zero-state case, Moustakides [6] proved that a step change of δ is best detected by using Page's [7] conventional CUSUM with the reference value k = δ/2.Gan [3] demonstrated that the conventional CUSUM with k = 0.5 is optimal in the zero-state in their Table 1 for a shift of one and standard normal distributed data.The adaptive CUSUM has been shown to be better at times at detecting small shifts in location than the conventional CUSUM with the optimal k value for that shift.For example, in the standard normal distribution case, the shift of 1 for the adaptive CUSUM is detected with an average run length (ARL); in Table 3 of Sparks [12] is 9.29 or 9.34, while the zero state optimal conventional CUSUM with k = 0.5 has an ARL of 9.34 (see also [5] Table 2).Hence, the adaptive CUSUM can have smaller out-of-control ARLs than the best CUSUM in the zero-state situation.The reason for this is that, for smaller shifts, the adaptive CUSUM can exploit the steady-state situation by making use of the local knowledge about the size of its shift.For unknown large shifts this is more difficult because one often flags the change before it can be accurately predicted.In other words the adaptive CUSUM when the CUSUM was first advocated by Page [7].Most applications in environmental sciences are steady state since the process cannot be stopped.The majority of service processes, although can be stopped, are hardly ever stopped and restarted.Thus, they may be referred to as steady-state processes.
For this reason zero-state processes are less common, thus, revealing a scientific area that needs to be further researched.

Literature review
Sparks's [12] adaptive CUSUM improved the CUSUM early detection performance by appropriately adjusting the reference value k to improve its early detection performance.This paper will introduce and elaborate on a different approach to optimise equilibrium conditions and draw on observed outcomes.Jiang et al. [5] followed Sparks [12] in using the zero-state optimal reference value of the shift value divided by 2, but introduced a weighting function for the departures of the control variable from the zero-state optimal reference value.
In particular, open-ended work should focus in optimising the CUSUM in steady-state situations (even for known shifts).
This paper starts by introducing the conventional CUSUM and the adaptive CUSUM statistics.It derives the thresholds for the CUSUM plans in steady-state situations for high-sided signals only.Low-sided charts can be established by symmetry and two-sided charts can be applied by simultaneously applying two one-sided charts and halving the in-control ARL of the high-sided chart.The high-sided charts for steady-state situations are designed to deliver a specific in-control ARL of either 100, 200, 300, …, 1000 (see Appendix A).Monitoring plans are defined in Sparks [14].If the location is known in advance then this paper establishes the reference value closest to the best plan for the steady-state situation.A simulation study is carried out to find the CUSUM p best for the early detection of a known location shift.
Methods that compete with the adaptive CUSUM in terms of performance involve the simultaneous application of multiple CUSUMs with differing levels of memory [4,12], combining Shewhart and CUSUM charts [8,11], the adaptive EWMA [1] and multiple moving averages [13].Ryu et al. [9] assumes the shift is known and optimises the CUSUM plan without mentioning whether it is based on zero or steady state, and therefore it must be viewed as competing methodology.However, this paper's contribution is on improving the out-of-control performance of the adaptive CUSUM plan in the steady-state situation and provides formulae to estimate the thresholds for the high-sided conventional CUSUM in steady-state situations.

CUSUM and adaptive CUSUM plans
Let y t the process variable measured at time t which has mean μ and variance σ 2 .Define the standardised score as z t = (y t À μ)/σ.Then Page's CUSUM plan for high-sided location changes is given by where k is referred to as the reference value that determines the level of past memory held by the CUSUM statistic.The resetting to zero of the CUSUM statistic is the process that controls the memory in the plan.Large values of k will make the CUSUM statistic operate like the memoryless Shewhart chart by frequently resetting to zero.Smaller values of k retain more historical information in the plan by resetting to zero less often.Therefore, practitioners would like to have large values of k when the shift is large and small values of k when shifts are small.Small values of k allow the CUSUM to accumulate more information thus having sufficient power to detect small shifts.The conventional CUSUM statistic signals an unusual location shift on the high side whenever where h(k) is the positive valued threshold that delivers a specified in-control ARL in the steady-state situation.Appendix A provides models for accurately predicting the thresholds for the conventional CUSUM in the steady-state situation.
The adaptive CUSUM allows the reference value to change over time t and is given by using the adaptive CUSUM statistic: and flags an out-breaks whenever this exceeds a threshold of approximately 1.The challenge in practice is how to change k t over time t to improve the early detection performance of the plan.An alternative approach that is explored in this paper is how to select (z t À k t )/h(k t ) to improve the early detection performance of the plan.
Sparks's [12] plan was based on the hypothesis that the zero-state optimal setting was going to be optimal in the steady-state situation.This is however, not the case.The examples that illustrate this are reported in Figure 1(a)-(c).
Figure 1 plots the conventional CUSUM divided by its threshold (i.e., C U t =h k ð Þ for k = 0.25 and 0.2125 both designed to have an in-control ARL of 200) for 100 observations from a normal distribution.The first 80 observations are in-control standard normal data and the last 20 normally observations that are shifted on the high side by 0.5.Note that k = 0.25 is the value which is the zero-state optimal value established by Moustakides [6] for this shift, while k = 0.2125 is a better alternative in the steady-state situation.Note that prior to the change point    This begs the question of what reference values k in the steady-state situations are better at detecting location changes from the in-control mean than k equal to shift divided by 2 that is optimal for the zero-state.

Near optimal steady-state plans when the shift is known
A simulation study was carried out that started with running through 25 in-control observations before generating the out-of-control situations.This was designed to simulate a steadystate situation prior to the change point.The thresholds for this process are given in Appendix A for the standard normal distribution.There is no loss of generality by assuming mean of zero and variance of one, however the results only apply to normally distributed data.The smallest out-of-control ARLs for various scenarios are presented in Table 1 for in-control ARL = 200, and for in-control ARL = 800 in Table 2.
The reference value with the smallest out-of-control ARL is highlighted in bold text, e.g., for incontrol ARL = 200 and a location shift of δ = 0.5 the near optimal steady state k is 0.2125 with an out-of-control ARL = 16.699 while the zero state optimal in the steady-state situation k = 0.25 delivers an out-of-control ARL = 16.847(see Table 1(a)).In most cases the last entry in the rows of Tables 1 and 2 is the zero-state optimal value of k equal to the location change divided by 2. Notice that k = δ/2 is never the plan with the smallest out-of-control ARL-the k with the smallest out-of-control ARL is always smaller than δ/2; in other words the better plan which resets the CUSUM statistic to zero a little less often.
The optimal reference value is reported in bold text in Table 2, for example, for in-control ARL = 800 and a location shift of δ = 0.5 the near optimal steady state k is 0.2375 with an out-ofcontrol ARL = 26.449while the zero state optimal in the steady-state situation k = 0.25 delivers an out-of-control ARL = 26.543(see Table 1(a)).Notice that relative to Table 1, k = δ/2 is closer to the plan with the smallest out-of-control ARL than in Table 1, that is, the k with the smallest out-ofcontrol ARL is always smaller than δ/2 but now the difference between the k with the smallest outof-control ARL and δ/2 is less than was found in Table 1.For this reason we expect less relative gain by optimising the adaptive CUSUM for the steady-state situation with larger in-control ARL.

Improving adaptive CUSUM performance for the steady-state situation
The EWMA statistic in Sparks [12] and Jiang et al. [5] is used to forecast the change δ.However, this forecast always under-estimates the change in location.This bias in prediction is more severe for large shifts where only a few observations can be used to optimise the CUSUM before the change is signalled.For this reason the EWMA statistic is thresholded to not fall below a certain minimum values, e.g., where 0 < α < 1, δ min is the smallest positive location change one wishes to detect early and SP 0 = δ min .This paper takes δ min = 0.5 and α = 0.2.Since this forecast is biased and the change in location is unknown in advance it is difficult to know what value to use for the reference value k t given the knowledge of SP t .Sparks [12] used k t = SP t À 1 /2 based on the assumption that this was the optimal zero-state situation.For additional information of adaptive plans see [10,16,18].
Given SP t under predicts the change and the optimal k t for in steady-state situation is generally lower than SP t À 1 /2 (the EWMA one time ahead forecast divided by 2) or SP t /2 (the local smoothed value) this may be a good compromise strategy.When a change occurs then generally k = SP t /2 is less biased for this change than k = SP t À 1 /2 .
In other words the local smoothed value SP t is used to establish k rather than the step-ahead forecast SP t À 1 .This section explores whether this is a better alternative than the forecast.The comparisons of columns 2 and 3 in Tables 3-8 indicate that using the reference value equal to SP t /2 becomes less attractive as in-control ARL increases, for example, for in-control ARL equal to 100 it has the smaller out-of-control ARL in most cases, but when the in-control ARL = 800 it  is only preferred when delta = 0.5.As such, selecting k = SP t /2 is preferred if the in-control ARL = 100.However, its preference soon drops off as the in-control ARL increases from 200.
5.1.Attempts to improve on the adaptive plan of Sparks [12] in steady-state situations Recall the adaptive CUSUM Now the Signal-to-Noise Ratio, SNR, (z t À k t )/h(k t ) will be selected that will improve the detection performance of the plan.The EWMA smoothed trend in the z t is given by Next, k t is chosen such that the Signal-to-Noise Ratio (z t À k t )/h(k t ) is a maximum, denote for positive k values.The k is restricted to be greater than 0.22 in this paper which means we are less interested in location shifts less than 0.5 standard deviations.Note that SNR t < 0 whenever z t < 0.22.The new adaptive CUSUM statistic is now defined by The threshold for this CUSUM is expected to be larger than 1.Therefore an increase in location is flagged when where h opt is selected to deliver a specified in-control ARL.The results in Tables 3-8 outline the performance of this plan relative to the traditional adaptive CUSUM plan of Sparks [12] in the case where the in-control ARL = 100, 200, 300, 400, 600 and 800 (in the 3rd column).
Table 3 indicates that the user should select the EWMA weights to be 0.7 to improve on the traditional adaptive CUSUM plan when 0 < δ ≤ 0.75 and δ ≥ 2.25 for in-control ARL = 200, but for all in-control ARL tried (in-control ARL6 ¼200) there is no advantage in using this plan in all cases except when δ = 0.5.

Example of application
The example of application is the nitrogen dioxide (NO 2 ) values at Liverpool (a suburb in the western part of Sydney, Australia).Nitrogen dioxide primary gets into the air from the burning of fuel.High exposure to this can cause respiratory problems such as asthma (see WHO [17]).Nitrogen dioxide reacts with other chemicals in the air to form both particulate matter and ozone (see [2]).Both of these are harmful to humans and possibly animals when inhaled.
The data was downloaded from New South Wales (Australia) Heritage Foundation website on air pollution.Data ranged from the beginning of 2010 to the end of March 2017 and were daily averages.
The data up to the end of August 2016 were used as training data to fit both the (in-control) mean and standard deviation of the normal distribution using gamlss library in R [15].The model had explanatory variables as time in days, day-of-the-week and harmonics.Harmonics are included because there were strong seasonal influences on nitrogen dioxide values at Liverpool.The qq-normal plot of standardised residuals of this model indicated that the normal assumption for the residuals was appropriate.This fitted model was then used to predict the mean and standard deviation for the period on 1 September 2016-31 March 2017 (taken as the expected value and standard deviation for in-control data).
The actual daily average nitrogen dioxide measures were standardised by subtracting their fitted mean and dividing by the fitted standard deviation.The adaptive CUSUM was then applied to these standardised scores to see if these values had increased significantly from expect during the period 1 September 2016-31 March 2017.The plan was designed to deliver an in-control ARL of 200.Whenever the chart flagged a significant increase the adaptive CUSUM was set equal to zero to see if the nitrogen dioxide levels remained significantly higher than expected.Adaptive CUSUM for Steady State Normal Data http://dx.doi.org/10.5772/intechopen.70752

Conclusions and further work
Although the new adaptive CUSUM has promise, the SNR t proved too volatile to be efficient.There may be merit in establishing a smoother version of SNR t that is less noisy.If future location shifts are known, then this paper offers the mean of selecting an optimal adaptive CUSUM plan.
A. Appendix 2125 but after a near missed signal at time 71 theC U t k ð Þ=h k ð Þ with k = 0.2125 is higher than the C U t k ð Þ=h k ð Þ values with k = 0.25.This increase is enough to flag this change in the last 20 observations while the conventional CUSUM fails to signal.

Figure 1
Figure 1(b) illustrates that fact that the CUSUM plan with k = 0.2125 is less likely to reset to zero than the CUSUM plan with k = 0.25 and therefore is likely to flag the change in the last 20 observations sooner than the CUSUM with k = 0.25.

Figure 1 .
Figure 1.(a) Example 1 of when zero state optimal k = 0.25 does not do better than k = 0.2125.(b) Example 2 of when k = 0.2125 resets the CUSUM to zero than k = 0.25 and there has a better chance of detecting small shifts early.(c) Example 2 of when zero state optimal k = 0.25 does not do better than k = 0.2125.

Figure 1
Figure 1(c) exemplifies that the CUSUM plans with k = 0.2125 and k = 0.25 are almost identical for the first 60 in-control observations, but once the change occurs CUSUM with k = 0.2125 accelerates to the threshold quicker than the CUSUM plan with k = 0.25, and thus flagging this shift earlier.Extensive simulated examples not reported in this paper revealed that these plans, on most occasions, are almost identical.However, in a few examples as illustrated in Figure 1(a)-(c) the plan with k = 0.2125 exploits the situation better by being less likely to rest to zero and thus, more likely to flag an out-break in a steady-state situation earlier.

Figure
Figure 2a adaptive CUSUM values as advocated in this paper for in-control ARL = 200 is plotted against the date for the period.

Figure 2b is the
Figure2bis the adaptive CUSUM of Sparks[12].Both signal an increase in nitrogen dioxides on 8 May 2016, but the adaptive CUSUM values NC U t k ð Þ signals again on the 18 May 2016 after starting the CUSUM again at zero.The traditional adaptive CUSUM of Sparks[12] failed to signal a second time (Figure2b).

Figure 2 .
Figure 2. (a) The adaptive CUSUM NC U t k ð Þ advocated in this paper for in-control ARL = 200.(b) The adaptive CUSUM of Sparks [12].

Table 1 .
Optimal offset values (k) for detecting certain size shifts when the in-control ARL = 200.

Table 2 .
Optimal offset values (k) for detecting certain size shifts when the in-control ARL = 800.

Table 3 .
Comparison of adaptive CUSUM plans for in-control ARL = 100.

Table 5 .
Comparison of adaptive CUSUM plans for in-control ARL = 300.

Table 4 .
Comparison of adaptive CUSUM plans for in-control ARL = 200.

Table 6 .
Comparison of adaptive CUSUM plans for in-control ARL = 400.

Table 7 .
Comparison of adaptive CUSUM plans for in-control ARL = 600.

Table 8 .
Comparison of adaptive CUSUM plans for in-control ARL = 800.