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:

3a

mba.df <- read.csv(paste("Data - Deans Dilemma.csv", sep=""))
View(mba.df)
 placed <- mba.df[ which(mba.df$Placement_B==1), ]

3b

by(placed$Salary, placed$Gender, mean)
## placed$Gender: F
## [1] 253068
## -------------------------------------------------------- 
## placed$Gender: M
## [1] 284241.9

3c The null hypothesis is yhe average salary of male and female placed is equal

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

p-value=0.00234

As p-value is less than 0.005 so we reject the null hypothesis that is male and female placed have equal salary. It can also been seen from mean salaries that average salary of placed male is more than average salary of female placed.