## 2 Materials and Methods
### Statistical Analysis  
The statistical analysis to compare the groups that result from the stratification of the population (at least three groups) was performed using a one-way ANOVA to evaluate whether there were significant differences between the means or medians of the groups. To start, two fundamental assumptions were verified; first, the normality of the data in each group was evaluated using the Shapiro-Wilk test. Second, the homogeneity of variances was verified using the Levene test. Based on these results, the type of test to be applied was decided; if both assumptions were met, a one-way ANOVA was used as a parametric test (Fisher) to determine differences between the means; if any of the assumptions were not met, the Kruskal-Wallis test was chosen, a non-parametric alternative that evaluates differences between the medians.  
The equations and steps detailed in Sections 2.2, 2.3 and 2.5 are consolidated in Table 2. This table provides a structured overview of the key equations governing each algorithm. By centralizing these equations, Table 2 serves as a reference to clarify the interdependencies and implementation specifics of the signal processing workflows described in the preceding sections.  
\begin{table}
\begin{tabular}{c c c} \hline
**Index (Unit)** & **Equation** & **Clinical Significance** \\ \hline
4. HF (ms\({}^{2}\)) & Power in the [0.15, 0.4] Hz band calculated by spectral analysis (Welch) & Reflects parasympathetic activity and vagal modulation of heart rate. Indicator of vagal tone in the autonomic system. \\ \hline
5. LF/HF Ratio & \(LF/HF\ Ratio=\frac{LF}{HF}\) & (3) & Indicates autonomic balance, where a high value suggests sympathetic predominance and a low value, parasympathetic predominance. \\ \hline
6. SD1–Poincaré (ms) & \(SD1=\sqrt{\frac{Var(\Lambda RR)}{2}}\) & (4) & Measures the dispersion perpendicular to the identity line on the Poincaré plot. It represents the short-term variability associated with parasympathetic activity. \\ \hline
7. SD2–Poincaré (ms) & \(SD2=\sqrt{2\cdot Var(rr)-\frac{Var(\Lambda RR)}{2}}\) & (5) & Measures the dispersion along the identity line on the Poincaré plot. It reflects both sympathetic and parasympathetic activity, indicating short- and long-term variability. \\ \hline \end{tabular}
\end{table}
Table 1: _Cont._  
\begin{table}
\begin{tabular}{c c c c} \hline
**Algorithm** & **Description** & **How** & \\ \hline
1. QRS and & & & \\ R-wave identification & ECG bandpass filtering & \(ecg_{filtering}(t)=bandpass(ecg(t),[0.5,30]\) & (6) \\ \cline{2-4}  & Discrete wavelet decomposition (DWT) & & \\  & using Daubechies 4 & \(DWT(ecg_{filtering})\rightarrow\{c_{4},d_{4},d_{3},d_{2},d_{1}\}\) & (7) \\ \cline{2-4}  & QRS signal reconstruction from level 2 & \(q\pi_{signal}(t)=wrecof\{d^{\prime},c,l,db\mathbf{d}^{\prime},2\}\) & (8) \\ \hline Definition of the adaptive threshold & \(thr_{\text{sys}}=0.9\cdot\sigma\text{arg}_{signal}(t)\) & (9) \\ \hline Detection of time-restricted QRS spikes & \(\{t_{i}|\text{arg}_{signal}(t_{i})>thr_{\text{sys}},\ t_{i}-ti-1>500\ ms\}\) & (10) \\ \hline \end{tabular}
\end{table}
Table 2: Implemented algorithms and the corresponding equations to the steps of each one. 1. QRS and R-wave identification. 2. PVCs identification. 3. Tachogram.