2026-03-24

Dataset Preview

##   Age Sex ChestPainType RestingBP Cholesterol FastingBS RestingECG MaxHR
## 1  40   M           ATA       140         289         0     Normal   172
## 2  49   F           NAP       160         180         0     Normal   156
## 3  37   M           ATA       130         283         0         ST    98
## 4  48   F           ASY       138         214         0     Normal   108
## 5  54   M           NAP       150         195         0     Normal   122
## 6  39   M           NAP       120         339         0     Normal   170
##   ExerciseAngina Oldpeak ST_Slope HeartDisease
## 1              N     0.0       Up            0
## 2              N     1.0     Flat            1
## 3              N     0.0       Up            0
## 4              Y     1.5     Flat            1
## 5              N     0.0       Up            0
## 6              N     0.0       Up            0

Summary Statistics

##       Age          RestingBP      Cholesterol        MaxHR      
##  Min.   :28.00   Min.   :  0.0   Min.   :  0.0   Min.   : 60.0  
##  1st Qu.:47.00   1st Qu.:120.0   1st Qu.:173.2   1st Qu.:120.0  
##  Median :54.00   Median :130.0   Median :223.0   Median :138.0  
##  Mean   :53.51   Mean   :132.4   Mean   :198.8   Mean   :136.8  
##  3rd Qu.:60.00   3rd Qu.:140.0   3rd Qu.:267.0   3rd Qu.:156.0  
##  Max.   :77.00   Max.   :200.0   Max.   :603.0   Max.   :202.0  
##     Oldpeak       
##  Min.   :-2.6000  
##  1st Qu.: 0.0000  
##  Median : 0.6000  
##  Mean   : 0.8874  
##  3rd Qu.: 1.5000  
##  Max.   : 6.2000

Data Description

The dataset includes:

  • Age
  • Sex
  • Chest Pain Type
  • Resting BP
  • Cholesterol
  • MaxHR
  • ExerciseAngina
  • Old Peak
  • ST_Slope
  • Heart Disease

These will be useful when studying factors related to heart disease.

Age vs Cholesterol (Plot 1)

This plot compares age and cholesterol levels by heart disease status.

Chest Pain Type (Plot 2)

This plot compares Chest pain type and Heart disease.

Interactive Scatter (plotly)

This plot compares age and max heart rate.

3D Plot

This plot compares age, cholesterol, and max heart rate

Stats Analysis

## 
## Call:
## lm(formula = Cholesterol ~ Age + MaxHR, data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -243.88  -37.44   19.14   66.54  416.08 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 65.35230   35.09932   1.862   0.0629 .  
## Age         -0.07059    0.40313  -0.175   0.8610    
## MaxHR        1.00303    0.14935   6.716 3.28e-11 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 106.4 on 915 degrees of freedom
## Multiple R-squared:  0.05563,    Adjusted R-squared:  0.05357 
## F-statistic: 26.95 on 2 and 915 DF,  p-value: 4.242e-12

Statistical Analysis Commentary

This regression examines how Age and MaxHR relate to Cholesterol

  • Heart disease is associated with multiple indicators,
  • Age, cholesterol and maximum heart rate show noticeable patterns.
  • Chest pain type appears to differ between individuals with and without heart disease.

Example Code

##   Age Sex ChestPainType RestingBP Cholesterol FastingBS RestingECG MaxHR
## 1  40   M           ATA       140         289         0     Normal   172
## 2  49   F           NAP       160         180         0     Normal   156
## 3  37   M           ATA       130         283         0         ST    98
## 4  48   F           ASY       138         214         0     Normal   108
## 5  54   M           NAP       150         195         0     Normal   122
## 6  39   M           NAP       120         339         0     Normal   170
##   ExerciseAngina Oldpeak ST_Slope HeartDisease
## 1              N     0.0       Up            0
## 2              N     1.0     Flat            1
## 3              N     0.0       Up            0
## 4              Y     1.5     Flat            1
## 5              N     0.0       Up            0
## 6              N     0.0       Up            0

Conclusion

  • Heart disease appears related to several health indicators.
  • The visualization shows how different age, chest pain type, cholesterol, and max heart rate affects heart health.
  • The regression provides a simple statistical look relationships in the data.

Thank you.