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:

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

Analysis for list of Questions 1-6

  1. Creation of a table showing the average salary of males and females, who were placed
mytable<- aggregate(placed$Salary, by= list(placed$Gender), FUN= mean)
mytable
##   Group.1        x
## 1       F 253068.0
## 2       M 284241.9
  1. The average salary of male MBAs who were placed is 2,84,241.9

  2. the average salary of female MBAs who were placed is 2,53,068

4)A t-test to test the following hypothesis: “The average salary of the male MBAs is higher than the average salary of female MBAs.”

attach(placed)
t.test(Salary~Gender)
## 
##  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
  1. The p value is .00234

  2. Based on the above output of t test, we reject the hypothesis that average salary of males and females are same( p<.01)