R Markdown

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:

3B

Deans.df <- read.csv(paste("DeansDilemma.csv", sep=""))

placed <- subset(Deans.df, Placement == "Placed")

tablesalary <- aggregate(placed$Salary ~ placed$Gender, FUN = mean)
tablesalary
##   placed$Gender placed$Salary
## 1             F      253068.0
## 2             M      284241.9

From the result,there exists a gender gap in the data.Average salary of males is higher than female counterparts.

3C

t.test(placed$Salary~placed$Gender)
## 
##  Welch Two Sample t-test
## 
## data:  placed$Salary by placed$Gender
## t = -3.0757, df = 243.03, p-value = 0.00234
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -51138.42 -11209.22
## sample estimates:
## mean in group F mean in group M 
##        253068.0        284241.9

3D

Part2 and #Part3

tablesalary
##   placed$Gender placed$Salary
## 1             F      253068.0
## 2             M      284241.9

Male salary of Placed:284241.9 Female salary of Placed: 253068.0

Part5

The p-value is 0.00234

Part6

Null Hypothesis Rejected:The average salary of the male MBAs is higher than the average salary of female MBAs.