Wilhelm Harvey, Gamble Enya, Enzhao Wang, Saboo Shaurya
This data is from 2008-09 academic year from one college in the United States.
This data set lists salaries of individual professors.
The variables it includes are:
· Professor rank, differentiating between Professor, Associate Professor and Assistant Professor
· discipline, designated as A or B, indicating an theoretical field and applied fields respectively
· years since PhD, representing the number of years since their PhD was awarded.
· years in service, representing the number of years they have been a professor
· Sex, male or female
X rank discipline yrs.since.phd yrs.service sex salary
1 1 Prof B 19 18 Male 139750
2 2 Prof B 20 16 Male 173200
3 3 AsstProf B 4 3 Male 79750
4 4 Prof B 45 39 Male 115000
5 5 Prof B 40 41 Male 141500
6 6 AssocProf B 6 6 Male 97000
ggplot(data = Salaries, aes(x = sex, y = salary)) + geom_boxplot() + facet_wrap(~discipline, ncol = 4) + labs(title = "Prof Salary Between Discipline")
Welch Two Sample t-test
data: A_male and A_female
t = 3.8377, df = 25.245, p-value = 0.000741
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
10030.19 33239.89
sample estimates:
mean of x mean of y
110699.98 89064.94
Welch Two Sample t-test
data: B_male and B_female
t = 1.2684, df = 26.341, p-value = 0.2158
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-4662.948 19714.649
sample estimates:
mean of x mean of y
118760.4 111234.5
gf_point(salary ~ yrs.since.phd, data = Salaries, color = ~ discipline) %>%
gf_lm() %>%
gf_theme(legend.position = "right") %>%
gf_labs(title = "Relation of Salary and Yrs.since.phd")
Based on our tests, and graphs, we observe the following: