##
##
## 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
##
##
##
The P-Value is smaller than alpha (0.001), therefore we reject the
null hypothesis (Ho), and conclude that there is an association between
leaving and salary.
Employees with high salary leave much less.
Relative risk is low salary / high salary meaning people with low
salaries are 4.5x more likely to leave vs. those with high
salaries.
Employees with low salaries are 3x (0.204/0.066) more likely to leave
vs. those with medium salaries.
Create bar plot
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 14999
##
##
## | hr$left
## hr$Work_accident | 0 | 1 | Row Total |
## -----------------|-----------|-----------|-----------|
## 0 | 9428 | 3402 | 12830 |
## | 12.346 | 39.510 | |
## | 0.735 | 0.265 | 0.855 |
## | 0.825 | 0.953 | |
## | 0.629 | 0.227 | |
## -----------------|-----------|-----------|-----------|
## 1 | 2000 | 169 | 2169 |
## | 73.029 | 233.709 | |
## | 0.922 | 0.078 | 0.145 |
## | 0.175 | 0.047 | |
## | 0.133 | 0.011 | |
## -----------------|-----------|-----------|-----------|
## Column Total | 11428 | 3571 | 14999 |
## | 0.762 | 0.238 | |
## -----------------|-----------|-----------|-----------|
##
##
## 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
##
##
The P Value is smaller than the alpha (0.01), so we reject the null, there is an association with employee’s who have been in a work accident and those who are likely to leave.