R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

3a

mba.df <- read.csv(paste("Data - Deans Dilemma.csv", sep=""))
View(mba.df)
median(mba.df$Salary)
## [1] 240000

3b

prop.table(table(mba.df$Placement))
## 
## Not Placed     Placed 
##   0.202046   0.797954

3c

placed <- mba.df[ which(mba.df$Placement_B==1), ]

3d

median(placed$Salary)
## [1] 260000

3e

by(placed$Salary, placed$Gender, mean)
## placed$Gender: F
## [1] 253068
## -------------------------------------------------------- 
## placed$Gender: M
## [1] 284241.9

3f

hist(placed$Percent_MBA, main = "MBA performmance of placed students", xlab = "MBA percentage", ylab = "no. of students")

3g

notplaced <- mba.df[ which(mba.df$Placement_B==0), ]

3h

par(mfrow=c(1,2))
hist(placed$Percent_MBA, main = "MBA performmance of placed students", xlab = "MBA percentage", ylab = "no. of students")
hist(notplaced$Percent_MBA, main = "MBA performmance of not placed students", xlab = "MBA percentage", ylab = "no. of students")

3i

boxplot(Salary~Gender, data=placed, horizontal=TRUE, main="comparison of salaries of male and female", xlab="salary")

par(mfrow=c(1,1))

3j

placedET <- mba.df[ which(mba.df$Placement_B==1 & mba.df$S.TEST==1), ]

3k

library(car)
scatterplotMatrix(formula= ~ Salary + Percent_MBA + Percentile_ET, cex=0.6, data=placedET, diagonal="histogram")