Reading the data set

Here we read the data set and create a summary analysis showing the mean, median etc. of each variable.

mbasalaries.df <- read.csv(paste("MBA Starting Salaries Data.csv",sep=""))
library(psych)
## Warning: package 'psych' was built under R version 3.4.3
describe(mbasalaries.df)
##          vars   n     mean       sd median  trimmed     mad min    max
## age         1 274    27.36     3.71     27    26.76    2.97  22     48
## sex         2 274     1.25     0.43      1     1.19    0.00   1      2
## gmat_tot    3 274   619.45    57.54    620   618.86   59.30 450    790
## gmat_qpc    4 274    80.64    14.87     83    82.31   14.83  28     99
## gmat_vpc    5 274    78.32    16.86     81    80.33   14.83  16     99
## gmat_tpc    6 274    84.20    14.02     87    86.12   11.86   0     99
## s_avg       7 274     3.03     0.38      3     3.03    0.44   2      4
## f_avg       8 274     3.06     0.53      3     3.09    0.37   0      4
## quarter     9 274     2.48     1.11      2     2.47    1.48   1      4
## work_yrs   10 274     3.87     3.23      3     3.29    1.48   0     22
## frstlang   11 274     1.12     0.32      1     1.02    0.00   1      2
## salary     12 274 39025.69 50951.56    999 33607.86 1481.12   0 220000
## satis      13 274   172.18   371.61      6    91.50    1.48   1    998
##           range  skew kurtosis      se
## age          26  2.16     6.45    0.22
## sex           1  1.16    -0.66    0.03
## gmat_tot    340 -0.01     0.06    3.48
## gmat_qpc     71 -0.92     0.30    0.90
## gmat_vpc     83 -1.04     0.74    1.02
## gmat_tpc     99 -2.28     9.02    0.85
## s_avg         2 -0.06    -0.38    0.02
## f_avg         4 -2.08    10.85    0.03
## quarter       3  0.02    -1.35    0.07
## work_yrs     22  2.78     9.80    0.20
## frstlang      1  2.37     3.65    0.02
## salary   220000  0.70    -1.05 3078.10
## satis       997  1.77     1.13   22.45

Box plots/ Bar plots

Here we make the box plots and bar plots for each variable to understand it better.

hist(mbasalaries.df$age, breaks=20,col="pink",xlab="Age in years", main="Graph showing age distribution")

hist(mbasalaries.df$sex, main = "Graph showing the number of males and females", xlab = "Females - 2 and Males - 1",col = "pink")

hist(mbasalaries.df$work_yrs, breaks=20,col="green",xlab="Work Experience in years", main="Work experience distribution")

hist(mbasalaries.df$gmat_tot, breaks=40,col="blue",xlab="score out of 800", main="Gmat Score distribution")

plot(mbasalaries.df$s_avg, main = "Spring MBA average")

plot(mbasalaries.df$f_avg, main = "Fall MBA average")

hist(mbasalaries.df$work_yrs, main = "Years of work experience",col="green",xlab = "Number of years")

plot(mbasalaries.df$frstlang, main = "First language")

hist(mbasalaries.df$salary, main = "Starting salaries", xlab = "Starting salary", col = "pink")

newdata <- mbasalaries.df[ which(mbasalaries.df$satis<='7'), ]
hist(newdata$satis, breaks=5,col="magenta",xlab="Degree of Satisfaction,1=low 7=high", main="Satisfaction  distribution")

Scatter plots

library(car)
## Warning: package 'car' was built under R version 3.4.3
## 
## Attaching package: 'car'
## The following object is masked from 'package:psych':
## 
##     logit
scatterplot(salary ~age,     data=mbasalaries.df,
            spread=FALSE, smoother.args=list(lty=2),
            main="Scatter plot of salary vs age",
            xlab="age",
            ylab="salary")

scatterplot(salary ~sex,     data=mbasalaries.df,
            spread=FALSE, smoother.args=list(lty=2),
            main="Scatter plot of salary vs sex",
            xlab="sex",
            ylab="salary")

scatterplot(salary ~frstlang,     data=mbasalaries.df,
            main="Scatter plot of salary vs first language",
            xlab="first language",
            ylab="salary")

scatterplot(salary ~ gmat_tot,     data=mbasalaries.df,
            main="Scatter plot of salary vs first language",
            xlab="first language",
            ylab="salary")

scatterplot(salary ~work_yrs,     data=mbasalaries.df,
            main="Scatter plot of salary vs Work exp.",
            xlab="Work experience in years",
            ylab="salary")

Comparing different factors that affect starting salaries

Take subset of those people who got a job.

newdata <- subset(mbasalaries.df, salary>0)

Drawing some contingency tables, as appropriate.

