title: “DEAN’S DILEMMA” author: “SAMEEKSHYA BEHURA” date: “13 December 2017” output: html_document …………….

—{r} mydata <- read.csv(paste(“Data - Deans Dilemma.csv” , sep = “”)) head(mydata) Random selection of rows using car::some() function ========================================== library(car) some(mydata)

Structure of the data frame

str(mydata)

What is the average salary of male MBAs who were placed? nrow(subset(mydata, Gender.B == 0)) mean(mydata$Gender.B == 0)

What is the average salary of female MBAs who were placed? nrow(subset(mydata, Gender.B == 1)) mean(mydata$Gender.B == 1)

Average salaries of males are higher than that of females

Submit your R code that creates a table showing the mean salary of males and females, who were placed. mydata\(Gender.B <- as.factor(mydata\)Gender.B) Gender.Btable <- table(mydata$Gender.B) Gender.Btable #Propertion of salary recieved prop <- prop.table(Gender.Btable) propper <- prop*100 propper

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(Gender.B)

hist(Gender.B)

What is the p-value based on the t-test? (t.test(Gender.B))$p.value