1. Is there an association between leaving the company and having a work accident?

## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  14999 
## 
##  
##              | HR$Work_accident 
##      HR$left |         0 |         1 | Row Total | 
## -------------|-----------|-----------|-----------|
##            0 |      9428 |      2000 |     11428 | 
##              |    12.346 |    73.029 |           | 
##              |     0.825 |     0.175 |     0.762 | 
##              |     0.735 |     0.922 |           | 
##              |     0.629 |     0.133 |           | 
## -------------|-----------|-----------|-----------|
##            1 |      3402 |       169 |      3571 | 
##              |    39.510 |   233.709 |           | 
##              |     0.953 |     0.047 |     0.238 | 
##              |     0.265 |     0.078 |           | 
##              |     0.227 |     0.011 |           | 
## -------------|-----------|-----------|-----------|
## Column Total |     12830 |      2169 |     14999 | 
##              |     0.855 |     0.145 |           | 
## -------------|-----------|-----------|-----------|
## 
##  
## Statistics for All Table Factors
## 
## 
## Pearson's Chi-squared test 
## ------------------------------------------------------------
## Chi^2 =  358.5938     d.f. =  1     p =  5.698673e-80 
## 
## Pearson's Chi-squared test with Yates' continuity correction 
## ------------------------------------------------------------
## Chi^2 =  357.5624     d.f. =  1     p =  9.55824e-80 
## 
## 

There is an association between leaving the company and having a work accident.

26.5% of people who had a work accident left the company, and 7.8% of people who did not have a work accident left the company.

People who have work accidents leave the company three times more than those who do not have work accidents.

0.265/0.078 = 3.39 (Relative Risk)

2. Is there an association between leaving the company and getting a promotion in the past 5 years?

## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  14999 
## 
##  
##              | HR$promotion_last_5years 
##      HR$left |         0 |         1 | Row Total | 
## -------------|-----------|-----------|-----------|
##            0 |     11128 |       300 |     11428 | 
##              |     0.290 |    13.343 |           | 
##              |     0.974 |     0.026 |     0.762 | 
##              |     0.758 |     0.940 |           | 
##              |     0.742 |     0.020 |           | 
## -------------|-----------|-----------|-----------|
##            1 |      3552 |        19 |      3571 | 
##              |     0.928 |    42.702 |           | 
##              |     0.995 |     0.005 |     0.238 | 
##              |     0.242 |     0.060 |           | 
##              |     0.237 |     0.001 |           | 
## -------------|-----------|-----------|-----------|
## Column Total |     14680 |       319 |     14999 | 
##              |     0.979 |     0.021 |           | 
## -------------|-----------|-----------|-----------|
## 
##  
## Statistics for All Table Factors
## 
## 
## Pearson's Chi-squared test 
## ------------------------------------------------------------
## Chi^2 =  57.26273     d.f. =  1     p =  3.813123e-14 
## 
## Pearson's Chi-squared test with Yates' continuity correction 
## ------------------------------------------------------------
## Chi^2 =  56.26163     d.f. =  1     p =  6.344155e-14 
## 
## 

There is an association between leaving the company and receiving a promotion within the last five years.

24.2% of people who did not receive a promotion within the last five years left the company, and 6.0% of people who did get promoted left the company.

People who do not get promoted leave the company four times more than those who do get promoted.

0.242/0.060 = 4.03 (Relative Risk)

3. Is there an association between leaving the company and salary?

## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  14999 
## 
##  
##              | HR$left 
##    HR$salary |         0 |         1 | Row Total | 
## -------------|-----------|-----------|-----------|
##         high |      1155 |        82 |      1237 | 
##              |    47.915 |   153.339 |           | 
##              |     0.934 |     0.066 |     0.082 | 
##              |     0.101 |     0.023 |           | 
##              |     0.077 |     0.005 |           | 
## -------------|-----------|-----------|-----------|
##          low |      5144 |      2172 |      7316 | 
##              |    33.200 |   106.247 |           | 
##              |     0.703 |     0.297 |     0.488 | 
##              |     0.450 |     0.608 |           | 
##              |     0.343 |     0.145 |           | 
## -------------|-----------|-----------|-----------|
##       medium |      5129 |      1317 |      6446 | 
##              |     9.648 |    30.876 |           | 
##              |     0.796 |     0.204 |     0.430 | 
##              |     0.449 |     0.369 |           | 
##              |     0.342 |     0.088 |           | 
## -------------|-----------|-----------|-----------|
## Column Total |     11428 |      3571 |     14999 | 
##              |     0.762 |     0.238 |           | 
## -------------|-----------|-----------|-----------|
## 
##  
## Statistics for All Table Factors
## 
## 
## Pearson's Chi-squared test 
## ------------------------------------------------------------
## Chi^2 =  381.225     d.f. =  2     p =  1.652087e-83 
## 
## 
## 

There is an association between leaving the company and employee salary.

60.8% of people with low salaries left the company. 36.9% of people with medium salaries left the company. 2.3% of people with high salaries left the company.

As employee salary increases, their likelihood of leaving decreased by roughly a third.

0.608/0.023 = 26.43 (Relative Risk)