1. Chi-Square Test: Work Accident vs Left

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

The p-value of the test is very small (likely < 0.05), meaning there is a statistically significant relationship between work accidents and employees leaving the company.

Non-Technical Interpretation

Employees who had a work accident are less likely to leave the company.

Visualization

2. Chi-Square Test: Promotion in last 5 years vs Left

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

The p-value is very small, indicating a statistically significant relationship between promotion history and leaving the company.

Non-Technical Interpretation

Employees who were promoted in the last 5 years are much less likely to leave the company.

Visualization

3. Chi-Square Test: Salary vs Left

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

Technical Interpretation

The p-value is small, suggesting a statistically significant relationship between salary and leaving the company.

Non-Technical Interpretation

Employees with lower salaries are more likely to leave the company.

Visualization

4. Chi-Square Test: Department vs Left

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

Technical Interpretation

The p-value is very small, meaning department and employee attrition are related.

Non-Technical Interpretation

Some departments (like Sales and Technical) have higher employee turnover compared to others.

Visualization