Question 1

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

The p-value is very small, therefore the probability of these results being random is very small.
chi-square test: there is dependency between work accident and leaving the company.
non technicial: employees who did not have a work accident are more likely to leave (more then 3 times)

Question 2

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

The p-value is very small, therefore the probability of these results being random is very small. chi-square test: There is a dependency on whether or not there was a promotion in the last 5 years and if they left the company non technical :Employees who did not have a promotion in the last 5 years are more likely to leave ( more then 8)

Question 3

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

The p-value is very small, therefore the probability of these results being random is very small. Chi-square test: There is a correlation between the employees in Hr and they are more likely to leave Non-technical: Employees from HR are 29% more likely to leave

Question 4

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

The p-value is very small, therefore the probability of these results being random is very small. Chi-square test: there is a correlation between those with low, medium and high salaries and whether or not if they left Non-technical: those with a high salary are 7% likely to leave