# Ensemble-Based Correction for Anomalous Diffusion Exponent Estimation in Single-Particle Tracking
## 2 Materials and Methods
### Ensemble-Based Correction of TA-MSD Estimates  
Consider an ensemble of trajectories of fixed length \(T\), generated using fractional Brownian motion with a given diffusion exponent \(\alpha\). When estimating the diffusion exponent \(\alpha\) using the TA-MSD method, we obtain an estimate of the diffusion exponent, the variance of which is inversely proportional to the trajectory length according to Formula (7). Let us denote the variance of the estimate obtained by the TA-MSD method as \(\sigma^{2}_{TAMSD}\). This quantity corresponds to the variance \(Var[\hat{\alpha}]\) in Formula (8). In the context of the AnDi-2024 Challenge, it is assumed that when generating an ensemble of trajectories, the diffusion exponent \(\alpha\) is a random variable with normal distribution \(\alpha\sim\text{N}(\mu_{\alpha},\ \sigma^{2}_{\alpha})\). In this case, the total variance of the diffusion exponent estimate \(\sigma^{2}_{total}[\hat{\alpha}]\) will depend on both the estimation method error and the spread of the parameter \(\alpha\) itself. Thus, the observed variance in the estimates \(\hat{\alpha}\) of the exponent \(\alpha\) for ensemble trajectories can be expressed as  
\[\sigma^{2}_{total}[\hat{\alpha}]=\sigma^{2}_{\alpha}+\sigma^{2}_{TAMSD} \tag{9}\]  
When \(\sigma^{2}_{total}[\hat{\alpha}]\approx\sigma^{2}_{TAMSD}\), we can assume that \(\sigma^{2}_{\alpha}=0\), and all trajectories in the ensemble have the same value of exponent \(\alpha=\mu_{\alpha}\). We can also estimate the variance of the normal distribution for exponent \(\alpha\) if we estimate the total variance \(\sigma^{2}_{total}[\hat{\alpha}]\) and the estimation variance \(\sigma^{2}_{TAMSD}\):  
\[\sigma^{2}_{\alpha}=\sigma^{2}_{total}[\hat{\alpha}]-\sigma^{2}_{TAMSD} \tag{10}\]  
In such cases, normalizing the individual trajectory estimates \(\hat{\alpha}\) relative to the ensemble-averaged estimate can improve accuracy. Note that according to Formula (8), the value of \(\sigma_{TAMSD}^{2}\) depends on the number of selected lags for \(\tau\). For example, for the set \(\tau=[1,2,3,4]\), considering that \(\sum_{\tau=1}^{4}(log(\tau)-\overline{log\tau})^{2}\approx 1.08434\), the variance can be represented as  
\[\sigma_{TAMSD}^{2}[T,\tau=\{1,\ 2,\ 3,\ 4\}]\approx 0.9216/T \tag{11}\]  
The experimental results shown in Figure A1 (Appendix A) reveal good agreement between the experimentally determined dependency coefficient and the value calculated using Equation (11). The correction method proceeds as follows. For each i-th trajectory (i = 1, M) from the ensemble of realizations, we obtain an estimate of the exponent \(\hat{\alpha}_{i}\) and calculate the mean value and variance estimate \(\sigma_{total}^{2}[\hat{\alpha}]\):  
\[\overline{\mu}_{\alpha}=\frac{1}{M}\sum_{i=1}^{M}\hat{\alpha}_{i} \tag{12}\]  
\[\hat{\sigma}_{total}^{2}=\frac{1}{M-1}\sum_{i=1}^{M}(\hat{\alpha}_{i}- \overline{\mu}_{\alpha})^{2} \tag{13}\]  
Consider an initial estimate of a parameter, denoted as \(\hat{\alpha}\), which is modeled as a random variable following a normal distribution: \(\hat{\alpha}\sim\text{N}(\overline{\mu}_{\alpha},\hat{\sigma}_{total}^{2})\). Our objective is to transform \(\hat{\alpha}\) into a new random variable, \(\hat{\alpha}^{corrected}\), which represents a refined or \"corrected\" estimate. This corrected estimate is also assumed to follow a normal distribution, \(\hat{\alpha}^{corrected}\sim\text{N}(\overline{\mu}_{\alpha},\hat{\sigma}_{ corrected}^{2})\), where its variance \(\hat{\sigma}_{corrected}^{2}\) is derived from Equation (10) as \(\hat{\sigma}_{corrected}^{2}=\hat{\sigma}_{total}^{2}-\sigma_{TAMSD}^{2}\)[13]. To implement this transformation while preserving the normal distribution, we employ a linear transformation, a well-established technique for normally distributed random variables [27; 28].