mytable1 <- xtabs(~salary+gmat_tot+frstlang, data = newdata)
mytable1
## , , frstlang = 1
## 
##         gmat_tot
## salary   450 460 500 520 530 540 550 560 570 580 590 600 610 620 630 640
##   998      0   1   0   0   0   0   0   2   0   2   2   4   4   0   6   3
##   999      0   0   1   0   0   0   0   1   3   0   1   1   0   3   1   2
##   64000    0   0   0   0   0   0   0   1   0   0   0   0   0   0   0   0
##   77000    0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   78256    0   0   0   1   0   0   0   0   0   0   0   0   0   0   0   0
##   82000    0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   85000    0   0   0   0   0   0   0   0   0   0   0   0   0   1   0   0
##   86000    0   0   0   0   0   0   0   0   0   0   0   0   0   0   1   0
##   88000    0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   88500    0   0   0   0   0   0   0   0   0   0   0   0   0   1   0   0
##   90000    0   0   0   0   0   0   0   0   0   1   0   0   0   0   1   0
##   92000    0   0   0   0   0   0   0   0   0   0   0   0   0   1   0   0
##   93000    0   0   0   0   0   1   0   0   0   0   0   0   1   1   0   0
##   95000    0   0   0   0   1   0   0   2   0   0   0   0   2   0   0   0
##   96000    0   0   0   0   0   0   0   1   0   0   1   1   0   0   0   0
##   96500    0   0   1   0   0   0   0   0   0   0   0   0   0   0   0   0
##   97000    0   0   0   0   0   0   0   0   0   1   0   0   0   1   0   0
##   98000    0   0   0   0   0   0   0   1   2   1   1   0   1   0   0   0
##   99000    0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   100000   0   0   0   0   0   0   0   2   0   1   0   1   1   0   1   0
##   100400   0   0   0   0   0   0   0   0   0   0   0   0   0   0   1   0
##   101000   0   0   0   0   0   0   0   0   0   0   0   1   0   1   0   0
##   101100   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   101600   0   0   0   0   0   0   0   0   0   0   0   0   0   0   1   0
##   102500   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   103000   0   0   0   0   0   0   0   0   0   0   0   0   0   1   0   0
##   104000   0   0   0   0   0   0   0   1   0   0   0   0   0   0   0   0
##   105000   0   0   0   0   0   0   2   0   2   3   0   1   0   1   0   0
##   106000   0   0   0   0   0   0   0   0   0   0   0   0   0   1   0   0
##   107000   0   0   0   0   0   0   0   0   0   0   0   1   0   0   0   0
##   107300   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   107500   0   0   0   0   0   0   0   0   0   0   0   0   0   0   1   0
##   108000   0   0   0   0   0   0   0   0   1   0   0   1   0   0   0   0
##   110000   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   1
##   112000   0   0   0   0   0   0   0   0   0   0   0   1   0   0   0   0
##   115000   0   0   0   0   0   1   0   0   1   0   0   0   0   1   1   0
##   118000   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   120000   0   0   0   0   0   0   0   0   0   0   0   2   0   0   0   0
##   126710   0   0   0   0   0   0   1   0   0   0   0   0   0   0   0   0
##   130000   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   145800   0   0   0   0   0   0   0   0   0   0   0   0   0   1   0   0
##   146000   0   0   0   0   0   0   0   0   0   0   0   0   0   0   1   0
##   162000   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   220000   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##         gmat_tot
## salary   650 660 670 680 690 700 710 720 730 740 790
##   998      1   2   3   2   2   0   1   1   0   2   0
##   999      2   3   1   1   2   0   1   0   1   1   1
##   64000    0   0   0   0   0   0   0   0   0   0   0
##   77000    0   1   0   0   0   0   0   0   0   0   0
##   78256    0   0   0   0   0   0   0   0   0   0   0
##   82000    0   0   1   0   0   0   0   0   0   0   0
##   85000    0   1   0   0   0   1   0   1   0   0   0
##   86000    0   0   0   1   0   0   0   0   0   0   0
##   88000    1   0   0   0   0   0   0   0   0   0   0
##   88500    0   0   0   0   0   0   0   0   0   0   0
##   90000    1   0   0   0   0   0   0   0   0   0   0
##   92000    0   1   0   0   0   0   1   0   0   0   0
##   93000    0   0   0   0   0   0   0   0   0   0   0
##   95000    0   0   2   0   0   0   0   0   0   0   0
##   96000    1   0   0   0   0   0   0   0   0   0   0
##   96500    0   0   0   0   0   0   0   0   0   0   0
##   97000    0   0   0   0   0   0   0   0   0   0   0
##   98000    0   0   1   0   0   0   1   0   0   0   0
##   99000    0   0   0   0   0   0   0   0   0   0   0
##   100000   2   0   0   0   0   0   1   0   0   0   0
##   100400   0   0   0   0   0   0   0   0   0   0   0
##   101000   0   0   0   0   0   0   0   0   0   0   0
##   101100   0   1   0   0   0   0   0   0   0   0   0
##   101600   0   0   0   0   0   0   0   0   0   0   0
##   102500   0   0   1   0   0   0   0   0   0   0   0
##   103000   0   0   0   0   0   0   0   0   0   0   0
##   104000   0   0   0   0   0   0   0   0   0   0   0
##   105000   1   0   0   1   0   0   0   0   0   0   0
##   106000   0   0   0   2   0   0   0   0   0   0   0
##   107000   0   0   0   0   0   0   0   0   0   0   0
##   107300   0   0   0   0   0   0   0   0   0   0   0
##   107500   0   0   0   0   0   0   0   0   0   0   0
##   108000   0   0   0   0   0   0   0   0   0   0   0
##   110000   0   0   0   0   0   0   0   0   0   0   0
##   112000   0   0   1   1   0   0   0   0   0   0   0
##   115000   0   0   0   0   0   0   1   0   0   0   0
##   118000   0   0   0   0   0   0   0   0   0   0   0
##   120000   0   0   1   0   0   1   0   0   0   0   0
##   126710   0   0   0   0   0   0   0   0   0   0   0
##   130000   1   0   0   0   0   0   0   0   0   0   0
##   145800   0   0   0   0   0   0   0   0   0   0   0
##   146000   0   0   0   0   0   0   0   0   0   0   0
##   162000   0   0   0   0   0   1   0   0   0   0   0
##   220000   0   0   0   0   0   0   0   0   0   0   0
## 
## , , frstlang = 2
## 
##         gmat_tot
## salary   450 460 500 520 530 540 550 560 570 580 590 600 610 620 630 640
##   998      1   0   0   0   0   0   0   1   0   0   0   1   0   0   1   0
##   999      0   0   0   0   0   0   1   1   1   1   1   2   0   1   1   0
##   64000    0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   77000    0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   78256    0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   82000    0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   85000    0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   86000    0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   88000    0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   88500    0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   90000    0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   92000    0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   93000    0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   95000    0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   96000    0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   96500    0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   97000    0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   98000    0   0   0   0   0   0   0   0   1   0   0   0   0   0   0   0
##   99000    0   0   0   0   0   0   0   0   0   1   0   0   0   0   0   0
##   100000   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   100400   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   101000   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   101100   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   101600   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   102500   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   103000   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   104000   0   0   0   0   1   0   0   0   0   0   0   0   0   0   0   0
##   105000   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   106000   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   107000   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   107300   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   107500   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   108000   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   110000   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   112000   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   115000   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   118000   0   0   0   0   0   0   0   0   0   0   0   0   0   1   0   0
##   120000   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   126710   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   130000   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   145800   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   146000   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   162000   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
##   220000   0   0   1   0   0   0   0   0   0   0   0   0   0   0   0   0
##         gmat_tot
## salary   650 660 670 680 690 700 710 720 730 740 790
##   998      1   1   2   0   0   0   0   0   0   0   0
##   999      0   0   0   0   0   0   0   0   0   0   0
##   64000    0   0   0   0   0   0   0   0   0   0   0
##   77000    0   0   0   0   0   0   0   0   0   0   0
##   78256    0   0   0   0   0   0   0   0   0   0   0
##   82000    0   0   0   0   0   0   0   0   0   0   0
##   85000    0   0   0   0   0   0   0   0   0   0   0
##   86000    0   0   0   0   0   0   0   0   0   0   0
##   88000    0   0   0   0   0   0   0   0   0   0   0
##   88500    0   0   0   0   0   0   0   0   0   0   0
##   90000    0   0   0   0   0   0   0   0   0   0   0
##   92000    0   0   0   0   0   0   0   0   0   0   0
##   93000    0   0   0   0   0   0   0   0   0   0   0
##   95000    0   0   0   0   0   0   0   0   0   0   0
##   96000    0   0   0   0   0   0   0   0   0   0   0
##   96500    0   0   0   0   0   0   0   0   0   0   0
##   97000    0   0   0   0   0   0   0   0   0   0   0
##   98000    0   0   0   1   0   0   0   0   0   0   0
##   99000    0   0   0   0   0   0   0   0   0   0   0
##   100000   0   0   0   0   0   0   0   0   0   0   0
##   100400   0   0   0   0   0   0   0   0   0   0   0
##   101000   0   0   0   0   0   0   0   0   0   0   0
##   101100   0   0   0   0   0   0   0   0   0   0   0
##   101600   0   0   0   0   0   0   0   0   0   0   0
##   102500   0   0   0   0   0   0   0   0   0   0   0
##   103000   0   0   0   0   0   0   0   0   0   0   0
##   104000   0   0   0   0   0   0   0   0   0   0   0
##   105000   0   0   0   0   0   0   0   0   0   0   0
##   106000   0   0   0   0   0   0   0   0   0   0   0
##   107000   0   0   0   0   0   0   0   0   0   0   0
##   107300   0   1   0   0   0   0   0   0   0   0   0
##   107500   0   0   0   0   0   0   0   0   0   0   0
##   108000   0   0   0   0   0   0   0   0   0   0   0
##   110000   0   0   0   0   0   0   0   0   0   0   0
##   112000   0   0   0   0   0   0   0   0   0   0   0
##   115000   0   0   0   0   0   0   0   0   0   0   0
##   118000   0   0   0   0   0   0   0   0   0   0   0
##   120000   0   0   0   0   0   0   0   0   0   0   0
##   126710   0   0   0   0   0   0   0   0   0   0   0
##   130000   0   0   0   0   0   0   0   0   0   0   0
##   145800   0   0   0   0   0   0   0   0   0   0   0
##   146000   0   0   0   0   0   0   0   0   0   0   0
##   162000   0   0   0   0   0   0   0   0   0   0   0
##   220000   0   0   0   0   0   0   0   0   0   0   0
mytable2 <- xtabs(~salary + sex + work_yrs, data = newdata)
mytable2
## , , work_yrs = 0
## 
##         sex
## salary    1  2
##   998     0  0
##   999     1  0
##   64000   0  0
##   77000   0  0
##   78256   0  0
##   82000   0  0
##   85000   0  0
##   86000   0  0
##   88000   0  0
##   88500   0  0
##   90000   0  0
##   92000   0  0
##   93000   0  0
##   95000   1  0
##   96000   0  0
##   96500   0  0
##   97000   0  0
##   98000   0  0
##   99000   0  0
##   100000  0  0
##   100400  0  0
##   101000  0  0
##   101100  0  0
##   101600  0  0
##   102500  0  0
##   103000  0  0
##   104000  0  0
##   105000  0  0
##   106000  0  0
##   107000  0  0
##   107300  0  0
##   107500  0  0
##   108000  0  0
##   110000  0  0
##   112000  0  0
##   115000  0  0
##   118000  0  0
##   120000  0  0
##   126710  0  0
##   130000  0  0
##   145800  0  0
##   146000  0  0
##   162000  0  0
##   220000  0  0
## 
## , , work_yrs = 1
## 
##         sex
## salary    1  2
##   998     2  0
##   999     2  0
##   64000   0  0
##   77000   0  0
##   78256   0  1
##   82000   0  1
##   85000   0  1
##   86000   0  0
##   88000   0  0
##   88500   0  0
##   90000   0  0
##   92000   0  0
##   93000   0  0
##   95000   0  1
##   96000   1  0
##   96500   0  0
##   97000   0  0
##   98000   0  0
##   99000   0  0
##   100000  0  0
##   100400  0  0
##   101000  0  0
##   101100  0  0
##   101600  0  0
##   102500  0  0
##   103000  0  0
##   104000  0  0
##   105000  0  0
##   106000  0  0
##   107000  0  0
##   107300  0  0
##   107500  0  0
##   108000  0  0
##   110000  0  0
##   112000  0  0
##   115000  2  0
##   118000  0  0
##   120000  0  0
##   126710  0  0
##   130000  0  0
##   145800  0  0
##   146000  0  0
##   162000  1  0
##   220000  0  0
## 
## , , work_yrs = 2
## 
##         sex
## salary    1  2
##   998    13  3
##   999     4  2
##   64000   0  1
##   77000   1  0
##   78256   0  0
##   82000   0  0
##   85000   1  1
##   86000   0  1
##   88000   0  0
##   88500   0  0
##   90000   2  0
##   92000   2  1
##   93000   0  0
##   95000   2  0
##   96000   2  0
##   96500   1  0
##   97000   0  0
##   98000   4  3
##   99000   0  0
##   100000  1  5
##   100400  0  0
##   101000  0  2
##   101100  0  0
##   101600  0  0
##   102500  0  0
##   103000  0  0
##   104000  0  0
##   105000  4  0
##   106000  0  0
##   107000  1  0
##   107300  1  0
##   107500  0  0
##   108000  0  0
##   110000  0  0
##   112000  1  0
##   115000  0  0
##   118000  0  0
##   120000  0  0
##   126710  0  0
##   130000  0  0
##   145800  1  0
##   146000  0  0
##   162000  0  0
##   220000  0  0
## 
## , , work_yrs = 3
## 
##         sex
## salary    1  2
##   998    11  2
##   999     7  1
##   64000   0  0
##   77000   0  0
##   78256   0  0
##   82000   0  0
##   85000   0  1
##   86000   0  1
##   88000   0  1
##   88500   1  0
##   90000   0  0
##   92000   0  0
##   93000   0  0
##   95000   1  1
##   96000   0  0
##   96500   0  0
##   97000   1  0
##   98000   0  1
##   99000   0  0
##   100000  1  0
##   100400  1  0
##   101000  0  0
##   101100  0  0
##   101600  1  0
##   102500  0  0
##   103000  1  0
##   104000  0  0
##   105000  4  0
##   106000  0  0
##   107000  0  0
##   107300  0  0
##   107500  1  0
##   108000  1  0
##   110000  0  0
##   112000  0  0
##   115000  1  0
##   118000  0  0
##   120000  1  0
##   126710  1  0
##   130000  0  0
##   145800  0  0
##   146000  0  0
##   162000  0  0
##   220000  0  0
## 
## , , work_yrs = 4
## 
##         sex
## salary    1  2
##   998     8  4
##   999    10  1
##   64000   0  0
##   77000   0  0
##   78256   0  0
##   82000   0  0
##   85000   0  0
##   86000   0  0
##   88000   0  0
##   88500   0  0
##   90000   0  0
##   92000   0  0
##   93000   1  0
##   95000   0  0
##   96000   0  1
##   96500   0  0
##   97000   1  0
##   98000   1  0
##   99000   0  0
##   100000  1  0
##   100400  0  0
##   101000  0  0
##   101100  0  0
##   101600  0  0
##   102500  0  0
##   103000  0  0
##   104000  2  0
##   105000  0  0
##   106000  0  0
##   107000  0  0
##   107300  0  0
##   107500  0  0
##   108000  1  0
##   110000  0  0
##   112000  0  0
##   115000  2  0
##   118000  0  0
##   120000  0  0
##   126710  0  0
##   130000  1  0
##   145800  0  0
##   146000  0  0
##   162000  0  0
##   220000  0  0
## 
## , , work_yrs = 5
## 
##         sex
## salary    1  2
##   998     0  0
##   999     2  0
##   64000   0  0
##   77000   0  0
##   78256   0  0
##   82000   0  0
##   85000   0  0
##   86000   0  0
##   88000   0  0
##   88500   0  0
##   90000   1  0
##   92000   0  0
##   93000   0  1
##   95000   0  1
##   96000   0  0
##   96500   0  0
##   97000   0  0
##   98000   0  0
##   99000   0  1
##   100000  0  0
##   100400  0  0
##   101000  0  0
##   101100  0  0
##   101600  0  0
##   102500  0  0
##   103000  0  0
##   104000  0  0
##   105000  1  0
##   106000  0  0
##   107000  0  0
##   107300  0  0
##   107500  0  0
##   108000  0  0
##   110000  0  0
##   112000  0  0
##   115000  0  0
##   118000  0  0
##   120000  2  0
##   126710  0  0
##   130000  0  0
##   145800  0  0
##   146000  0  0
##   162000  0  0
##   220000  0  0
## 
## , , work_yrs = 6
## 
##         sex
## salary    1  2
##   998     1  0
##   999     1  1
##   64000   0  0
##   77000   0  0
##   78256   0  0
##   82000   0  0
##   85000   0  0
##   86000   0  0
##   88000   0  0
##   88500   0  0
##   90000   0  0
##   92000   0  0
##   93000   0  0
##   95000   0  0
##   96000   0  0
##   96500   0  0
##   97000   0  0
##   98000   0  0
##   99000   0  0
##   100000  1  0
##   100400  0  0
##   101000  0  0
##   101100  0  0
##   101600  0  0
##   102500  1  0
##   103000  0  0
##   104000  0  0
##   105000  1  0
##   106000  1  1
##   107000  0  0
##   107300  0  0
##   107500  0  0
##   108000  0  0
##   110000  0  1
##   112000  1  0
##   115000  0  0
##   118000  0  0
##   120000  0  0
##   126710  0  0
##   130000  0  0
##   145800  0  0
##   146000  0  0
##   162000  0  0
##   220000  0  0
## 
## , , work_yrs = 7
## 
##         sex
## salary    1  2
##   998     1  0
##   999     2  0
##   64000   0  0
##   77000   0  0
##   78256   0  0
##   82000   0  0
##   85000   0  0
##   86000   0  0
##   88000   0  0
##   88500   0  0
##   90000   0  0
##   92000   0  0
##   93000   0  0
##   95000   0  0
##   96000   0  0
##   96500   0  0
##   97000   0  0
##   98000   1  0
##   99000   0  0
##   100000  0  0
##   100400  0  0
##   101000  0  0
##   101100  0  0
##   101600  0  0
##   102500  0  0
##   103000  0  0
##   104000  0  0
##   105000  0  0
##   106000  0  0
##   107000  0  0
##   107300  0  0
##   107500  0  0
##   108000  0  0
##   110000  0  0
##   112000  0  0
##   115000  0  0
##   118000  0  0
##   120000  0  0
##   126710  0  0
##   130000  0  0
##   145800  0  0
##   146000  0  0
##   162000  0  0
##   220000  0  0
## 
## , , work_yrs = 8
## 
##         sex
## salary    1  2
##   998     1  0
##   999     0  0
##   64000   0  0
##   77000   0  0
##   78256   0  0
##   82000   0  0
##   85000   0  0
##   86000   0  0
##   88000   0  0
##   88500   0  0
##   90000   0  0
##   92000   0  0
##   93000   1  0
##   95000   0  0
##   96000   0  0
##   96500   0  0
##   97000   0  0
##   98000   0  0
##   99000   0  0
##   100000  0  0
##   100400  0  0
##   101000  0  0
##   101100  1  0
##   101600  0  0
##   102500  0  0
##   103000  0  0
##   104000  0  0
##   105000  0  0
##   106000  1  0
##   107000  0  0
##   107300  0  0
##   107500  0  0
##   108000  0  0
##   110000  0  0
##   112000  0  0
##   115000  0  0
##   118000  0  0
##   120000  0  1
##   126710  0  0
##   130000  0  0
##   145800  0  0
##   146000  0  0
##   162000  0  0
##   220000  0  0
## 
## , , work_yrs = 9
## 
##         sex
## salary    1  2
##   998     0  0
##   999     1  0
##   64000   0  0
##   77000   0  0
##   78256   0  0
##   82000   0  0
##   85000   0  0
##   86000   0  0
##   88000   0  0
##   88500   0  0
##   90000   0  0
##   92000   0  0
##   93000   0  0
##   95000   0  0
##   96000   0  0
##   96500   0  0
##   97000   0  0
##   98000   0  0
##   99000   0  0
##   100000  0  0
##   100400  0  0
##   101000  0  0
##   101100  0  0
##   101600  0  0
##   102500  0  0
##   103000  0  0
##   104000  0  0
##   105000  0  0
##   106000  0  0
##   107000  0  0
##   107300  0  0
##   107500  0  0
##   108000  0  0
##   110000  0  0
##   112000  0  0
##   115000  0  0
##   118000  0  0
##   120000  0  0
##   126710  0  0
##   130000  0  0
##   145800  0  0
##   146000  0  0
##   162000  0  0
##   220000  0  0
## 
## , , work_yrs = 10
## 
##         sex
## salary    1  2
##   998     0  0
##   999     0  0
##   64000   0  0
##   77000   0  0
##   78256   0  0
##   82000   0  0
##   85000   0  0
##   86000   0  0
##   88000   0  0
##   88500   0  0
##   90000   0  0
##   92000   0  0
##   93000   0  0
##   95000   0  0
##   96000   0  0
##   96500   0  0
##   97000   0  0
##   98000   0  0
##   99000   0  0
##   100000  0  0
##   100400  0  0
##   101000  0  0
##   101100  0  0
##   101600  0  0
##   102500  0  0
##   103000  0  0
##   104000  0  0
##   105000  0  0
##   106000  0  0
##   107000  0  0
##   107300  0  0
##   107500  0  0
##   108000  0  0
##   110000  0  0
##   112000  0  0
##   115000  0  0
##   118000  1  0
##   120000  0  0
##   126710  0  0
##   130000  0  0
##   145800  0  0
##   146000  0  0
##   162000  0  0
##   220000  0  0
## 
## , , work_yrs = 15
## 
##         sex
## salary    1  2
##   998     0  0
##   999     0  0
##   64000   0  0
##   77000   0  0
##   78256   0  0
##   82000   0  0
##   85000   0  0
##   86000   0  0
##   88000   0  0
##   88500   0  0
##   90000   0  0
##   92000   0  0
##   93000   0  0
##   95000   0  0
##   96000   0  0
##   96500   0  0
##   97000   0  0
##   98000   0  0
##   99000   0  0
##   100000  0  0
##   100400  0  0
##   101000  0  0
##   101100  0  0
##   101600  0  0
##   102500  0  0
##   103000  0  0
##   104000  0  0
##   105000  0  0
##   106000  0  0
##   107000  0  0
##   107300  0  0
##   107500  0  0
##   108000  0  0
##   110000  0  0
##   112000  0  0
##   115000  0  0
##   118000  0  0
##   120000  0  0
##   126710  0  0
##   130000  0  0
##   145800  0  0
##   146000  1  0
##   162000  0  0
##   220000  0  1
## 
## , , work_yrs = 16
## 
##         sex
## salary    1  2
##   998     0  0
##   999     0  0
##   64000   0  0
##   77000   0  0
##   78256   0  0
##   82000   0  0
##   85000   0  0
##   86000   0  0
##   88000   0  0
##   88500   0  0
##   90000   0  0
##   92000   0  0
##   93000   0  0
##   95000   0  0
##   96000   0  0
##   96500   0  0
##   97000   0  0
##   98000   0  0
##   99000   0  0
##   100000  0  0
##   100400  0  0
##   101000  0  0
##   101100  0  0
##   101600  0  0
##   102500  0  0
##   103000  0  0
##   104000  0  0
##   105000  1  0
##   106000  0  0
##   107000  0  0
##   107300  0  0
##   107500  0  0
##   108000  0  0
##   110000  0  0
##   112000  1  0
##   115000  0  0
##   118000  0  0
##   120000  0  0
##   126710  0  0
##   130000  0  0
##   145800  0  0
##   146000  0  0
##   162000  0  0
##   220000  0  0
chisq.test(xtabs(~salary + gmat_tpc, data = newdata))
## Warning in chisq.test(xtabs(~salary + gmat_tpc, data = newdata)): Chi-
## squared approximation may be incorrect
## 
##  Pearson's Chi-squared test
## 
## data:  xtabs(~salary + gmat_tpc, data = newdata)
## X-squared = 1829.5, df = 1548, p-value = 8.178e-07

