## 4 Results and Discussions
### Heterogeneity Analysis  
This section will begin by introducing a similarity testing model and then proceed to analyze the heterogeneity in the merging spatiotemporal patterns. The skewness and kurtosis are used to describe the distribution of the data. Skewness describes the symmetry of the distribution of a certain overall fetch value. The kurtosis is a statistic that describes  
Figure 8: Preferences for Merging Pattern selection. the steepness of the distribution of all values in the total. The kurtosis and skewness are calculated as follows:  
\[\textit{skewness}=\frac{1}{n-1}\sum_{i=1}^{n}(x_{i}-\overline{x})^{3}/SD^{3} \tag{2}\]  
\[\textit{kurtosis}=\frac{1}{n-1}\sum_{i=1}^{n}(x_{i}-\overline{x})^{4}/SD^{4}-3 \tag{3}\]  
\[SD=\sum_{i=1}^{n}(x_{i}-\overline{x})^{2}/n \tag{4}\]  
\(SD\)--the variance. The Kolmogorov-Smirnov test (KS test) is employed to examine the data distribution of the merging variables of different merging patterns. A classical two-sample problem consists of testing the null hypothesis:  
\[H_{0}:F(x)=G(x),\textit{ for every }x\in R^{d} \tag{5}\]  
Against the general alternative:  
\[H_{1}:F(x)\
eq G(x),\textit{ for some }x\in R^{d} \tag{6}\]  
We determine whether the merging variables (_i_) sample1 \((x_{1},x_{2},x_{3}\cdots x_{m})\) and merging variables (_i_) sample2 \((y_{1},y_{2},y_{3}\cdots y_{n})\) come from the same distribution function for the different merging patterns. Construct test statistic \(D_{m,n}\):  
\[D_{m,n}=sup|F_{m}(x)-G_{n}(y)| \tag{7}\]  
Reject \(H_{0}\) when the following conditions hold, otherwise accept \(H_{0}\):  
\[\sqrt{\frac{m\times n}{m+n}}D_{m,n}>c(\alpha) \tag{8}\]  
The \(p\) is calculated as follows:  
\[p=2e^{-2\frac{m\times\alpha}{m+n}(D_{m,n})} \tag{9}\]  
Then, we observe whether there is a significant difference between merging patterns, and then, we measure the variability between the scenarios. We focused on the three variables for driving behavior: merging speed, merging distance, and merging duration. The results of the KS test for different merging patterns feature variables are shown in Figure 9. The merging speed's KS-test \(p\)-values of car, truck, and van in Pattern B and E are 0.92, 0.12, and 0.39 (all > 0.05). The original hypothesis cannot be rejected. There is no significant difference between merging speeds in Pattern B and E. When a vehicle exists ahead in the target lane, the presence or absence of a RV has no significant effect on the merging speed of drivers. When testing the merging speed of autonomous vehicles, patterns B and E can be divided into one scenario for simulation testing. The KS-test \(p\)-values of merging speed, merging distance, and merging duration for car, truck, and van in Pattern C and F are all greater than 0.05. Therefore, the original  
The box plots in Figure 10 illustrate the statistical differences among the various vehicle types. Notably, when it comes to merging, distinct variations can be observed across different vehicle categories. The merging speeds of trucks are the lowest among various merging patterns, with an average speed of approximately 20 m/s. The ego vehicle in Patterns C or F merges relatively slowly compared to other merging patterns. In other words, the ego vehicle's speed is lower at the crucial merging phase as it follows alongside vehicle. When the target lane experiences free-flowing traffic, there is an observed hierarchy in terms of merging speed: car > van > truck; merging distance: truck > van > car; and merging duration: truck > van > car. The average merging distance ratio of the ego vehicle in Patterns C or F exceeds 0.5, and the merging duration surpasses 5 s. Ego vehicles are required to cover more than half of the acceleration lane before initiating a merge. In Figure 10, TTC values of the merging Patterns C and F are significantly lower than those of the other patterns. Merging Patterns  
\[\textit{skewness}=\frac{1}{n-1}\sum_{i=1}^{n}(x_{i}-\overline{x})^{3}/SD^{3} \tag{2}\]0 Box plot of merging scenario features for different merging scenarios.