dilemma <- read.csv(paste("deansdilemma.csv",sep="."))
View(dilemma)

Extended Analysis

(3d)List of Questions and Solutions

(1)R code that creates a table showing the mean salary of males and females, who were placed.

placed <- dilemma[which(dilemma$Placement=='Placed'),]
mytable <- aggregate(Salary~Gender, data=placed, mean)
mytable
##   Gender   Salary
## 1      F 253068.0
## 2      M 284241.9

(2,3)Average salary of male and female MBAs who were placed.

mytable
##   Gender   Salary
## 1      F 253068.0
## 2      M 284241.9

Average salary of male MBA students=284241.9 Average salary of female MBA students=253068.0

(4)R code to run a t-test for the Hypothesis “The average salary of the male MBAs is higher than the average salary of female MBAs.”

placed <- dilemma[which(dilemma$Placement=='Placed'),]
log.transformed.Salary = log(placed$Salary)
t.test(log.transformed.Salary ~ placed$Gender, var.equal=TRUE)
## 
##  Two Sample t-test
## 
## data:  log.transformed.Salary by placed$Gender
## t = -2.8142, df = 310, p-value = 0.005203
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.17482594 -0.03094897
## sample estimates:
## mean in group F mean in group M 
##        12.40435        12.50723

(5)p-value based on the t-test.

As shown in the solution for 4th question, t = -2.8142, df = 310, p-value = 0.005203. Therefore the p-value = 0.005203

(6)Interpret the meaning of the t-test, as applied to the average salaries of male and female MBAs.

Results:

The average salary of male MBAs who were placed is more than the the average salary of female MBAs who were placed. Null Hypothesis: “There is no significant difference in the average salary of male and female MBAs who were placed.”

From (4), p-value = 0.005203 i.e p-value < 0.05 which mean we reject the Null Hypothesis and accept the alternative Hypothesis. Alternative Hypothesis: “There is a significant difference in the average salary of male and female MBAs who were placed is equal.”