1. Left vs. Department
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 14999
##
##
## | hr$left
## hr$Department | 0 | 1 | Row Total |
## --------------|-----------|-----------|-----------|
## accounting | 563 | 204 | 767 |
## | 0.783 | 2.506 | |
## | 0.734 | 0.266 | 0.051 |
## | 0.049 | 0.057 | |
## | 0.038 | 0.014 | |
## --------------|-----------|-----------|-----------|
## hr | 524 | 215 | 739 |
## | 2.709 | 8.670 | |
## | 0.709 | 0.291 | 0.049 |
## | 0.046 | 0.060 | |
## | 0.035 | 0.014 | |
## --------------|-----------|-----------|-----------|
## IT | 954 | 273 | 1227 |
## | 0.391 | 1.252 | |
## | 0.778 | 0.222 | 0.082 |
## | 0.083 | 0.076 | |
## | 0.064 | 0.018 | |
## --------------|-----------|-----------|-----------|
## management | 539 | 91 | 630 |
## | 7.250 | 23.202 | |
## | 0.856 | 0.144 | 0.042 |
## | 0.047 | 0.025 | |
## | 0.036 | 0.006 | |
## --------------|-----------|-----------|-----------|
## marketing | 655 | 203 | 858 |
## | 0.002 | 0.008 | |
## | 0.763 | 0.237 | 0.057 |
## | 0.057 | 0.057 | |
## | 0.044 | 0.014 | |
## --------------|-----------|-----------|-----------|
## product_mng | 704 | 198 | 902 |
## | 0.408 | 1.307 | |
## | 0.780 | 0.220 | 0.060 |
## | 0.062 | 0.055 | |
## | 0.047 | 0.013 | |
## --------------|-----------|-----------|-----------|
## RandD | 666 | 121 | 787 |
## | 7.346 | 23.510 | |
## | 0.846 | 0.154 | 0.052 |
## | 0.058 | 0.034 | |
## | 0.044 | 0.008 | |
## --------------|-----------|-----------|-----------|
## sales | 3126 | 1014 | 4140 |
## | 0.255 | 0.815 | |
## | 0.755 | 0.245 | 0.276 |
## | 0.274 | 0.284 | |
## | 0.208 | 0.068 | |
## --------------|-----------|-----------|-----------|
## support | 1674 | 555 | 2229 |
## | 0.348 | 1.114 | |
## | 0.751 | 0.249 | 0.149 |
## | 0.146 | 0.155 | |
## | 0.112 | 0.037 | |
## --------------|-----------|-----------|-----------|
## technical | 2023 | 697 | 2720 |
## | 1.178 | 3.771 | |
## | 0.744 | 0.256 | 0.181 |
## | 0.177 | 0.195 | |
## | 0.135 | 0.046 | |
## --------------|-----------|-----------|-----------|
## Column Total | 11428 | 3571 | 14999 |
## | 0.762 | 0.238 | |
## --------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 86.82547 d.f. = 9 p = 7.04213e-15
##
##
##
Technical Interpretation
- The p-value is smaller than alpha (0.001), therefore we reject the
H0 and conclude that there is a significant association between
department and attrition.
Non-Technical Interpretation
- Some departments have much higher turnover than others.
- For example, employees in Sales compared to employees in Management
are 6 (0.815/0.144) times more likely to leave.
- Employees in Technical are 2 (0.256/0.144) times more likely to
leave than employees in Management.
2. Left vs. 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
##
##
##
Technical Interpretation
- The p-values is smaller than alpha (0.001), therefore we reject thr
Ho, and conclude that there is an association between salary and Salary
level and attrition relationship is significant because the p-value is
less than 0.001.
Non-Technical Interpretation
- Employees with high salary leave much less.
- Employees with lower salaries are 4.5 times (0.297/0.066) likely to
leave than those with higher salaries.
- Employees with low salaries are 3 times (0.204/0.066) more likely to
leave vs. those with medium salaries
4. Left vs. Tenure
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 14999
##
##
## | hr$left
## hr$time_spend_company | 0 | 1 | Row Total |
## ----------------------|-----------|-----------|-----------|
## 2 | 3191 | 53 | 3244 |
## | 209.353 | 669.977 | |
## | 0.984 | 0.016 | 0.216 |
## | 0.279 | 0.015 | |
## | 0.213 | 0.004 | |
## ----------------------|-----------|-----------|-----------|
## 3 | 4857 | 1586 | 6443 |
## | 0.552 | 1.765 | |
## | 0.754 | 0.246 | 0.430 |
## | 0.425 | 0.444 | |
## | 0.324 | 0.106 | |
## ----------------------|-----------|-----------|-----------|
## 4 | 1667 | 890 | 2557 |
## | 40.594 | 129.910 | |
## | 0.652 | 0.348 | 0.170 |
## | 0.146 | 0.249 | |
## | 0.111 | 0.059 | |
## ----------------------|-----------|-----------|-----------|
## 5 | 640 | 833 | 1473 |
## | 207.268 | 663.303 | |
## | 0.434 | 0.566 | 0.098 |
## | 0.056 | 0.233 | |
## | 0.043 | 0.056 | |
## ----------------------|-----------|-----------|-----------|
## 6 | 509 | 209 | 718 |
## | 2.647 | 8.472 | |
## | 0.709 | 0.291 | 0.048 |
## | 0.045 | 0.059 | |
## | 0.034 | 0.014 | |
## ----------------------|-----------|-----------|-----------|
## 7 | 188 | 0 | 188 |
## | 13.986 | 44.760 | |
## | 1.000 | 0.000 | 0.013 |
## | 0.016 | 0.000 | |
## | 0.013 | 0.000 | |
## ----------------------|-----------|-----------|-----------|
## 8 | 162 | 0 | 162 |
## | 12.052 | 38.569 | |
## | 1.000 | 0.000 | 0.011 |
## | 0.014 | 0.000 | |
## | 0.011 | 0.000 | |
## ----------------------|-----------|-----------|-----------|
## 10 | 214 | 0 | 214 |
## | 15.921 | 50.950 | |
## | 1.000 | 0.000 | 0.014 |
## | 0.019 | 0.000 | |
## | 0.014 | 0.000 | |
## ----------------------|-----------|-----------|-----------|
## Column Total | 11428 | 3571 | 14999 |
## | 0.762 | 0.238 | |
## ----------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 2110.08 d.f. = 7 p = 0
##
##
##
Technical Interpretation
- The chi-square test gives a p-value below 0.001, so we reject the H0
and conclude that tenure is significantly associated with
attrition.
Non-Technical Interpretation
- Employees with 3 years at the company are likely to leave 15
(15.375) times more than those at 2 years.
- Long-tenured employees (7-10 years) leave much less often with 0%
((0.000+0.000+0.000)/3)leaving.