Project 1

Data Summary:

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

Data Overview

## # A tibble: 6 × 7
##    ...1 rank      discipline yrs.since.phd yrs.service sex   salary
##   <dbl> <chr>     <chr>              <dbl>       <dbl> <chr>  <dbl>
## 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

Boxplot by Sex Facet by Discipline

T-test in theoretical fields between two genders

Null Hypothesis: male professors’ salaries and female professors’ salaries are equal in discipline A.

Alternative Hypothesis: male professors’ salaries and female professors’ salaries are not equal in discipline A.

Since p-value(0.000741) is extremely small, we have sufficient evidence to reject the null hypothesis on the 99% level.

## 
##  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

T-test in applied fields between two genders

Null Hypothesis: male professors’ salaries and female professors’ salaries are equal in discipline B.

Alternative Hypothesis: male professors’ salaries and female professors’ salaries are not equal in discipline B.

Since p-value is 0.2158 > 0.05, we do not have sufficient evidence to reject the null hypothesis.

## 
##  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

Relation of Salary and Yrs.since.phd

Conclusion

Based on our tests, and graphs, we observe the following: Male professors, on average, are paid higher than female professors in applied fields Professors in applied fields, on average, are paid higher than professors in theoretical fields.

However, to test this, we may need to use a regression analysis