Introduction

This presentation uses data from the SensSmartTech cardiovascular study by Lazović et al. (2024). The study collected cardiovascular signals before and after physical activity, to test if there was significant changes in heart rate. T-tests and P-values were in RStudio were used to determine whether the change is statistically significant.

Why Analyze Heart Rate?

Heart rate is an important physiological measurement used in biomedical engineering and healthcare.

Statistical analysis allows researchers to: - Analyze physiological measurements - Account for outliers - Determine whether observed changes are statistically significant - Evaluate if their null hypothesis was rejected.

Question

Does physical activity significantly increase heart rate?

Data

This analysis uses real cardiovascular data from the SensSmartTech dataset available through PhysioNet.

The dataset contains:

  • 338 total recordings
  • 32 participants
  • 18 females and 14 males
  • Average age: 34.0 ± 8.6 years
  • Average BMI: 25.1 ± 4.3 kg/m²
  • Measurements collected before and after physical activity -synchronized ECG, PPG, PCG, and accelerometer signals.

Testing

Statistical Hypotheses

The null hypothesis states that physical activity does not change the average heart rate. \[ H_0:\mu_{\text{after}}-\mu_{\text{before}}=0 \]

The alternative hypothesis states that physical activity increases the average heart rate. \[ H_A:\mu_{\text{after}}-\mu_{\text{before}}>0 \]

The significance level is: \[ \alpha = 0.05 \]

A p-value below 0.05 will be considered statistically significant.

Heart Rate Before and After Activity

The plot compares the distribution of heart rate measurements before and after physical activity. There is clearly a different as the average heart rate before activity is 90 BPM, whereas after the average is 115 BPM.

Change in Heart Rate

Calculating the Difference

For each participant, the change in heart rate is: \[ d_i = HR_{\text{after},i} - HR_{\text{before},i} \] =

t-Test

Statistical Test

The t-test statistic is:

\[ t = \frac{\bar{d}-\mu_{d,0}} {s_d/\sqrt{n}} \] where:

  • ̄d = mean change in heart rate
  • s₍d₎ = standard deviation of the changes
  • n = number of paired participants

P-Value

The p-value test statistic is calculated using the t-test formula but with R-code:

##R-Code:

# 1. Calculate paired differences (After vs. Before)
differences <- data_wide[["after_hr"]] - data_wide[["before_hr"]]

# 2. Extract sample metrics
mean_diff <- mean(differences)
sd_diff <- sd(differences)
n <- length(differences)

# 3. Compute t-statistic and degrees of freedom
t_stat <- (mean_diff - 0) / (sd_diff / sqrt(n))
df <- n - 1

# 4. Find the upper-tail (one-sided) p-value
p_value <- pt(t_stat, df = df, lower.tail = FALSE)

# Display final p-value output
cat("One-sided p-value =", format.pval(p_value))
## One-sided p-value = < 2.22e-16

Results

Statistical Results

## Mean change in heart rate: 27.05 BPM
## t-statistic: 17.815
## Degrees of freedom: 31
## p-value: < 2.22e-16

Heart Rate Before vs. After Activity

Conclusion

The analysis evaluated whether physical activity was associated with an increase in heart rate.

The p-value was compared with the significance level:

\[ \alpha = 0.05 \]

Because the p-value was less than 0.05, the null hypothesis was rejected.

This provides statistical evidence that mean heart rate increased after physical activity in the study sample.

References

[1] Lazović, A., et al. (2024). SensSmartTech database of cardiovascular signals synchronously recorded by an electrocardiograph, phonocardiograph, photoplethysmograph and accelerometer (version 1.0.0). PhysioNet. https://doi.org