## 5 Pairwise Clock Synchronization under Unknown Random Delays
### Bootstrap Bias Correction  
Bootstrap bias correction is a statistical approach that aims to reduce the bias of an estimator at the expense of increased variance, but with a total effect of reduced MSE [40]. For example, the MLE of clock offset derived under exponential delays is given by \(\hat{\theta}=(U_{(1)}-V_{(1)})/2\). However, the random delays may not follow an exponential distribution exactly, and the MLE derived under the exponential assumption may perform poorly under other distributions. For such scenarios, the bootstrap bias correction approach can be applied to reduce the bias and eventually the MSE of the estimator. Suppose the observations \(\mathbf{x}\) follow an unknown distribution \(F\) and the estimator is a statistic \(\hat{\theta}=s(\mathbf{x})\); the bias of \(\hat{\theta}\) is defined as \(B(\hat{\theta})=E_{F}[s(\mathbf{x})]-\theta\). The bootstrap estimate of the bias can be expressed as:  
\[\hat{B}(\hat{\theta})=E_{\hat{F}}[s(\mathbf{x})]-\hat{\theta} \tag{31}\]  
and the bias corrected estimator admits the form:  
\[\hat{\theta}_{BC}=\hat{\theta}-\hat{B}(\hat{\theta}) \tag{32}\]  
where \(\hat{F}\) denotes the empirical distribution of observations. In the context of clock offset estimation under exponential delays, the observations between two nodes are denoted as \(\{U_{i}\}_{i=1}^{N}\) and \(\{V_{i}\}_{i=1}^{N}\), and the MLE is given by \(\hat{\theta}=(U_{(1)}-V_{(1)})/2\). The bias of \(\hat{\theta}\) resumes as:  
\[B(\hat{\theta})=E_{F}\left(\frac{U_{(1)}-V_{(1)}}{2}\right)-\theta=\frac{1}{2 }\left(\int_{0}^{\infty}[1-F(u)]^{N}du-\int_{0}^{\infty}[1-G(v)]^{N}dv\right)-\theta\]  
where \(F(u)\) and \(G(v)\) stand for the unknown distributions of observations \(\{U_{i}\}_{i=1}^{N}\) and \(\{V_{i}\}_{i=1}^{N}\), respectively. The bootstrap estimate of \(B(\hat{\theta})\) can be further expressed as:  
\[\hat{B}(\hat{\theta})=E_{\hat{F}}\left(\frac{U_{(1)}-V_{(1)}}{2}\right)-\hat {\theta}=\frac{1}{2}\left(\int_{0}^{\infty}[1-\hat{F}(u)]^{N}du-\int_{0}^{ \infty}[1-\hat{G}(v)]^{N}dv\right)-\hat{\theta} \tag{33}\]Defining \(U_{(0)}=V_{(0)}=0\) and \(U_{(N+1)}=V_{(N+1)}=\infty\) leads to the empirical distribution [30]:  
\[ \begin{split} 1-\hat{F}(u)&=\sum_{i=1}^{N+1}\frac{N-i+1}{N}I[U_{ (i-1)}\leq u<U_{(i)}]\\ 1-\hat{G}(u)&=\sum_{i=1}^{N+1}\frac{N-i+1}{N}I[V_{ (i-1)}\leq v<V_{(i)}]\end{split}  \tag{34}\]  
Plugging Equation (34) back into Equation (33) yields \(\hat{B}(\hat{\theta})\) and eventually the bias-corrected estimator of \(\hat{\theta}\):  
\[\hat{\theta}_{BC}=U_{(1)}-V_{(1)}-\frac{1}{2}\sum_{i=1}^{N}\left[\left(\frac{ N-i+1}{N}\right)^{N}-\left(\frac{N-i}{N}\right)^{N}\right]\left[U_{(i)}-V_{(i)}\right] \tag{35}\]  
Following the same procedure described above, the bias-corrected estimator of the BLUE under asymmetric exponential delays, _i.e._, Equation (15), was also derived in [30]. Experimental results in [30] showed that under common distribution assumptions other than exponential, e.g., Gamma, Weibull and log-normal, the bias-corrected estimator of BLUE has the smallest MSE, while \(\hat{\theta}_{\text{BC}}\) also outperforms the MLE and the BLUE derived for exponential delays. The work in [41] investigated the BLUE and its corresponding bias-corrected estimator under a Pareto distribution: a heavy-tailed distribution that was adopted to model network delays for recent applications [42; 43; 44]. The authors in [41] examined the effectiveness of bootstrap bias correction of different estimators under varying assumptions for network delays. Some interesting examples were reported where bootstrap bias correction fails in the sense that the MSE increases or even the absolute bias increases. For instance, a somewhat surprising result is that the bootstrap bias correction of the exponential BLUE leads to a large absolute bias under Pareto network delays. Among these estimators and their corresponding bootstrap bias corrections, the bias-corrected estimator in Equation (35) was considered to be a significantly more robust estimator in [41].