Dean’s Dilemma T-test

3b.Code to create a table showing the average salary of males and females, who were placed:

placed<-deans.df[which(deans.df$Placement_B==1), ]
placed1<-aggregate(placed$Salary,by=list(placed$Gender),FUN=mean)
View(placed1)

3c.Code to run a t-test to test the following hypothesis:

H1: The average salary of the male MBAs is higher than the average salary of female MBAs.

t.test(Salary~Gender,data=deans.df,alternative="less")
## 
##  Welch Two Sample t-test
## 
## data:  Salary by Gender
## t = -2.69, df = 278.55, p-value = 0.003789
## alternative hypothesis: true difference in means is less than 0
## 95 percent confidence interval:
##       -Inf -14762.25
## sample estimates:
## mean in group F mean in group M 
##        193288.2        231484.8

3d.

    1. Submit your R code that creates a table showing the mean salary of males and females, who were placed.
      Ans.Code written above at task 3c.
    1. What is the average salary of male MBAs who were placed?
      Ans.The average salary of male MBAs who were placed are: 284241.9
    1. What is the average salary of female MBAs who were placed?
      Ans.The average salary of female MBAs who were placed are: 253068.0
    1. Submit 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.”
      Ans.Code written above at task 3c.
    1. What is the p-value based on the t-test?
      Ans.0.003789
    1. Please interpret the meaning of the t-test, as applied to the average salaries of male and female MBAs.
      Ans.Since p-value<0.05,So we reject the Null Hypothesis and accept the Alternate Hypothesis.Hence male MBAs have higher average salary then female MBAs.