mba <- read.csv(paste("Deans Dilemma.csv", sep=""))
aggregate(Salary~Gender, data = mba, FUN=mean)
## Gender Salary
## 1 F 193288.2
## 2 M 231484.8
boxplot(mba$Salary~mba$Gender, main = "Average salary of Males and Females in MBA", xlab = "Females/Males", ylab = "Average salary")
t.test(mba$Salary~mba$Gender, var.equal = TRUE)
##
## Two Sample t-test
##
## data: mba$Salary by mba$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
P Vales = 0.01037 ## interpret the results 1. Males has high average salary of 231484.8 compared to the females average salary of 193288.2 2. T test results showed there significant difference between males an females salary. Submit your R code that creates a table showing the mean salary of males and females, who were placed.