T-Test 1:

Reject the Ho, p-value < 0.01, there is a difference in means, where employees who left had more average monthly hours

Employees that left worked more hours

plot_ly(hr , 
        x = ~left ,
        y = ~average_montly_hours ,
        color = ~left,
        colors = c('#7cb16a' , 'red') ,
        boxmean = T ,
        type = 'box') %>% 
  layout(title = 'Employees that left worked more hours' ,
         xaxis = list(title = 'Employee Status') ,
         yaxis = list(title = 'Monthly Hours') ,
         showlegend = F)

T-Test 2:

Reject the Ho, p-value < 0.01, there is a means, where employees who left had lower satsifaction levels

Employees that left had a lower satisfaction level

plot_ly(hr, 
        x = ~left,
        y = ~satisfaction_level,
        color = ~left,
        colors = c('#7cb16a', 'red'),
        boxmean = T,
        type = 'box') %>%
  layout(title = 'Employees that left had a lower satisfaction level',
         xaxis = list(title = 'Employee Status'),
         yaxis = list(title = 'Satisfaction Level'),
         showlegend = F)

T-Test 3:

Accept the Ho, p-value > 0.01, there is a means, where employees who left had higher evaluation score

Employees that left had a higher evaluation scores

plot_ly(hr,
      x = ~left,
      y= ~last_evaluation,
      color = ~left,
      colors = c('#7cb16a','red'),
      boxmean = T,
      type = 'box') %>%
  layout(title = 'Employees that left had a higher evaluation scores',
         xaxis = list(title = 'Employee Status'),
         yaxis = list(title = 'Evaluation Score'),
         showlegend = F)

T-Test 4:

Reject the Ho, p-value < 0.01, there is a means, where employees who left spent more time spent at the company

Employees that left spent more time at the company

plot_ly(hr,
        x = ~left,
        y = ~time_spend_company,
        color = ~left,
        colors = c('#7cb16a','red'),
        boxmean = T,
        type = 'box') %>%
  layout(title = 'Employees that left spent more time at the company',
         xaxis = list(title = 'Employee Status'),
         yaxis = list(title = 'Years'),
         showlegend = F)