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:
deans <- read.csv("Deans Dilemma.csv")
View(deans)
aggregate(deans$Salary,by=list(deans$Gender),mean)
## Group.1 x
## 1 F 193288.2
## 2 M 231484.8
You can also embed plots, for example:
t.test(Salary~Gender,var.equal=TRUE,data = deans)
##
## Two Sample t-test
##
## data: Salary by Gender
## t = -2.5757, df = 389, p-value = 0.01037
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -67352.803 -9040.516
## sample estimates:
## mean in group F mean in group M
## 193288.2 231484.8
Since p value is less than 0.05 ,we reject the null hypothesis that the average salary of both genders is equal.