Task3b Average salry of male and female who were placed

Finding out the average salary of male and female who were placed.

avgSalary_M_F <- aggregate(placed_students$Salary, by = list(placed_students$Gender), FUN = mean) placed_students$averageSalary_M_F <- avgSalary_M_F[placed_students$Gender,2]

Task3c t-test to test H0 : Average salry of male MBAs is greater than female MBAs

aggregate(placed_students$Salary~placed_students$Gender, FUN = mean)

par(mfrow = c(1,1)) boxplot(placed_students$Salary~placed_students$Gender, xlab = "Gender(M/F)", ylab = "Salaries", main = "Salaries of males and females", col = (c("red", "blue")))

Log to stabilize variance

```log.transformed.salary <- log(placed_students$Salary)

t.test(log.transformed.salary~placed_students$Gender, var.equal = TRUE) ```

Null Hypothesis rejected

since p- value < 0.05 i.e 0.005203 therefore we can reject the null hypothesis that average salary of male MBAs is greater than null hypothesis of female MBAs.Hence there is no significant difference between the salaries of male and female