Plot 1

- There is a significant difference between means, where employees that left work at least 6 hours more.

- Descriptive: employees that left, on average, work more hours, at least 3% more.

- Prescriptive: To reduce employee attrition, average monthly hours can be reduced by 3%, fir those that work longer hours

t.test(hr1$average_montly_hours ~ hr1$Employee_Status)
## 
##  Welch Two Sample t-test
## 
## data:  hr1$average_montly_hours by hr1$Employee_Status
## 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
plot_ly(hr1 ,
        x = ~Employee_Status ,
        y = ~average_montly_hours , 
        type = 'box',
        color = ~Employee_Status ,
        colors = c('#1a1aff' , '#663300'))%>%
  layout(title = 'employees that left, on average, work more hours, at least 3% more')

Plot 2

- There is not a significant difference between the last evaluation scores of employees who stayed and those who left.

- Descriptive: Employees that left, on average, have higher last evaluation scores, suggesting they may have been high-performing.

- Prescriptive: To reduce employee attrition among high performers, management could focus on understanding and addressing factors that lead to dissatisfaction for employees with high evaluation scores. This may include offering career growth opportunities, increasing recognition, or making adjustments to workloads and project assignments.

 t.test(hr1$last_evaluation ~ hr1$Employee_Status)
## 
##  Welch Two Sample t-test
## 
## data:  hr1$last_evaluation by hr1$Employee_Status
## 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
plot_ly(hr1,
        x = ~Employee_Status,
        y = ~last_evaluation,
        type = 'box',
        color = ~Employee_Status,
        colors = c('#ff6600', '#00cc66')) %>%
  layout(title = 'Employees that left tend to have higher last evaluation scores')

Plot 3

- There is not a significant difference between the number of projects handled by employees who left and those who stayed.

- Descriptive: Employees that left, on average, handle a higher number of projects. This may indicate that a higher project load is associated with employee turnover.

- Prescriptive: To reduce employee attrition, management could consider assessing and balancing project loads for employees. Reducing the number of projects for those with a heavier workload may improve job satisfaction and help retain talent.

t.test(hr1$number_project ~ hr1$Employee_Status)
## 
##  Welch Two Sample t-test
## 
## data:  hr1$number_project by hr1$Employee_Status
## 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
plot_ly(hr1,
        x = ~Employee_Status,
        y = ~number_project,
        type = 'box',
        color = ~Employee_Status,
        colors = c('#cc33ff', '#ffcc00')) %>%
  layout(title = 'Employees that left tend to handle a different number of projects')

Plot 4

- Employees who left had significantly lower satisfaction levels than those who stayed.

- Descriptive: Lower satisfaction levels are strongly linked to employee turnover.

- Prescriptive: To reduce attrition, management could focus on improving job satisfaction.

t.test(hr1$satisfaction_level ~ hr1$Employee_Status)
## 
##  Welch Two Sample t-test
## 
## data:  hr1$satisfaction_level by hr1$Employee_Status
## t = -46.636, df = 5167, p-value < 2.2e-16
## alternative hypothesis: true difference in means between group Left and group Stayed is not equal to 0
## 95 percent confidence interval:
##  -0.2362417 -0.2171815
## sample estimates:
##   mean in group Left mean in group Stayed 
##            0.4400980            0.6668096
plot_ly(hr1,
        x = ~Employee_Status,
        y = ~satisfaction_level,
        type = 'box',
        color = ~Employee_Status,
        colors = c('#0099cc', '#ff6699')) %>%
  layout(title = 'Employees that left tend to have lower job satisfaction levels')