What is an ECG signal?

An electrocardiogram (ECG) records the electrical activity of the heart over time. Each heartbeat produces a distinct spike; the time between two consecutive beats (spikes), known as the R-R interval gives us heart rate (normal resting heart rate for adults ranges from 60-100 bpm):

\[\text{Heart Rate (bpm)} = \frac{60}{\text{time between beats (seconds)}}\]

Biomedical engineers utilize ECG-derived heart rate to:

  • Quantify cardiac rhythm and overall heart function
  • Detect and classify cardiac abnormalities
  • Assess cardiovascular fitness across populations
  • Monitor how the heart adapts to varying levels of physical activity

Well-trained athletes or fitter individuals consistently show lower resting heart rates — a sign of a stronger, more efficient heart that pumps more blood per beat or increased stroke volume (Bhatt, 2015).

Source: Bhatt, D. (2015, October 19). Is a Low Heart Rate worrisome? Harvard Health. https://www.health.harvard.edu/heart-health/is-a-low-heart-rate-worrisome

Descriptive statistics of heart rate: Mean & Standard Deviation

The mean resting heart rate represents the average heart rate of a group:

\[\bar{x} = \frac{x_1 + x_2 + \cdots + x_n}{n}\]

The standard deviation describes how spread out the resting heart rates are within a group:

\[s = \sqrt{\frac{\sum_{i=1}^{n}(x_i - \bar{x})^2}{n - 1}}\]

The Fenland Study (MRC Epidemiology Unit, Cambridge) is a large population-based study that investigates the association between resting heart rate and cardiometabolic health. It looks at how physiological markers like heart rate vary across different levels of fitness in the broad adult population. Within this context, the mean represents how resting heart rate varies across fitness levels, with fitter individuals having lower average values. The standard deviation indicates how much variety occurs between individuals in each group. Together, they describe both the overall shift toward lower heart rates in fitter individuals and the natural variation within the population (Gonzales et al., 2023).

Source: Gonzales, T. I., Jeon, J. Y., Lindsay, T., Westgate, K., Perez-Pozuelo, I., Hollidge, S., Katrien Wijndaele, Rennie, K., Forouhi, N., Griffin, S., Wareham, N., & Brage, S. (2023). Resting heart rate is a population-level biomarker of cardiorespiratory fitness: The Fenland Study. Resting Heart Rate Is a Population-Level Biomarker of Cardiorespiratory Fitness: The Fenland Study, 18(5), e0285272–e0285272. https://doi.org/10.1371/journal.pone.0285272

Applying Mean & Standard Deviation

Let us generate a data set after learning the resting heart rate theory; we suppose that fitter individuals belong to athletics, while the comparison group represents sedentary adults. The simulated data set yields a lower mean resting heart rate for athletes and a higher mean with greater variability for sedentary adults, illustrating how mean and standard deviation summarise group-level differences in resting heart rate. Now, let’s look at how mean and standard deviation can be applied to summarize and compare these two groups:

# Heart rate data (individual observations)
athlete_heartrate_data <- c(46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 47, 52, 50, 49, 51, 53, 54, 48, 52, 55)
sedentary_heartrate_data <- c(60, 62, 65, 68, 70, 72, 75, 78, 80, 82, 58, 64, 67, 69, 71, 74, 76, 79, 81, 83)

# Combining the vectors into one data frame for plotting
hr_data <- data.frame(bpm = c(athlete_heartrate_data, sedentary_heartrate_data), group = rep(c("Athlete", "Sedentary"), each = 20))

# Creating a summary table after calculating mean and standard deviation
summary_table <- data.frame(Group = c("Athlete", "Sedentary"), Mean_bpm = c(mean(athlete_heartrate_data), mean(sedentary_heartrate_data)), SD_bpm = c(sd(athlete_heartrate_data), sd(sedentary_heartrate_data)))
print(summary_table)
##       Group Mean_bpm   SD_bpm
## 1   Athlete    51.25 2.844663
## 2 Sedentary    71.70 7.560980

