# Change-Point Detection in Autoregressive Processes via the Cross-Entropy Method
## 4 Numerical Experiments
### Example 3: AR(1) Processes with Multiple Change-Points  
In this example, we consider a case of multiple change-points assuming that both the mean and the autocorrelation coefficient may change at the same time.  
Firstly, we generated one set of 100 AR(1) sequences of length 201 with three change-points located at \(\tau_{1}=20\), \(\tau_{2}=60\), and \(\tau_{3}=120\). For each segment we used the following parameters: the mean levels of \(\delta_{1}=0\), \(\delta_{2}=3\), \(\delta_{3}=1\), and \(\delta_{4}=0\); the autocorrelation coefficients of \(\rho_{1}=0.1\), \(\rho_{2}=0.9\), \(\rho_{3}=0.9\), and \(\rho_{4}=0.5\), respectively.  
Table 5 illustrates that none of the three methods could estimate the number of changes well enough. AR1 seg performs the best under this test. A similar underestimation issue persists in the strucchange and CE.AR methods. The underestimation is less severe in the CE.AR method; strucchange shows the least accuracy in this case.  
Next, we generated another set of 100 AR(1) sequences of length 201 with three change-points at \(\tau_{1}=20\), \(\tau_{2}=60\), and \(\tau_{3}=120\). For each segment, the mean levels were \(\delta_{1}=0\), \(\delta_{2}=3\), \(\delta_{3}=1\), and \(\delta_{4}=0\), while the autocorrelation coefficients were \(\rho_{1}=-0.1\), \(\rho_{2}=0.9\), \(\rho_{3}=-0.9\), and \(\rho_{4}=0.5\).  
Figure 5: The figure describes the setting of scenario 2 in Example 2 by using one simulated AR(1) process. The plots display the autocorrelation coefficient variation: (**a**) from 0.1 to 0.5, (**b**) from 0.1 to 0.9, (**c**) from 0.5 to 0.9, (**d**) from \(-0.5\) to 0.1, (**e**) from \(-0.5\) to 0.5, and (**f**) from \(-0.5\) to 0.9.  
Table 6 shows that AR1 seg serves as the best method for estimating the number of change-points under this setting. Both strucchange and CE.AR methods show the heavy underestimation, while the reason could be that they ignored the \(\tau_{1}\). In order to evaluate the multiple segmentation performance, we introduce the Hausdorff metric, which measures the greatest distance between the estimated locations and true change-points.  
\[\text{Hausdorff}(\tau,\hat{\tau})=\text{max}\ \{\max_{\tau_{1}\in\tau}\ \{\min_{\tau_{1}\in\tau}\ \|\hat{\tau}-\tau_{1}\|\},\ \max_{\tau_{1}\in\tau}\ \{\min_{\tau_{1}\in\tau}\ \|\hat{\tau}-\tau_{1}\|\}\}.\]  
Table 7 shows the Hausdorff distances for each of the three methods, the first line presents the results for the first choice of the parameters, while the second line displays the distances for the second choice mentioned above.  
Figure 6 shows the frequency of estimated locations for each method under the Table 6 scenario with at least one change-point detected. The AR1 seg method tends to estimate the first change-point location accurately. The CE.AR1 method has 100% power to identify the second and third locations; strucchange is less capable of detecting the first change-point at \(\tau_{1}=20\), while it performs well at \(\tau_{2}=60\) and \(\tau_{3}=120\). It is noted that all the estimations obtained from CE.AR method cluster around 60 and 120 and tend to ignore the earliest location.