In this project we will compare the heart rate of male and female. We will calculate the minimum, maximum, sample mean, sample standard deviation, sample median and quartiles of the resting heart rate for both male and female groups.
As the blood supplies the body with nutrition, any variation in the heart rate can have implication in either change in the metabolic activity or neurological disorders related to heart. For a healthy subject, resting heart rate has a close correlation with the metabolic activity of the body, therefore any variation in the resting heart rate between males and females can enables us to better understand the differences between the male and female metabolic activities.
The male’s resting heart rate minimum, maximum, sample mean, sample standard deviation and sample median were respectively 58, 86, 73.3692308, 5.8751841, 73. Furthermore, 0, 25, 50, 75 and 100 % quadrilles were respectively 58, 70, 73, 78, 86.
This plot closely resembles a symmetric normal distribution and shows that 70-75 heart rate is more prevalent in males.
This graph shows that male heart rate ranges from 60 to 85 Hz and has a relatively linear trend.
The female’s resting heart rate minimum, maximum, sample mean, sample standard deviation and sample median were respectively 57, 89, 74.1538462, 8.1052274, 76. Furthermore, 0, 25, 50, 75 and 100 % quartiles were respectively 57, 68, 76, 80, 89.
This histogram dose not support the normality of female resting heart rate’s distribution and shows that 75-80 Hz heart rate is more prevalent in females.
This graph shows that female heart rate ranges from 60 to 90 Hz.
From the previous graphs, we can see that males distribution closely resembles a normal distribution, while female distribution is not. However, we need a normality test to confirm this.
Furthermore, resting heart rate minimum, maximum, sample mean and median were looked similar between the two groups, however, standard deviation seem different. We can use the student t and levene’s test to evaluate these statement. But, we can also deduce these statements from visualizing inspecting both the histograms and box plots.
From this data and our analysis so far we can guess that the difference between the male and female’s average resting heart rate would not be significant, but, they will have a significantly different resting heart rate variation.
# R Code
dat <- read.csv("https://raw.githubusercontent.com/tmatis12/datafiles/main/normtemp.csv") #reading the data
dat$Sex <- as.factor(dat$Sex) #defining sex as a factor
male <- dat[dat$Sex==1,] #seperating the males
#descriptive statistics
malemin<- min(male$Beats)
malemax <- max(male$Beats)
malemean <- mean(male$Beats)
malestd <- sd(male$Beats)
malemedian <- median(male$Beats)
b <- quantile(male$Beats)
hist(male$Beats,main = "Male pulse",xlab = "Male Beats",col = "blue") #histogram
qqnorm(male$Beats) #normal plot
female <- dat[dat$Sex==2,] #seperating the females
#descriptive statistics
femalemin<- min(female$Beats)
femalemax <- max(female$Beats)
femalemean <- mean(female$Beats)
femalestd <- sd(female$Beats)
femalemedian <- median(female$Beats)
c <- quantile(female$Beats)
hist(female$Beats,main = "female pulse",xlab = "female Beats",col = "pink") #histogram
qqnorm(female$Beats) #normal plot
boxplot(male$Beats,female$Beats,names = c("male","female")) #box plot
```