1 Male Analysis

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

1.1 Male population minimum

min(malebeats)
## [1] 58

1.2 Summary of Male population

summary(malebeats)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   58.00   70.00   73.00   73.37   78.00   86.00

1.3 Male Population standard deviation

sd(malebeats)
## [1] 5.875184

1.4 Normal probability plot of male heart rates

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.

1.5 Histogram in color for male population

hist(malebeats,main='Heart Rate of Males',xlab='heartrates',col="Blue")

2 Female Analysis

femalebeats<-females$Beats

2.1 Female population Minimum

min(femalebeats)
## [1] 57

2.2 Summary of Female Population

summary(femalebeats)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   57.00   68.00   76.00   74.15   80.00   89.00

2.3 Female population Standard Deviation

sd(femalebeats)
## [1] 8.105227

2.4 Normal probability plot of female heart rate

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.

2.5 Histogram for female population

hist(femalebeats,main='Heart Rate of Females',xlab='heartrates',col="Pink")

3 Box plot Comparison for male and female population

boxplot(malebeats,femalebeats,names=c('Males','Females'),main='Boxplot of Males and Females',ylab='Heartrates')

3.1 OVERALL ANALYSIS:

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.