cor.test(hr$satisfaction_level, hr$last_evaluation)
##
## Pearson's product-moment correlation
##
## data: hr$satisfaction_level and hr$last_evaluation
## 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
The correlation between satisfaction level and Evaluation level is weak meaning their is a minimal relationship between the two variables. The correlation score of 0.1050212 falls between the estimated range of +0.1 to +0.3 as established in the correlation coefficient schedule.
Since correlation score is positive, both variables are increasing in the same direction creating a slightly fluctuated trend line.
library(ggplot2)
ggplot(hr, aes(x = satisfaction_level, y = last_evaluation)) +
geom_point() +
geom_smooth(method = "lm", se = FALSE, color = "red") +
labs(title = "Higher Satisfaction level, Higher Evaluation Score",
x = "Satisfaction Level",
y = "Evaluation")
## `geom_smooth()` using formula = 'y ~ x'