This shows that p value is less than 0.05 and we can reject the null hypothesis. Hence, there is a relation between overall gmat percentile and starting salary.

chisq.test(xtabs(~salary+sex, data = newdata))
## Warning in chisq.test(xtabs(~salary + sex, data = newdata)): Chi-squared
## approximation may be incorrect
## 
##  Pearson's Chi-squared test
## 
## data:  xtabs(~salary + sex, data = newdata)
## X-squared = 64.319, df = 43, p-value = 0.0192

Here, as p value is less than 0.05 we can reject the null hypothesis and state that there is a relation between sex and starting mba salary.

chisq.test(xtabs(~salary+work_yrs, data = newdata))
## Warning in chisq.test(xtabs(~salary + work_yrs, data = newdata)): Chi-
## squared approximation may be incorrect
## 
##  Pearson's Chi-squared test
## 
## data:  xtabs(~salary + work_yrs, data = newdata)
## X-squared = 773.16, df = 516, p-value = 1.433e-12

Here as p value is less than 0.05 we can reject the null hypothesis and state that there is a relation between work experience and starting salaries.

chisq.test(newdata$salary, newdata$frstlang)
## Warning in chisq.test(newdata$salary, newdata$frstlang): Chi-squared
## approximation may be incorrect
## 
##  Pearson's Chi-squared test
## 
## data:  newdata$salary and newdata$frstlang
## X-squared = 48.273, df = 43, p-value = 0.2682

