promotions in the last 5 years and people who left

Perform the chi-square test for promotions in the last 5 years and people who left (.5 point)

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

Interpret the results in technical terms (.5 point) For each chi-square test, explain what the test’s p-value means (significance).

p-value interpretation: The p-value is, 0, - indicating a significant relationship. chi-square test interpretation: There is a dependency between promotions and leaving.
non-technical interpretation: Employees not promoted in the last 5 years are more likely to leave.

Create a plot

salaries and people who left

Perform the chi-square test for salaries and people who left

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

Interpret the results in technical terms (.5 point) For each chi-square test, explain what the test’s p-value means (significance).

## p-value interpretation: The p-value is 0 - indicating a significant relationship.
## chi-square test interpretation: There is a dependency between salary level and employee leaving.
## non-technical interpretation: Employees with low salaries are more likely to leave the company.

Create a plot

work accidents and people who left

Perform the chi-square test for work accidents and people who left

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

Interpret the results in technical terms (.5 point) For each chi-square test, explain what the test’s p-value means (significance).

## p-value interpretation: The p-value is 0 - indicating a significant relationship.
## chi-square test interpretation: There is a dependency between work accidents and employee retention.
## non-technical interpretation: Employees who had a work accident are less likely to leave the company.

Create a plot

number of projects and people leaving

Perform the chi-square test for number of projects and people leaving

## 
##  Pearson's Chi-squared test
## 
## data:  table(hr$project_group, hr$left)
## X-squared = 1617.4, df = 2, p-value < 2.2e-16

Interpret the results in technical terms (.5 point) For each chi-square test, explain what the test’s p-value means (significance).

## p-value interpretation: The p-value is 0 - indicating a significant relationship.
## chi-square test interpretation: There is a dependency between number of projects and employee leaving.
## non-technical interpretation: Employees with too few or too many projects are more likely to leave.

Create a plot