R Markdown
## spc_tbl_ [14,999 × 10] (S3: spec_tbl_df/tbl_df/tbl/data.frame)
## $ satisfaction_level : num [1:14999] 0.38 0.8 0.11 0.72 0.37 0.41 0.1 0.92 0.89 0.42 ...
## $ last_evaluation : num [1:14999] 0.53 0.86 0.88 0.87 0.52 0.5 0.77 0.85 1 0.53 ...
## $ number_project : num [1:14999] 2 5 7 5 2 2 6 5 5 2 ...
## $ average_montly_hours : num [1:14999] 157 262 272 223 159 153 247 259 224 142 ...
## $ time_spend_company : num [1:14999] 3 6 4 5 3 3 4 5 5 3 ...
## $ Work_accident : num [1:14999] 0 0 0 0 0 0 0 0 0 0 ...
## $ left : num [1:14999] 1 1 1 1 1 1 1 1 1 1 ...
## $ promotion_last_5years: num [1:14999] 0 0 0 0 0 0 0 0 0 0 ...
## $ Department : chr [1:14999] "sales" "sales" "sales" "sales" ...
## $ salary : chr [1:14999] "low" "medium" "medium" "low" ...
## - attr(*, "spec")=
## .. cols(
## .. satisfaction_level = col_double(),
## .. last_evaluation = col_double(),
## .. number_project = col_double(),
## .. average_montly_hours = col_double(),
## .. time_spend_company = col_double(),
## .. Work_accident = col_double(),
## .. left = col_double(),
## .. promotion_last_5years = col_double(),
## .. Department = col_character(),
## .. salary = col_character()
## .. )
## - attr(*, "problems")=<externalptr>
1. T-Test 1: Satisfaction Level vs. Attrition
##
## 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
p-value interpretation: The p-value is very small, therefore the
difference between means of satisfaction level by employee attrition is
significant.
t-test interpretation: The difference in mean satisfaction level
between employees who left and those who stayed is significant, where
employees with lower satisfaction levels had higher attrition
rates.
non-technical interpretation: Employees who were less satisfied had
a higher attrition rate.
2. T-Test 2: Last Evaluation vs. Attrition
##
## Welch Two Sample t-test
##
## data: hr$last_evaluation by hr$left
## t = -0.72534, df = 5154.9, p-value = 0.4683
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
## -0.009772224 0.004493874
## sample estimates:
## mean in group 0 mean in group 1
## 0.7154734 0.7181126
p-value interpretation: The p-value is greater than 0.1, therefore
the difference between means of last evaluation by employee attrition is
not significant.
t-test interpretation: The difference in mean last evaluation score
between employees who left and those who stayed is not statistically
significant, meaning last evaluation scores do not appear to be related
to attrition rate.
p-value interpretation: The p-value is less than 0.1, therefore the
difference between means of average monthly hours by employee attrition
is significant.
t-test interpretation: The difference in mean monthly hours between
employees who left and those who stayed is significant, where working
more hours is associated with a higher attrition rate.
non-technical interpretation: Employees who worked more hours per
month had a higher attrition rate.
4. T-Test 4: Time Spent at Company vs. Attrition
##
## Welch Two Sample t-test
##
## data: hr$time_spend_company by hr$left
## t = -22.631, df = 9625.6, 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.5394767 -0.4534706
## sample estimates:
## mean in group 0 mean in group 1
## 3.380032 3.876505
p-value interpretation: The p-value is less than 0.1, therefore the
difference between means of time spent at company by employee attrition
is significant.
t-test interpretation: The difference in mean tenure between
employees who left and those who stayed is significant, where longer
time at the company is associated with a higher attrition rate.
non-technical interpretation: Employees who had been at the company
longer had a higher attrition rate.