Since p-value > 0.05, we cannot reject the null hypothesis stating that there is no relation between first language and starting mba salaries.

Linear Regression model

fit.sex <- lm(salary ~ sex, data = newdata)
summary(fit.sex)
## 
## Call:
## lm(formula = salary ~ sex, data = newdata)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -67185 -53857  24317  45145 151817 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    41527      11820   3.513 0.000558 ***
## sex            13328       8977   1.485 0.139343    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 52340 on 182 degrees of freedom
## Multiple R-squared:  0.01197,    Adjusted R-squared:  0.006539 
## F-statistic: 2.204 on 1 and 182 DF,  p-value: 0.1393

Since the p-value>0.05, there is no relation between starting salaries and sex.

fit.gmat <- lm(salary ~ gmat_tpc, data = newdata)
summary(fit.gmat)
## 
## Call:
## lm(formula = salary ~ gmat_tpc, data = newdata)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -82171 -55389  30525  43427 151841 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept)  83169.6    25831.5   3.220  0.00152 **
## gmat_tpc      -294.3      300.0  -0.981  0.32788   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 52520 on 182 degrees of freedom
## Multiple R-squared:  0.00526,    Adjusted R-squared:  -0.0002054 
## F-statistic: 0.9624 on 1 and 182 DF,  p-value: 0.3279

