Perform a correlation with HR data set: Satisfation level and Evaluation level

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

Interpreting the Results from the Correlation in technical terms

Interpreting the Results from the Correlation in non-technical

Visualize the correlation between: Satisfaction level and Evaluation level

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'