Assignment 9: Chi-Square test - Employee Attrition Analysis

By Kevin Hanson & Pat O’Connell

Task 1:

## 
##  Pearson's Chi-squared test
## 
## data:  hr$Department and hr$left
## X-squared = 86.825, df = 9, p-value = 7.042e-15

Technical Analysis

  • The p-value obtained from the Chi-squared test is extremely small (\(7.042e-15\)). This extremely low p-value indicates strong statistical evidence against the null hypothesis, which assumes no association between the employee’s department and whether they left the company.

  • A very small p-value suggests that the observed association is highly unlikely to have occurred by chance alone, indicating a significant relationship between department and attrition.

Non-Technical Analysis

  • The department an employee works in significantly influences their decision to leave the company.

  • There are notable differences in attrition rates across various departments, suggesting that some departments may have factors contributing to higher employee turnover.

The Graph

Task 2:

## 
##  Pearson's Chi-squared test
## 
## data:  hr$salary and hr$left
## X-squared = 381.23, df = 2, p-value < 2.2e-16

Technical Analysis

  • The p-value (\(2.2e-16\)) is extremely small, indicating a very strong statistical significance. This means there is a very low probability that the observed relationship between salary and attrition occurred by chance.

  • We can conclude with high confidence, based on this small p value, that salary and attrition are not independent; they are significantly associated.

Non-Technical Analysis

  • An employee’s salary level is a strong predictor of whether they will leave the company.

  • Employees with lower salaries are significantly more likely to leave compared to those with higher salaries.

The Graph

Task 3:

## 
##  Pearson's Chi-squared test with Yates' continuity correction
## 
## data:  hr$Work_accident and hr$left
## X-squared = 357.56, df = 1, p-value < 2.2e-16

Technical Analysis

  • The p-value (\(2.2e-16\)) is extremely low, indicating a very strong statistical significance. This suggests that the relationship between work accidents and employee attrition is highly unlikely to be due to random chance.

  • The results strongly support the conclusion, given the small p value, that work accidents are associated with higher employee attrition.

Non-Technical Analysis

  • The p-value (\(2.2e-16\)) is extremely low, indicating a very strong statistical significance. This suggests that the relationship between work accidents and employee attrition is highly unlikely to be due to random chance.

  • The results strongly support the conclusion, given the small p value, that work accidents are associated with higher employee attrition.

The Graph

Task 4:

## 
##  Pearson's Chi-squared test with Yates' continuity correction
## 
## data:  hr$promotion_last_5years and hr$left
## X-squared = 56.262, df = 1, p-value = 6.344e-14

Technical Analysis

  • The p-value (\(6.344e-14\)) is very small, indicating a strong statistical association between whether an employee received a promotion in the last 5 years and their likelihood of leaving.

  • This small p-value suggests that the relationship is highly significant and not likely due to random variation.

Non-Technical Analysis

  • Employees who have not received promotions in the past 5 years are significantly more likely to leave the company.

  • A lack of recent promotions is a strong indicator of potential employee attrition, suggesting that career advancement is a significant factor in employee retention.

The Graph