Since p value is greater than 0.05, there’s no relation between gmat percentile and starting salaries.

fit.exp <- lm(salary ~ work_yrs, data = newdata)
summary(fit.exp)
## 
## Call:
## lm(formula = salary ~ work_yrs, data = newdata)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -77149 -55208  29637  45450 119911 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    45236       6632   6.821 1.29e-10 ***
## work_yrs        3657       1539   2.377   0.0185 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 51860 on 182 degrees of freedom
## Multiple R-squared:  0.0301, Adjusted R-squared:  0.02477 
## F-statistic: 5.649 on 1 and 182 DF,  p-value: 0.01851

Since p value is < 0.05, there is a relation between work experience in years and the starting salaries of MBA graduates. R-square: 3.01% Adjusted R-square: 2.4%

fitted(fit.exp)
##         5         9        10        11        12        13        14 
##  52549.55  52549.55  52549.55  52549.55  52549.55  56206.41  52549.55 
##        15        16        17        18        19        20        21 
##  59863.28  52549.55  59863.28  56206.41  52549.55  59863.28  59863.28 
##        26        30        35        36        37        38        39 
##  63520.14  59863.28  48892.68  52549.55  52549.55  56206.41  52549.55 
##        40        41        42        43        44        45        46 
##  63520.14  45235.82  48892.68  56206.41  48892.68  59863.28  52549.55 
##        47        48        49        50        51        52        53 
##  52549.55  67177.01  52549.55  56206.41  56206.41  52549.55  63520.14 
##        54        55        56        57        58        59        60 
##  67177.01  74490.74  67177.01  56206.41  56206.41  67177.01 103745.66 
##        61        62        63        64        65        66        67 
##  59863.28  48892.68  81804.47  56206.41  63520.14  63520.14  74490.74 
##        68        69        78        79        80        81        82 
## 100088.80  48892.68  56206.41  52549.55  52549.55  56206.41  52549.55 
##        83        84        85        86        87        91        94 
##  52549.55  56206.41  52549.55  52549.55  56206.41  52549.55  59863.28 
##        95        96        99       101       105       108       115 
##  59863.28  59863.28  59863.28  59863.28  67177.01  59863.28  48892.68 
##       116       117       118       119       120       121       122 
##  52549.55  74490.74  52549.55  56206.41  52549.55  52549.55  52549.55 
##       123       124       125       126       127       128       129 
##  52549.55  56206.41  63520.14  52549.55  59863.28  52549.55  56206.41 
##       130       131       132       133       134       135       136 
##  59863.28  56206.41  56206.41 103745.66  52549.55  67177.01  48892.68 
##       137       138       139       145       148       149       152 
##  59863.28  59863.28  52549.55  48892.68  59863.28  52549.55  56206.41 
##       153       154       155       156       157       158       161 
##  56206.41  52549.55  59863.28  56206.41  56206.41  59863.28  59863.28 
##       166       170       171       172       173       174       175 
##  45235.82  52549.55  56206.41  56206.41  52549.55  59863.28  56206.41 
##       176       177       178       179       181       186       187 
##  59863.28  59863.28  59863.28  78147.61  59863.28  48892.68  56206.41 
##       188       189       190       191       192       193       194 
##  52549.55  52549.55  59863.28  63520.14  59863.28  56206.41  52549.55 
##       195       196       197       198       199       200       201 
##  52549.55  52549.55  52549.55  59863.28  70833.87  56206.41  52549.55 
##       202       203       204       205       206       207       208 
##  52549.55  74490.74  67177.01  52549.55  67177.01  52549.55  59863.28 
##       209       210       211       212       214       215       216 
##  52549.55  52549.55  48892.68  52549.55  56206.41  48892.68  56206.41 
##       217       221       223       224       225       226       228 
##  52549.55  56206.41  56206.41  56206.41  56206.41  59863.28  59863.28 
##       231       235       239       240       245       246       247 
##  48892.68  56206.41  70833.87  56206.41  63520.14  67177.01  70833.87 
##       248       249       251       252       256       257       258 
##  67177.01  74490.74  70833.87  59863.28  52549.55  52549.55  56206.41 
##       259       260       261       262       263       264       265 
##  52549.55  56206.41  63520.14  52549.55  52549.55  52549.55  52549.55 
##       266       267       268       269       270       271       272 
##  52549.55  52549.55  56206.41  56206.41  59863.28  52549.55  56206.41 
##       273       274 
##  56206.41 100088.80
fit.lang <- lm(salary ~ frstlang, data = newdata)
summary(fit.lang)
## 
## Call:
## lm(formula = salary ~ frstlang, data = newdata)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -60451 -60450  26801  40376 184114 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    87011      13411   6.488 7.97e-10 ***
## frstlang      -25562      11369  -2.248   0.0258 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 51940 on 182 degrees of freedom
## Multiple R-squared:  0.02702,    Adjusted R-squared:  0.02168 
## F-statistic: 5.055 on 1 and 182 DF,  p-value: 0.02575

