The RMD document contains the t-test Analysis of the Deans Dilemma Case Study.
JainU_Data <- read.csv(paste("Data-Deans Dilemma.csv",sep = ""))
attach(JainU_Data)
Placed <- subset(JainU_Data,Placement=='Placed')
aggregate(Salary~Gender,data=Placed,FUN = mean)
## Gender Salary
## 1 F 253068.0
## 2 M 284241.9
Since the average salary of males is tend to be slightly more than females. Their accounts to a slight amount of Gender gap.
H1: The average salary of the male MBAs is higher than the average salary of female MBAs. Assumtions made: #The variables are continuous and independent #The variables are normally distributed #The variances in each group are equal
If we consider both placed and not placed MBA male and female students.
t.test(Salary~Gender,data = JainU_Data)
##
## Welch Two Sample t-test
##
## data: Salary by Gender
## t = -2.69, df = 278.55, p-value = 0.007577
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -66149.06 -10244.26
## sample estimates:
## mean in group F mean in group M
## 193288.2 231484.8
Here P(Value)<0.05,we can reject the null hypothers.
And, if we take into account of only placed MBA male and Female Students.
t.test(Salary~Gender,data = Placed)
##
## Welch Two Sample t-test
##
## data: Salary by 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
As P(value)<0.05, we can reject the null hypothesis.
SO our assumption the Average salary of the male MBAs is higher than the female students is TRUE.
Placed <- subset(JainU_Data,Placement=='Placed')
aggregate(Salary~Gender,data=Placed,FUN = mean)
## Gender Salary
## 1 F 253068.0
## 2 M 284241.9
284241.9
253068
t.test(Salary~Gender,data = JainU_Data)
##
## Welch Two Sample t-test
##
## data: Salary by Gender
## t = -2.69, df = 278.55, p-value = 0.007577
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -66149.06 -10244.26
## sample estimates:
## mean in group F mean in group M
## 193288.2 231484.8
t.test(Salary~Gender,data = Placed)
##
## Welch Two Sample t-test
##
## data: Salary by 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
0.0075 (both Placed and Not Placed) 0.00234 (only Placed)
As P(value)<0.05, we can reject the null hypothesis. SO our assumption the Average salary of the male MBAs is higher than the female students is TRUE.