dat<-read.csv("https://raw.githubusercontent.com/tmatis12/datafiles/main/normtemp.csv")
# Analysis for males : min max sample mean, std dev,samp median, quartiles
males<-dat[dat$Sex==1,]
females<-dat[dat$Sex==2,]
# establish vector for male heartbeats
malebeats<-males$Beats
min(malebeats)
## [1] 58
summary(malebeats)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 58.00 70.00 73.00 73.37 78.00 86.00
sd(malebeats)
## [1] 5.875184
qqnorm(malebeats)
qqline(malebeats)
Comments on Normal Probability Plot
Normal probability plot for male population is approx fitting the straight line, so we can assume that sample data is normally distributed.
hist(malebeats,main='Heart Rate of Males',xlab='heartrates',col="Blue")
femalebeats<-females$Beats
min(femalebeats)
## [1] 57
summary(femalebeats)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 57.00 68.00 76.00 74.15 80.00 89.00
sd(femalebeats)
## [1] 8.105227
qqnorm(femalebeats)
qqline(femalebeats)
Comments on Normal Probability Plot
Normal probability plot for female population is approx fitting the straight line, so we can assume that sample data is normally distributed.
hist(femalebeats,main='Heart Rate of Females',xlab='heartrates',col="Pink")
boxplot(malebeats,femalebeats,names=c('Males','Females'),main='Boxplot of Males and Females',ylab='Heartrates')
General Analysis:
The median for the males is greater than that of the females. the median for the male is 73 where as the median for the female is 76.
The percentage difference between means of Male and Female is 1.06 %, with mean value of female data being higher.
The percentage difference between Standard Deviations of Male and Female is 31.9 %, with Std. Dev of Female being higher.
Male: The normal probability curve & histogram produces a taller and a narrow density curve because the Standard Deviation is relatively less then that of females and therefore it fits the bell curve accurately.
Female: The normal probability curve & histogram produces a flatter and a wider density curve because the Standard Deviation is relatively higher then that of males and therefore the data is more skewed.
Level of Skewness: The plots and statistical data for both Male and Females are negatively skewed i.e. Male Skewness = -0.05, where as skewness level for females is -0.28. Therefore female date is more negatively skewed
Conclusion:
Since the statistical data i.e. Mean, Standard Deviation and Interquartile ranges for female data is higher than the statistical data of the males, we can conclude that the female data is more variable and male data is less variable.