Comparing heart rates of the groups: Athletes vs. Sedentary Adults

The density curves below show how heart rates are distributed across both groups — the dashed blue line marks the athlete mean (≈ 51 bpm) and the dashed grey line marks the sedentary mean (≈ 71 bpm). A narrower, left-shifted curve indicates that athletes not only have lower heart rates on average, but also less variation between individuals.

Spread and variability of heart rates: Athletes vs. Sedentary Adults

The boxplot below reveals how tightly or loosely individual heart rates cluster around the centre — the box captures the middle 50% of values, the line inside marks the median, and each dot represents one participant’s recorded heart rate, showing athletes as compact and consistent while sedentary adults scatter across a much wider range.

VO₂ max and heart rate across both groups

The Fenland Study reports Cardiorespiratory Fitness (CRF) determined from submaximal treadmill testing. It is given in metabolic equivalents (METs), a scientific unit used to measure how much O₂ the body uses (calories burned) when it is active compared to when it is at rest. VO₂ max (gold-standard measure of CRF) = maximum volume of O₂ , body is able to utilize during exercise. For our analysis, VO₂ max is simulated using Fenland tertile ranges (typical population extremes) as below. To account for natural variability while ensuring comparability, both groups are given standard deviation = 5.


The Fenland Study (n = 10,865) confirms a clear inverse relationship between resting heart rate and VO₂ max: the fitter you are, the lower your resting heart rate (Gonzales et al., 2023). A 3D plot for this is in the next slide.

\[\text{VO}_2\text{max} = \text{MET} \times 3.5\] \[\text{Athletes (high fitness)} \approx 55 \ \text{mL/kg/min} \qquad \text{Sedentary (low fitness)} \approx 33 \ \text{mL/kg/min}\]

Source: Gonzales, T. I., Jeon, J. Y., Lindsay, T., Westgate, K., Perez-Pozuelo, I., Hollidge, S., Katrien Wijndaele, Rennie, K., Forouhi, N., Griffin, S., Wareham, N., & Brage, S. (2023). Resting heart rate is a population-level biomarker of cardiorespiratory fitness: The Fenland Study. Resting Heart Rate Is a Population-Level Biomarker of Cardiorespiratory Fitness: The Fenland Study, 18(5), e0285272–e0285272. https://doi.org/10.1371/journal.pone.0285272

A 3D representation

Two-sample t-test: Is the heart rate difference between groups statistically significant?

A two-sample t-test assesses whether the difference in means between two independent groups is statistically significant. Here, it is used to compare resting heart rate between athletes and sedentary adults to determine if the observed difference reflects true variation or random chance.

Hypotheses:

\[H_0: \mu_{\text{Athlete}} = \mu_{\text{Sedentary}} \quad \text{(no real difference in means)}\]

\[H_1: \mu_{\text{Athlete}} \neq \mu_{\text{Sedentary}} \quad \text{(means are significantly different)}\] We use Welch’s t-test which does not assume equal variances between groups. A p-value < 0.05 means we reject \(H_0\).

\[t = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{\dfrac{s_1^2}{n_1} + \dfrac{s_2^2}{n_2}}}\]

Two-sample t-test: Results

result <- t.test(athlete_heartrate_data, sedentary_heartrate_data)
print(result)
## 
##  Welch Two Sample t-test
## 
## data:  athlete_heartrate_data and sedentary_heartrate_data
## t = -11.321, df = 24.273, p-value = 3.589e-11
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -24.17598 -16.72402
## sample estimates:
## mean of x mean of y 
##     51.25     71.70

The p-value is significantly below 0.05 hence we reject \(H_0\). There is strong statistical evidence that athletes have a significantly lower resting heart rate than sedentary adults.

Final Takeaway

“Statistics is the grammar of science.” — Karl Pearson

This analysis demonstrates how statistical methods help translate physiological signals like ECG-derived heart rate into meaningful biological insights.

Athletes exhibit lower resting heart rates and higher cardiorespiratory fitness than sedentary adults, with statistically significant differences confirmed through analysis.