min(data$Beats[data$Sex==1])
## [1] 58
max(data$Beats[data$Sex==1])
## [1] 86
mean(data$Beats[data$Sex==1])
## [1] 73.36923
sd(data$Beats[data$Sex==1])
## [1] 5.875184
median(data$Beats[data$Sex==1])
## [1] 73
quantile(data$Beats[data$Sex==1])
## 0% 25% 50% 75% 100%
## 58 70 73 78 86
hist(
data$Beats[data$Sex==1],
main = "HR Analysis - Male",
xlab = "beats per minute",
col = "blue")
qqnorm(
data$Beats[data$Sex==1],
main = "Normal Probability Plot - Male"
)
qqline(data$Beats[data$Sex==1])
The mean resting heart rate was 73.4 bpm (SD = 5.9), and the median was
73 bpm, which was close to the mean. The middle 50% of observations
ranged from 70 to 78 bpm. Based on the histogram and normal Q-Q plot,
the data appear to be approximately normally distributed, with no
substantial deviation from normality.
min(data$Beats[data$Sex==2])
## [1] 57
max(data$Beats[data$Sex==2])
## [1] 89
mean(data$Beats[data$Sex==2])
## [1] 74.15385
sd(data$Beats[data$Sex==2])
## [1] 8.105227
median(data$Beats[data$Sex==2])
## [1] 76
quantile(data$Beats[data$Sex==2])
## 0% 25% 50% 75% 100%
## 57 68 76 80 89
hist(
data$Beats[data$Sex==2],
main = "HR Analysis - Female",
xlab = "beats per minute",
col = "pink")
qqnorm(
data$Beats[data$Sex==2],
main = "Normal Probability Plot - Female"
)
qqline(data$Beats[data$Sex==2])
The mean resting heart rate was 74.2 bpm (SD = 8.1), and the median was
76 bpm, which was close to the mean. The middle 50% of observations
ranged from 68 to 80 bpm. Based on the histogram and normal Q-Q plot,
the data appear to be approximately normally distributed, with a slight
left skew but no substantial deviation from normality.
boxplot(
Beats ~ Sex,
data = data,
main = "HR by Sex",
xlab = "Sex",
ylab = "beats per minute",
names = c("Male","Female")
)
There are no apparent outliers in either group. The range of resting
heart rate is larger for females than for males. The median resting
heart rate is higher for females. The interquartile range (IQR) is also
larger for females, indicating greater variability in the middle 50% of
the data. Overall, females tend to have a higher resting heart rate and
greater variability than males.
data <- read.csv("https://raw.githubusercontent.com/tmatis12/datafiles/main/normtemp.csv")
min(data$Beats[data$Sex==1])
max(data$Beats[data$Sex==1])
mean(data$Beats[data$Sex==1])
sd(data$Beats[data$Sex==1])
median(data$Beats[data$Sex==1])
quantile(data$Beats[data$Sex==1])
hist(
data$Beats[data$Sex==1],
main = "HR Analysis - Male",
xlab = "beats per minute",
col = "blue")
qqnorm(
data$Beats[data$Sex==1],
main = "Normal Probability Plot - Male"
)
qqline(data$Beats[data$Sex==1])
min(data$Beats[data$Sex==2])
max(data$Beats[data$Sex==2])
mean(data$Beats[data$Sex==2])
sd(data$Beats[data$Sex==2])
median(data$Beats[data$Sex==2])
quantile(data$Beats[data$Sex==2])
hist(
data$Beats[data$Sex==2],
main = "HR Analysis - Female",
xlab = "beats per minute",
col = "pink")
qqnorm(
data$Beats[data$Sex==2],
main = "Normal Probability Plot - Female"
)
qqline(data$Beats[data$Sex==2])
boxplot(
Beats ~ Sex,
data = data,
main = "HR by Sex",
xlab = "Sex",
ylab = "beats per minute",
names = c("Male","Female")
)