Correlation 1: Average Monthly Hours vs Satisfaction Level
cor.test(hr$average_montly_hours, hr$satisfaction_level)
##
## Pearson's product-moment correlation
##
## data: hr$average_montly_hours and hr$satisfaction_level
## t = -2.4556, df = 14997, p-value = 0.01408
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.036040356 -0.004045605
## sample estimates:
## cor
## -0.02004811
- p-value interpretation: The p-value is small, but not small enough
for the correlation between average monthly hours and satisfaction
levels to be significant (< 0.001)
- correlation estimate interpretation: There is no correlation
interpretation because it is not a significant relationship
- non-technical interpretation: Satisfaction level is not affected by
the number of average monthly hours worked
ggplot(hr, aes(x = average_montly_hours, y = satisfaction_level)) +
geom_point() +
geom_smooth(method = "lm", se = FALSE, color = "red") +
labs(title = "Satisfaction level is not affected by the number of average monthly hours worked",
x = "Average Monthly Hours",
y = "Satisfaction Level")

Correlation 2: Last Evaluation vs Satisfaction Level
cor.test(hr$last_evaluation, hr$satisfaction_level)
##
## Pearson's product-moment correlation
##
## data: hr$last_evaluation and hr$satisfaction_level
## t = 12.933, df = 14997, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.08916727 0.12082195
## sample estimates:
## cor
## 0.1050212
- p-value interpretation: The p-value is very small (< 0.001),
therefore the correlation between Last Evaluation and Satisfaction Level
is significant
- correlation estimate interpretation: The correlation is positive and
very weak (0.1)
- non-technical interpretation: Better last evaluation scores increase
employee satisfaction levels
ggplot(hr, aes(x = last_evaluation, y = satisfaction_level)) +
geom_point() +
geom_smooth(method = "lm", se = FALSE, color = "red") +
labs(title = "Better last evaluation scores increase employee satisfaction levels",
x = "Last Evaluation",
y = "Satisfaction Level")

Correlation 3: Number of Projects vs Average Monthly Hours
cor.test(hr$number_project, hr$average_montly_hours)
##
## Pearson's product-moment correlation
##
## data: hr$number_project and hr$average_montly_hours
## t = 56.219, df = 14997, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.4039037 0.4303411
## sample estimates:
## cor
## 0.4172106
- p-value interpretation: The p-value is very small (< 0.001),
therefore the correlation between number of projects and average monthly
hours worked is significant
- correlation estimate interpretation: The correlation is positive and
moderately strong (0.4)
- non-technical interpretation: More projects typically mean employees
work longer average monthly hours
ggplot(hr, aes(x = number_project, y = average_montly_hours)) +
geom_point() +
geom_smooth(method = "lm", se = FALSE, color = "red") +
labs(title = "More projects typically mean employees work longer average monthly hours",
x = "Number of Projects",
y = "Average Monthly Hours")

Correlation 4: Number of Projects vs Time Spent at Company
cor.test(hr$number_project, hr$time_spend_company)
##
## Pearson's product-moment correlation
##
## data: hr$number_project and hr$time_spend_company
## t = 24.579, df = 14997, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.1813532 0.2121217
## sample estimates:
## cor
## 0.1967859
- p-value interpretation: The p-value is very small (< 0.001),
therefore the correlation between number of projects and average monthly
hours worked is significant
- correlation estimate interpretation: The correlation is positive and
weak (0.2)
- non-technical interpretation: Employees with fewer projects tend to
stay at company slightly longer
ggplot(hr, aes(x = number_project, y = time_spend_company)) +
geom_point() +
geom_smooth(method = "lm", se = FALSE, color = "red") +
labs(title = "Employees with fewer projects tend to stay at company slightly longer",
x = "Number of Projects",
y = "Time Spend at Company")
