Revisiting Dean’s Dilemma case study

This document gives extended analysis of the Dean’s Dilemma case study for selection of students for the MBA program.

1. Set the working directory.

setwd("~/Desktop")

2. Read the dataset using the read.csv() function.

dilemma <- read.csv(paste("Data - Deans Dilemma.csv" , sep = ""))

Task 3b

Use R to create a table showing the average salary of males and females, who were placed. Review whether there is a gender gap in the data. In other words, observe whether the average salaries of males is higher than the average salaries of females in this dataset

placed<-dilemma[which(dilemma$Placement_B==1),]
aggregate(placed$Salary~placed$Gender, FUN = mean)
##   placed$Gender placed$Salary
## 1             F      253068.0
## 2             M      284241.9

Definitely, there is a gender gap in the average salaries. Average salary of males is higher than the average salaries of females.

Task 3c

Use R 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(placed$Salary~placed$Gender,data = placed)
## 
##  Welch Two Sample t-test
## 
## data:  placed$Salary by placed$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

Task 3d

List of questions based on “A Dean’s Dilemma: Selection of Students for the MBA Program”

  1. Submit your R code that creates a table showing the mean salary of males and females, who were placed.
placed<-dilemma[which(dilemma$Placement_B==1),]
aggregate(placed$Salary~placed$Gender, FUN = mean)
##   placed$Gender placed$Salary
## 1             F      253068.0
## 2             M      284241.9
  1. What is the average salary of male MBAs who were placed?

284241.9

  1. What is the average salary of female MBAs who were placed?

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.”
t.test(placed$Salary~placed$Gender,data = placed)
## 
##  Welch Two Sample t-test
## 
## data:  placed$Salary by placed$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
  1. What is the p-value based on the t-test?

p-value = 0.00234

  1. Please interpret the meaning of the t-test, as applied to the average salaries of male and female MBAs.

Since p-value < 0.05, we would reject our null hypothesis. Thus, there’s significant difference between the means of our sample population i.e. it is true that the average salary of the male MBAs is higher than the average salary of female MBAs.