d<-read.csv("https://raw.githubusercontent.com/tmatis12/datafiles/main/normtemp.csv")
d$Beats<-as.numeric(d$Beats)
SumStatsM<-round(c(summary(d$Beats[d$Sex=="1"]), SD=sd(d$Beats[d$Sex=="1"])), 2)
SumStatsM
## Min. 1st Qu. Median Mean 3rd Qu. Max. SD
## 58.00 70.00 73.00 73.37 78.00 86.00 5.88
hist(d$Beats[d$Sex=="1"],col="blue",main="Male Resting Heart Rate",xlab="Resting Heart Rate")
qqnorm(d$Beats[d$Sex=="1"],col="blue",main="Male Resting Heart Rate",xlab="Expected Normal Value")
qqline(d$Beats[d$Sex=="1"])
The male heart rate appears to be normally distributed around the mean of 73.37 BPM, as indicated by the bell-shaped curve of the histogram and the alignment of the data along the fitted distribution line in the normal probability plot.
SumStatsF<-round(c(summary(d$Beats[d$Sex=="2"]), SD=sd(d$Beats[d$Sex=="2"])), 2)
SumStatsF
## Min. 1st Qu. Median Mean 3rd Qu. Max. SD
## 57.00 68.00 76.00 74.15 80.00 89.00 8.11
hist(d$Beats[d$Sex=="2"],col="pink",main="Female Resting Heart Rate",xlab="Resting Heart Rate")
qqnorm(d$Beats[d$Sex=="2"],col="pink",main="Female Resting Heart Rate",xlab="Expected Normal Value")
qqline(d$Beats[d$Sex=="2"])
The female heart rate does not appear to be as normally distributed as the male heart rate was, as the histogram has its peak to the right of the graph despite the mean being 74.15 BPM. With a larger standard deviation, 8.11, and quartiles further away from the mean, 68 and 80 BPM, there is a lot of evidence that there is less normality with the female heart rate compared to the male heart rate. However, the data is still relatively close to the fitted distribution line of the normal probability plot, so the data could still be considered roughly normal.
boxplot(d$Beats ~ d$Sex,names=c("Male","Female"),xlab="Sex",ylab="BPM",main="Resting Heart Rate by Sex",col=c("blue","pink"))
The only similarity that is apparent between the two box plots is minimums of 57 and 58 BPM. Other than that, the sample data suggests that Females have a greater average BPM, a higher deviation with the expanded 25th and 75th quartiles, and a higher maximum (89 BPM) than the Males’ resting heart rate.
d<-read.csv("https://raw.githubusercontent.com/tmatis12/datafiles/main/normtemp.csv")
d$Beats<-as.numeric(d$Beats)
SumStatsM<-round(c(summary(d$Beats[d$Sex=="1"]), SD=sd(d$Beats[d$Sex=="1"])), 2)
SumStatsM
hist(d$Beats[d$Sex=="1"],col="blue",main="Male Resting Heart Rate",xlab="Resting Heart Rate")
qqnorm(d$Beats[d$Sex=="1"],col="blue",main="Male Resting Heart Rate",xlab="Expected Normal Value")
qqline(d$Beats[d$Sex=="1"])
SumStatsF<-round(c(summary(d$Beats[d$Sex=="2"]), SD=sd(d$Beats[d$Sex=="2"])), 2)
SumStatsF
hist(d$Beats[d$Sex=="2"],col="pink",main="Female Resting Heart Rate",xlab="Resting Heart Rate")
qqnorm(d$Beats[d$Sex=="2"],col="pink",main="Female Resting Heart Rate",xlab="Expected Normal Value")
qqline(d$Beats[d$Sex=="2"])
boxplot(d$Beats ~ d$Sex,names=c("Male","Female"),xlab="Sex",ylab="BPM",main="Resting Heart Rate by Sex",col=c("blue","pink"))