title: “Dean”

output: html_document

dean <-read.csv(paste(“Deans Dilemma.csv”, sep=“”)) View(dean)

summary(dean)

library(psych)

describe(dean)

median(dean$Salary)

mytable <- table(dean$Placement_B) prop.table(mytable)*100

round(prop.table(mytable)*100,2)

placed <- dean[ which(dean$Placement_B== 1), ] View(placed)

median(placed$Salary)

agg <-(aggregate(Salary~Gender, data= placed, mean)) agg

hist(placed$Percent_MBA, main=‘MBA Performance of placed students’, xlab=‘MBA Percantage’, ylab=‘Count’,xlim=c(50,80),breaks=2.5,col=“grey”)

notplaced <- dean[ which(dean$Placement_B== 0), ] View(notplaced)

library(lattice) histogram(~Percent_MBA|Placement, data=dean, breaks=2.5, xlab=‘MBA Percentage’)

bwplot(Gender~Salary, data=dean, horizontal=TRUE,xlab=“Salary”, main=“Comparison of Salaries of male and female”,ylab=“Gender”)

placedET <- placed[ which(placed$Entrance_Tes!= “None”), ] View(placedET)

library(car) scatterplotMatrix(formula=~Salary+Percent_MBA+Percentile_ET,data=placedET,daigonal=“histogram”, main=“Scatter Plot Matrix”)