1 Descriptive statistics

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.

1.1 Male

The male minimum, maximum, sample mean, sample standard deviation and sample median were respectively 58, 86, 73.3692308, 5.8751841, 73. Furthermore more 0, 25, 50, 75 and 100 % quadrilles were respectively 58, 70, 73, 78, 86.

This plot shows that 70-75 heart rate is more prevalent in males.

This graph shows that male heart rate ranges from 60 to 85 Hz.

1.2 Female

The female minimum, maximum, sample mean, sample standard deviation and sample median were respectively 57, 89, 74.1538462, 8.1052274, 76. Furthermore more 0, 25, 50, 75 and 100 % quadrilles were respectively 57, 68, 76, 80, 89.

This plot shows that 75-80 heart rate is more prevalent in males.

This graph shows that male heart rate ranges from 60 to 90 Hz.

2 Box plots

This box plot suggests that female heart rate is higher than males according to this data. # 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

```