###Employees with lower satisfaction are more likely to leave

## 
##  Welch Two Sample t-test
## 
## data:  hr$satisfaction_level by hr$left
## t = 46.636, df = 5167, p-value < 2.2e-16
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
##  0.2171815 0.2362417
## sample estimates:
## mean in group 0 mean in group 1 
##       0.6668096       0.4400980

We reject the Ho because the p-value is less than alpha (.001) meaning that there is a difference in means of satisfaction level between those that stayed vs. those that left

Employees with lower satisfaction are more likely to leave

Employees who work longer hours are more likely to leave

## 
##  Welch Two Sample t-test
## 
## data:  hr$average_montly_hours by hr_renamed$left
## t = 7.5323, df = 4875.1, p-value = 5.907e-14
## alternative hypothesis: true difference in means between group left and group stayed is not equal to 0
## 95 percent confidence interval:
##   6.183384 10.534631
## sample estimates:
##   mean in group left mean in group stayed 
##             207.4192             199.0602

We reject the Ho because the p-value is less than alpha (.001) meaning that there is a significant difference in average monthly hours between employees who stayed and those who left

Employees who work longer hours are more likely to leave

###Employees who left tended to have either very high or very low evaluations,while those who stayed had more average evaluation scores.

## 
##  Welch Two Sample t-test
## 
## data:  hr$last_evaluation by hr_renamed$left
## t = 0.72534, df = 5154.9, p-value = 0.4683
## alternative hypothesis: true difference in means between group left and group stayed is not equal to 0
## 95 percent confidence interval:
##  -0.004493874  0.009772224
## sample estimates:
##   mean in group left mean in group stayed 
##            0.7181126            0.7154734

We reject the Ho because the p-value is less than alpha (.001) meaning that there is a significant difference in last evaluation scores between employees that stayed vs. those that left

Employees who left tended to have either very high or very low evaluations,while those who stayed had more average evaluation scores.

###Employees who left tended to be assigned more projects, suggesting that heavier workloads may increase turnover.

## 
##  Welch Two Sample t-test
## 
## data:  hr$number_project by hr_renamed$left
## t = 2.1663, df = 4236.5, p-value = 0.03034
## alternative hypothesis: true difference in means between group left and group stayed is not equal to 0
## 95 percent confidence interval:
##  0.006540119 0.131136535
## sample estimates:
##   mean in group left mean in group stayed 
##             3.855503             3.786664

We reject the Ho because the p-value is less than alpha (.001) meaning that there is a significant difference in the number of projects handled by employees who stayed vs. those who left

Employees who left tended to be assigned more projects, suggesting that heavier workloads may increase turnover.