setwd("C:/Users/Shreyas Jadhav/Downloads")
dilemma <- read.csv(paste("Deans_Dilemma.csv",sep="."))
View(dilemma)
placed <- dilemma[which(dilemma$Placement=='Placed'),]
mytable <- aggregate(Salary~Gender, data=placed, mean)
mytable
## Gender Salary
## 1 F 253068.0
## 2 M 284241.9
mytable
## Gender Salary
## 1 F 253068.0
## 2 M 284241.9
Therefore, the average salary of male MBAs who were placed is INR 284241.9
mytable
## Gender Salary
## 1 F 253068.0
## 2 M 284241.9
Therefore, the average salary of female MBAs who were placed is INR 253068.0
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
As shown in the solution for 4th question, t = -2.8142, df = 310, p-value = 0.005203. Therefore the p-value = 0.005203
Results:
Null Hypothesis: “There is no significant difference in the average salary of male and female MBAs who were placed.”
Alternative Hypothesis: “There is a significant difference in the average salary of male and female MBAs who were placed is equal.”