For this assignment, you will be submitting a webpage with the requested analysis of the data. The html link (only) should be submitted through blackboard. The webpage should be created with RMarkdown and analysis self-contained (i.e. all data manipulation, analysis, plotting, etc. should be done within R). The code that was used should be included and displayed results throughout your webpage (echo=TRUE) and the complete code should also be included at the end of your webpage (eval=FALSE).
Specifically, consider the file normtemp.csv that contains measurements on the resting body temperature and resting heart rate of n=65 randomly sampled males (1) and n=65 randomly sampled females (2). This file may be downloaded directly into R using read.csv() with the following link.
This is the male data analysis
The Male Heart rate looks like normally distributed. The data looks like it follows a straight line for the normal probability plot. Also, the data fits well within the bell curve. Compared to the Females, the IQR and the standard deviation is lower with means that female heart beat rates are more variable.
health_data <- read.csv("https://raw.githubusercontent.com/tmatis12/datafiles/main/normtemp.csv")
health_data$Sex <- as.factor(health_data$Sex)
Gender <- health_data$Sex
Males <- health_data[health_data$Sex == 1, ]
Females <- health_data[health_data$Sex == 2, ]
summary(Males$Beats)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 58.00 70.00 73.00 73.37 78.00 86.00
sd(Males$Beats)
## [1] 5.875184
hist(Males$Beats, col= "blue",xlab = "Beats",main = "Male Heart Beats")
qqnorm(Males$Beats)
This is the female data analysis
The Female Heart rate looks like normally distributed. The data looks like it follows a straight line for the normal probability plot. Also, the data fits well within the bell curve. Compared to the Males, the IQR and the standard deviation is higher with means that male heart beat rates are less variable.
summary(Females$Beats)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 57.00 68.00 76.00 74.15 80.00 89.00
sd(Females$Beats)
## [1] 8.105227
hist(Females$Beats, col= "pink",xlab = "Beats",main = "Female Heart Beats")
qqnorm(Females$Beats)
Compared to the Males, the IQR and the standard deviation is higher with means that male heart beat rates are less variable.
Female has a higher mean, standard deviation, and IQR.
boxplot(Males$Beats,Females$Beats, names = c('Males' , "Females"),xlab = "Beats", main = "Male/Female")
Good luck!
health_data <- read.csv("https://raw.githubusercontent.com/tmatis12/datafiles/main/normtemp.csv")
health_data$Sex <- as.factor(health_data$Sex)
Gender <- health_data$Sex
Males <- health_data[health_data$Sex == 1, ]
Females <- health_data[health_data$Sex == 2, ]
summary(Males$Beats)
sd(Males$Beats)
hist(Males$Beats, col= "blue",xlab = "Beats",main = "Male Heart Beats")
qqnorm(Males$Beats)
summary(Females$Beats)
sd(Females$Beats)
hist(Females$Beats, col= "pink",xlab = "Beats",main = "Female Heart Beats")
qqnorm(Females$Beats)
boxplot(Males$Beats,Females$Beats, names = c('Males' , "Females"),xlab = "Beats", main = "Male/Female")