#### problem 1####
# Males case study
getwd()
## [1] "C:/Users/18064/OneDrive/Documents/Academia/Fall 2021/IE 5342 Dsgn of Exp"
dat<-read.csv("https://raw.githubusercontent.com/tmatis12/datafiles/main/normtemp.csv")
males<-dat[1:65,3]
females<-dat[66:130,3]
summary(males)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   58.00   70.00   73.00   73.37   78.00   86.00
sd(males)
## [1] 5.875184
hist(males, main= "Histogram of Males'heart rate", col ="blue", xlab = " males'heart rate")

qqnorm(males,main="males Normal prob plot")

boxplot(males,main="boxplot of Males")

# the males probability is normaly distributed
# Females case study
summary(females)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   57.00   68.00   76.00   74.15   80.00   89.00
sd(females)
## [1] 8.105227
hist(females, main= "histogram of female's heart rate", col ="pink", xlab= "females' heart rate")

qqnorm(females, main="females Normal prob plot")

boxplot(females,main="boxplot of Females")

##### Problem 2 #####
boxplot(males,females,names=c("Males","Females"),main="BoxPlot of Heartbeat")

# from the box plot we observe that females have on average a higher heart rate than the males