Since p-value is < 0.05, there is a relation between first language and MBA starting salaries. R-Squared: 2.7% Adjusted R-Squared: 2.1%

Cleary, the most significant factor is work experience in determining the starting salaries of MBA salaries.

Those who did not get a job

newdata2 <- subset(mbasalaries.df, salary==0)
newdata2
##     age sex gmat_tot gmat_qpc gmat_vpc gmat_tpc s_avg f_avg quarter
## 1    23   2      620       77       87       87  3.40  3.00       1
## 2    24   1      610       90       71       87  3.50  4.00       1
## 3    24   1      670       99       78       95  3.30  3.25       1
## 4    24   1      570       56       81       75  3.30  2.67       1
## 6    24   1      640       82       89       91  3.90  3.75       1
## 7    25   1      610       89       74       87  3.40  3.50       1
## 8    25   2      650       88       89       92  3.30  3.75       1
## 22   27   1      740       99       96       99  3.50  3.50       1
## 23   27   1      750       99       98       99  3.40  3.50       1
## 24   28   2      540       75       50       65  3.60  4.00       1
## 25   29   1      580       56       87       78  3.64  3.33       1
## 27   31   2      560       60       78       72  3.30  3.75       1
## 28   32   1      760       99       99       99  3.40  3.00       1
## 29   32   1      640       79       91       91  3.60  3.75       1
## 31   34   2      620       75       89       87  3.30  3.00       1
## 32   37   2      560       43       87       72  3.40  3.50       1
## 33   42   2      650       75       98       93  3.38  3.00       1
## 34   48   1      590       84       62       81  3.80  4.00       1
## 70   22   1      600       95       54       83  3.00  3.00       2
## 71   23   1      640       89       87       92  3.00  3.00       2
## 72   24   1      550       73       63       69  3.10  3.00       2
## 73   24   1      570       82       58       75  3.09  3.50       2
## 74   24   1      620       82       84       87  3.10  3.50       2
## 75   25   2      570       61       81       76  3.00  3.25       2
## 76   25   1      660       94       84       94  3.27  3.75       2
## 77   25   1      680       94       92       97  3.17  3.50       2
## 88   26   2      560       64       71       72  3.20  3.25       2
## 89   26   1      560       87       41       72  3.00  3.00       2
## 90   26   1      530       68       54       62  3.09  3.17       2
## 92   27   1      720       99       95       99  3.10  3.25       2
## 93   27   1      590       60       87       81  3.00  2.75       2
## 97   28   1      620       81       90       89  3.20  3.00       2
## 98   28   2      610       85       78       86  3.10  3.00       2
## 100  29   1      660       94       87       94  3.00  3.00       2
## 102  29   1      510       57       50       55  3.27  3.40       2
## 103  29   2      640       90       84       92  3.20  3.00       2
## 104  29   1      610       91       62       86  3.10  3.67       2
## 106  29   1      580       79       67       78  3.00  3.25       2
## 107  30   1      680       97       87       96  3.00  3.00       2
## 109  32   2      610       64       89       86  3.25  0.00       2
## 110  35   1      540       43       78       65  3.20  3.25       2
## 111  35   1      630       66       95       90  3.08  3.25       2
## 112  36   2      530       48       71       62  3.00  2.50       2
## 113  36   1      650       87       89       93  3.00  3.20       2
## 114  43   1      630       82       87       89  3.10  3.00       2
## 140  23   1      720       95       98       99  2.80  2.50       3
## 141  24   2      640       94       78       92  2.90  3.25       3
## 142  24   1      710       96       97       99  2.80  2.75       3
## 143  24   1      670       94       89       96  2.70  3.00       3
## 144  24   2      710       97       97       99  2.80  3.00       3
## 146  24   1      600       89       62       83  2.90  3.00       3
## 147  24   2      640       96       71       91  2.70  2.50       3
## 150  25   1      550       72       58       69  2.90  3.00       3
## 151  25   1      710       99       91       98  2.90  3.25       3
## 159  26   1      560       56       81       72  2.80  3.25       3
## 160  26   1      540       52       71       65  2.70  2.75       3
## 162  26   2      570       48       89       75  2.82  2.50       3
## 163  26   1      610       82       81       86  2.90  2.75       3
## 164  27   1      650       89       84       93  2.90  3.00       3
## 165  27   2      550       66       63       69  2.90  3.00       3
## 167  27   1      610       97       45       86  2.70  2.50       3
## 168  27   2      630       82       89       89  2.70  3.25       3
## 169  27   2      560       61       74       73  2.80  3.25       3
## 180  29   1      590       92       58       81  2.80  2.75       3
## 182  32   1      550       52       78       71  2.70  2.75       3
## 183  34   1      610       79       81       86  2.80  3.00       3
## 184  34   1      610       82       78       86  2.70  3.00       3
## 185  43   1      480       49       41       45  2.90  3.25       3
## 213  25   1      730       98       96       99  2.40  2.75       4
## 218  25   1      700       99       87       98  2.00  2.00       4
## 219  26   1      660       93       87       95  2.60  2.00       4
## 220  26   1      450       28       46       34  2.10  2.00       4
## 222  26   1      600       75       78       83  2.20  2.25       4
## 227  27   2      560       59       74       73  2.40  2.50       4
## 229  27   1      630       93       78       91  2.10  2.50       4
## 230  27   1      580       84       58       78  2.70  2.75       4
## 232  27   1      670       89       91       95  3.60  3.25       4
## 233  27   1      580       74       70       78  3.40  3.25       4
## 234  28   1      560       74       67       73  3.60  3.60       4
## 236  28   1      710       94       98       99  3.40  3.75       4
## 237  28   1      570       69       71        0  2.30  2.50       4
## 238  29   1      530       35       81       62  3.30  2.75       4
## 241  29   1      670       91       91       95  3.30  3.25       4
## 242  29   1      630       99       50       89  2.90  3.25       4
## 243  29   2      680       89       96       96  2.80  3.00       4
## 244  30   1      650       88       92       93  3.45  3.83       4
## 250  31   1      570       75       62       75  2.80  3.00       4
## 253  32   1      510       79       22       54  2.30  2.25       4
## 254  35   1      570       72       71       75  3.30  4.00       4
## 255  39   2      700       89       98       98  3.30  3.25       4
##     work_yrs frstlang salary satis
## 1          2        1      0     7
## 2          2        1      0     6
## 3          2        1      0     6
## 4          1        1      0     7
## 6          2        1      0     6
## 7          2        1      0     5
## 8          2        1      0     6
## 22         3        1      0     6
## 23         1        2      0     5
## 24         5        1      0     5
## 25         3        1      0     5
## 27        10        1      0     7
## 28         5        1      0     5
## 29         7        1      0     6
## 31         7        1      0     6
## 32         9        1      0     6
## 33        13        1      0     5
## 34        22        1      0     6
## 70         1        1      0     5
## 71         2        1      0     7
## 72         0        2      0     5
## 73         2        1      0     6
## 74         1        1      0     5
## 75         3        1      0     4
## 76         2        1      0     5
## 77         2        1      0     6
## 88         3        1      0     6
## 89         3        1      0     6
## 90         4        2      0     5
## 92         5        1      0     5
## 93         3        1      0     6
## 97         4        1      0     6
## 98         5        1      0     6
## 100        1        1      0     6
## 102        5        1      0     5
## 103        3        1      0     5
## 104        7        1      0     5
## 106        4        1      0     6
## 107        4        1      0     5
## 109       11        1      0     7
## 110        8        1      0     5
## 111       12        1      0     5
## 112        7        1      0     5
## 113       18        1      0     6
## 114       16        1      0     5
## 140        1        1      0     5
## 141        2        2      0     4
## 142        2        1      0     7
## 143        2        1      0     7
## 144        2        1      0     7
## 146        1        1      0     6
## 147        2        1      0     6
## 150        3        1      0     6
## 151        1        1      0     6
## 159        4        1      0     6
## 160        2        1      0     6
## 162        3        1      0     5
## 163        3        1      0     6
## 164        2        1      0     6
## 165        3        1      0     4
## 167        4        2      0     5
## 168        5        1      0     6
## 169        5        1      0     6
## 180        3        2      0     5
## 182        7        1      0     6
## 183       11        1      0     6
## 184       12        1      0     5
## 185       22        1      0     5
## 213        2        1      0     6
## 218        1        1      0     7
## 219        2        1      0     5
## 220        4        1      0     6
## 222        2        1      0     6
## 227        2        1      0     5
## 229        4        1      0     5
## 230        1        1      0     5
## 232        5        1      0     6
## 233        3        1      0     6
## 234        5        1      0     5
## 236        6        1      0     6
## 237        5        1      0     5
## 238        6        1      0     7
## 241        3        1      0     5
## 242        1        2      0     4
## 243        4        1      0     5
## 244        2        1      0     6
## 250        1        1      0     6
## 253        5        2      0     5
## 254        8        1      0     6
## 255        5        1      0     5
chisq.test(newdata2$satis, newdata2$gmat_tot)
## Warning in chisq.test(newdata2$satis, newdata2$gmat_tot): Chi-squared
## approximation may be incorrect
## 
##  Pearson's Chi-squared test
## 
## data:  newdata2$satis and newdata2$gmat_tot
## X-squared = 54.864, df = 75, p-value = 0.9611

Since p-value is > 0.05, there is no relation between gmat total score and satisfaction levels of MBA graduates.