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
P-value interpretation: The p-value is extremely small (5.907e-14), which is far less than the common significance threshold of 0.05. This indicates there is no difference in average monthly hours worked between employees who stayed and those who left. In that case, we can conclude that the difference in average monthly hours is statistically significant.
T-test interpretation: With a high t-value of 7.5323, the results show a significant difference between the means of average monthly hours worked by employees who stayed and those who left. This suggests that the employees who left the company worked more hours on average than those who stayed, indicating a substantial difference in their monthly hours.
Non-technical Summary: There is a noticeable difference in monthly working hours between employees who stayed at the company and those who left.Employees who left tended to work more hours than those who remained
plot_ly(
hr1,
x = ~Employee_Status,
y = ~average_montly_hours,
type = 'box',
color = ~Employee_Status,
colors = c('red', 'blue')
) %>%
layout(
title = "Distribution of Monthly Hours by Employee Status",
xaxis = list(title = "Employee Status"),
yaxis = list(title = "Average Monthly Hours")
)
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
P-value Interpretation:With a p-value of less than 2.2e-16, this result indicates strong differences in satisfaction levels between employees who stayed and those who left. The very low p-value suggests that we can reject the zero theory, meaning there is no difference between the two groups.
T-test:The t-value of -46.636 shows a large difference in the mean satisfaction levels between employees who left and those who stayed. This high value implies that the means of the two groups are not only different but also that the difference is significant.
Non-technical:There is a clear and significant difference in the satisfaction levels of employees who stayed at the company compared to those who left, with employees who left generally reporting lower satisfaction.
plot_ly(
hr1,
x = ~Employee_Status,
y = ~satisfaction_level,
type = 'box',
color = ~Employee_Status,
colors = c('red', 'blue')
) %>%
layout(
title = "Satisfaction level based on Employee Status",
xaxis = list(title = "Employee Status"),
yaxis = list(title = "Satisfaction Level")
)
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
P-Value Interpretation: With a p-value of 0.03034, there is strong evidence to suggest that there is a significant difference in the mean number of projects based on employee status. This p-value indicates that there is a low chance of randomly observing such a difference, allowing us to conclude that the differences are meaningful.
T-test Interpretation: The results indicate that while the mean number of projects for employees who stayed and those who left are relatively close, the t-value suggests that there is a statistically significant difference between the two groups. This means that there is an relationship between the number of projects assigned and employee turnover rates.
Non-technical Interpretation: Employees who left the company were given more projects on average than those who stayed. This increased workload could be a reason why some employees decided to leave.
plot_ly(
hr1,
x = ~Employee_Status,
y = ~number_project,
type = 'box',
color = ~Employee_Status,
colors = c('red', 'blue')
) %>%
layout(
title = "Number of projects based on Employee Status",
xaxis = list(title = "Employee Status"),
yaxis = list(title = "Number of Projects")
)
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
P-value interpretation: The p-value of 0.4683 indicates that there is no statistical difference between the evaluation levels of employees who stayed and those who left. Since the p-value exceeds the standard significance level of 0.05, we do not have enough evidence to suggest any meaningful difference in evaluation scores between the two groups.
T-test Interpretation: With nearly identical means for both groups, the t-test results show that there is no significant difference between the evaluation levels of employees who stayed and those who left. This means that evaluation scores do not relate with whether employees choose to stay with or leave the company.
Non-technical Interpretation: There is no relationship between evaluation levels and whether employees choose to leave or stay at the company. Essentially, employee turnover does not appear to be affected by their evaluation scores.
plot_ly(
hr1,
x = ~Employee_Status,
y = ~last_evaluation,
type = 'box',
color = ~Employee_Status,
colors = c('red', 'blue')
) %>%
layout(
title = "Evaluation based on Evaluation level",
xaxis = list(title = "Employee Status"),
yaxis = list(title = "Evaluation Level")
)