## 2 Materials and Methods
### Evaluation of Time Lag for Detection
where \(z_{t}\) means time-series data of which average value is change in time, so,  
\[z_{t}|\theta_{t}\sim N(\theta_{t},1)\]  
Change point can be detected according to value of \(\lambda\). Many change points are detected when value of \(\lambda\) is small, and vice versa. In this study, changepoint package of R 3.6.0 was used to detect change points [23]. Figure 7 shows that an example of detecting change points of a participant's average blood pressure time-series data. In Figure 7, red vertical lines mean detected change points. In this study, the change point, after the unexpected appearance of a vehicle, is selected through the following algorithm:  
1. The time when the unexpected vehicle appeared (\(t_{1}\)) is first determined; this is achieved by inspecting data logged by the driving simulator. 2. The variable \(t_{2}\) denotes the time at which the unexpected vehicle appears, plus 30 sec. The reason for selecting an interval of 30 s is based on previous research [24]; about 10 to 15 seconds must elapse before taking a reading of the maximum blood pressure, after drivers are surprised at the appearance of the unexpected vehicle. 3. The variable \(t_{3}\) is the time when mean blood pressure is at a minimum, between \(t_{1}\) and \(t_{2}\). 4. Change points are detected by the changepoint method. \(\lambda\), the penalty value is set to 1 because as many change points should be detected as possible. Here, the number of detected change points is defined as \(N\), and the time of detection for a change point \(i\) is defined as \(T_{i}\); the set of times is thus defined as \(T=\{T_{1},\ T_{2},\ldots,T_{N}\}\). 5. Next, the minimum value of the difference between \(\{T_{1},\ T_{2},\ldots,T_{N}\}\) and \(t_{3}\) is calculated; a set \(T_{diff}=\{T_{1}-t_{3},\ T_{2}-t_{3},\ldots,T_{N}-t_{3}\}\) is created. 6. \(\underset{T_{i}}{\operatorname{argmin}}\{T_{1}-t_{3},\ T_{2}-t_{3},\ldots,T_{N }-t_{3}\}\) is calculated. The time as calculated by \(\underset{T_{i}}{\operatorname{argmin}}\{T_{1}-t_{3},\ T_{2}-t_{3},\ldots,T_{N }-t_{3}\}\) is defined as \(T_{cp}\). 7. \(T_{cp}-T_{1}\) is calculated. This is considered the duration over which blood pressure increases after the unexpected appearance of the vehicle. The R-like pseudo source code of this algorithm is shown in the following:  
Figure 7: An example of detecting change points by the changepoint method (\(\lambda=12\)). Blue vertical lines mean detected change points. \begin{tabular}{l l}
1 & Library (changepoint) \\
2 & \(t_{2}\gets t_{1}+30\) \\
3 & \(t_{3}\leftarrow\) which.min (data \$ mean_bloodpressure [\(t_{1}\):\(t_{2}\)]) \\
4 & \(\mathbf{T}\leftarrow\) cpt.var (data \$ mean_bloodpressure, pen.value = 1) \\
5 & \(\mathbf{T}_{diff}\leftarrow\mathbf{T}-t_{3}\) \\
6 & \(\mathbf{T}_{cp}\leftarrow\) which.min (\(\mathbf{T}_{diff}\)) \\ \end{tabular}   
Here, \"data\" in the above source code means a variable which contains each participant blood pressure data, therefore \"data \(\$\) mean_bloodpressure\" means the mean blood pressure of each participant. It is true that the algorithm introduced above may not be adequate. However, the main purpose of this paper is to verify the difference in timing of detection between contact type continuous blood pressure monitoring systems and infrared radiation type noncontact blood pressure monitoring systems. In addition, the criterion of judging what an \"increase in blood pressure\" is did not previously exist; there also exists no previous research explaining blood pressure increases resulting from a person's surprised state, such as the state arising from the unexpected appearance of a vehicle. Thus, in this study, the timing of blood pressure increase was determined according to the above algorithm and analyzed.