In this report the resting heart rate(RHR) is compared between 65 randomly sampled males and 65 randomly sampled females.
Below is the data set and beyond that is the set of basic descriptive statistics:
df <- read.csv("https://raw.githubusercontent.com/tmatis12/datafiles/main/normtemp.csv")
df_male <- df[df$Sex == 1,]
df_female <- df[df$Sex == 2,]
summary(df_male$Beats)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 58.00 70.00 73.00 73.37 78.00 86.00
summary(df_female$Beats)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 57.00 68.00 76.00 74.15 80.00 89.00
sd(df_male$Beats)
## [1] 5.875184
sd(df_female$Beats)
## [1] 8.105227
The males have a lower mean and median RHR then the females. The male data shows a different spread then the female data as shown with the standard deviation range and quartile data. The range of the male data is 4 degrees less then then the range of the female data. The males have a 2.3 degree lower standard deviation then the females. and the quartile data for the males is closer to the mean then that of the female data. This indicates that the average RHR of the males is more consistent then that of the females. The females have a RHR with higher variability.
qqnorm(df_male$Beats, main = "Normal probability plot of male's resting heart rate ", xlab = "Theoretical Quantiles ", ylab = "Male's resting heart rate ", col = "blue")
hist(df_male$Beats, main = "Histogram of male's resting heart rate ", xlab = "Male's resting heart rate ", col = "blue")
The left-hand side of the histogram of the male’s resting heart rate is
mostly a mirror image of the right-hand side. In the histogram, the
range of resting heart rate from 70 to 75 has the highest frequency. The
normal probability plot of the male’s resting heart rate mostly follows
a straight line. For these two plots, the male’s resting heart rate has
a normal distribution.
hist(df_female$Beats, main = "Histogram of female's resting heart rate ", xlab = "Female's resting heart rate ", col = "pink")
qqnorm(df_female$Beats, main = "Normal probability plot of female's resting heart rate ", xlab = "Theoretical Quantiles ", ylab = "Female's resting heart rate ", col = "pink")
Female resting heart rate data sets is skewed right. In the histogram. The normal probability plot of the female’s resting heart rate mostly follows a straight line. For these two plots, the female’s resting heart rate may have a normal distribution but need more testing.
boxplot(df_male$Beats,df_female$Beats, names = c("Male", "Femal"), col = c("blue","pink"), main = "Box plot of resting heart rate of males and females", ylab = "Resting heart rate")
Both male and female resting heart rate data sets are symmetric. The
median of the male’s resting heart rate is lower than the female’s
resting heart rate. The interquartile range of the female’s resting
heart rate is a bit higher than the male’s resting heart rate.
df <- read.csv("https://raw.githubusercontent.com/tmatis12/datafiles/main/normtemp.csv")
##Male
df_male <- df[df$Sex == 1,]
summary(df_male$Beats)
male_temp_sd <- sd(df_male$Beats)
hist(df_male$Beats, main = "Histogram of male's resting heart rate ", xlab = "Male's resting heart rate ", col = "blue")
qqnorm(df_male$Beats, main = "Normal probability plot of male's resting heart rate ", xlab = "Theoretical Quantiles ", ylab = "Male's resting heart rate ", col = "blue")
##Femal
df_female <- df[df$Sex ==2,]
summary(df_female$Beats)
female_temp_sd <- sd(df_female$Beats)
hist(df_female$Beats, main = "Histogram of female's resting heart rate ", xlab = "Female's resting heart rate ", col = "pink")
qqnorm(df_female$Beats, main = "Normal probability plot of female's resting heart rate ", xlab = "Theoretical Quantiles ", ylab = "Female's resting heart rate ", col = "pink")
##boxplots
?boxplot()
boxplot(df_male$Beats,df_female$Beats, names = c("Male", "Femal"), col = c("blue","pink"), main = "Box plot of resting heart rate of males and females", ylab = "Resting heart rate")