1. Left vs. Work Accident

a. Chi-Square Test

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

p-value interpretation

The p-value is very small (< 0.01), therefore the probability of these results being random is very small.

Technical Interpretation

There is an association between leaving and work accidents, where employees without accidents are more likely to leave.

Non-Technical Interpretation

Employees without work accidents are more than 3 times more likely to leave (0.265 / 0.078)

Graph

2. Left vs. Promotion in the Last 5 Years

a. Chi-Square Test

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

p-value interpretation

The p-value is very small (< 0.01), therefore the probability of these results being random is very small.

Technical Interpretation

There is an association between the number of people getting promoted and leaving, where employees who weren’t promoted in the last 5 years are more likely to leave.

Non-Technical Interpretation

Employees who weren’t promoted in the last 5 years are more than 4 times more likely to leave (0.242/0.060).

Graph

3. Left vs. Time Spent at the Company

Chi-Square Test

## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  14999 
## 
##  
##              | hr$time_spend_company 
##      hr$left |         2 |         3 |         4 |         5 |         6 |         7 |         8 |        10 | Row Total | 
## -------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|
##            0 |      3191 |      4857 |      1667 |       640 |       509 |       188 |       162 |       214 |     11428 | 
##              |   209.353 |     0.552 |    40.594 |   207.268 |     2.647 |    13.986 |    12.052 |    15.921 |           | 
##              |     0.279 |     0.425 |     0.146 |     0.056 |     0.045 |     0.016 |     0.014 |     0.019 |     0.762 | 
##              |     0.984 |     0.754 |     0.652 |     0.434 |     0.709 |     1.000 |     1.000 |     1.000 |           | 
##              |     0.213 |     0.324 |     0.111 |     0.043 |     0.034 |     0.013 |     0.011 |     0.014 |           | 
## -------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|
##            1 |        53 |      1586 |       890 |       833 |       209 |         0 |         0 |         0 |      3571 | 
##              |   669.977 |     1.765 |   129.910 |   663.303 |     8.472 |    44.760 |    38.569 |    50.950 |           | 
##              |     0.015 |     0.444 |     0.249 |     0.233 |     0.059 |     0.000 |     0.000 |     0.000 |     0.238 | 
##              |     0.016 |     0.246 |     0.348 |     0.566 |     0.291 |     0.000 |     0.000 |     0.000 |           | 
##              |     0.004 |     0.106 |     0.059 |     0.056 |     0.014 |     0.000 |     0.000 |     0.000 |           | 
## -------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|
## Column Total |      3244 |      6443 |      2557 |      1473 |       718 |       188 |       162 |       214 |     14999 | 
##              |     0.216 |     0.430 |     0.170 |     0.098 |     0.048 |     0.013 |     0.011 |     0.014 |           | 
## -------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|
## 
##  
## Statistics for All Table Factors
## 
## 
## Pearson's Chi-squared test 
## ------------------------------------------------------------
## Chi^2 =  2110.08     d.f. =  7     p =  0 
## 
## 
## 
## 
##  Pearson's Chi-squared test
## 
## data:  hr$left and hr$time_spend_company
## X-squared = 2110.1, df = 7, p-value < 2.2e-16

p-value interpretation

The p-value is very small (< 0.01), therefore the probability of these results being random is very small.

Technical Interpretation

There is an association between the amount of time employees spent at the company and leaving, where employees who spent less than 7 years are more likely to leave.

Non-Technical Interpretation

Employees who spent less than 7 years are more likely to leave the company.

Graph

4. Left vs. Number of Projects

a. Chi-Square Test

## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  14999 
## 
##  
##              | hr$number_project 
##      hr$left |         2 |         3 |         4 |         5 |         6 |         7 | Row Total | 
## -------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|
##            0 |       821 |      3983 |      3956 |      2149 |       519 |         0 |     11428 | 
##              |   547.921 |   258.355 |   119.428 |     0.977 |   157.624 |   195.051 |           | 
##              |     0.072 |     0.349 |     0.346 |     0.188 |     0.045 |     0.000 |     0.762 | 
##              |     0.344 |     0.982 |     0.906 |     0.778 |     0.442 |     0.000 |           | 
##              |     0.055 |     0.266 |     0.264 |     0.143 |     0.035 |     0.000 |           | 
## -------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|
##            1 |      1567 |        72 |       409 |       612 |       655 |       256 |      3571 | 
##              |  1753.471 |   826.794 |   382.197 |     3.128 |   504.433 |   624.206 |           | 
##              |     0.439 |     0.020 |     0.115 |     0.171 |     0.183 |     0.072 |     0.238 | 
##              |     0.656 |     0.018 |     0.094 |     0.222 |     0.558 |     1.000 |           | 
##              |     0.104 |     0.005 |     0.027 |     0.041 |     0.044 |     0.017 |           | 
## -------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|
## Column Total |      2388 |      4055 |      4365 |      2761 |      1174 |       256 |     14999 | 
##              |     0.159 |     0.270 |     0.291 |     0.184 |     0.078 |     0.017 |           | 
## -------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|
## 
##  
## Statistics for All Table Factors
## 
## 
## Pearson's Chi-squared test 
## ------------------------------------------------------------
## Chi^2 =  5373.586     d.f. =  5     p =  0 
## 
## 
## 
## 
##  Pearson's Chi-squared test
## 
## data:  hr$left and hr$number_project
## X-squared = 5373.6, df = 5, p-value < 2.2e-16

p-value interpretation

The p-value is very small (< 0.01), therefore the probability of these results being random is very small.

Technical Interpretation

There is an association between employees’ number of projects and leaving, where employees who had too much or too little projects are more likely to leave.

Non-Technical Interpretation

Employees who had too much (>= 7) or too little (<= 2) projects are more than likely to leave.

Graph