title: "Assignment 2"
author: "V Sai Kukkala, Ken Cushenberry, Abhishek Labade "
date: "2025-09-04"
output: html_document
---
dat<-read.csv("https://raw.githubusercontent.com/tmatis12/datafiles/main/normtemp.csv")
Males<-dat[dat$Sex==1, ]
malebeats<-Males$Beats
min(malebeats)
## [1] 58
max(malebeats)
## [1] 86
mean(malebeats)
## [1] 73.36923
median(malebeats)
## [1] 73
sd(malebeats)
## [1] 5.875184
summary(malebeats)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 58.00 70.00 73.00 73.37 78.00 86.00
qqnorm(malebeats)
hist(malebeats,main = "Heart rate of males",xlab = "heartrates",col = "Green")
Normal probability plot for male population is approx fitting the straight line, so we can assume that sample data is normally distributed.
F<-dat[66:130,3]
min(F)
## [1] 57
max(F)
## [1] 89
mean(F)
## [1] 74.15385
median(F)
## [1] 76
sd(F)
## [1] 8.105227
summary(F)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 57.00 68.00 76.00 74.15 80.00 89.00
qqnorm(F)
hist(F,main = "Heart rate of females",xlab = "heartrates",col = "pink")
boxplot(malebeats,F,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 as compared to male data.
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
summary(cars)
## speed dist
## Min. : 4.0 Min. : 2.00
## 1st Qu.:12.0 1st Qu.: 26.00
## Median :15.0 Median : 36.00
## Mean :15.4 Mean : 42.98
## 3rd Qu.:19.0 3rd Qu.: 56.00
## Max. :25.0 Max. :120.00
You can also embed plots, for example:
Note that the echo = FALSE
parameter was added to the
code chunk to prevent printing of the R code that generated the
plot.
dat<-read.c
Comment
Normal probability plot for female population is approx fitting the straight line, so we can assume that sample data is normally distributed.