R Markdown

1. Correlation between Satisfaction Level and Last Evaluation

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

P-value interpretation: The p-value is very small, therefore the correlation between Satisfaction levels and last evaluations is significant.

Correlation estimate interpretation: The correlation is positive and small

Non-technical interpretation: Increase in Satifaction level, slight increase in Last evaluations

library(ggplot2)

ggplot(hr, aes(x = satisfaction_level , y =last_evaluation )) +
  geom_point() +
  geom_smooth(method = "lm", se = FALSE, color = "red") +
  labs(title = "Increase in Satisfaction level, Slight increase in Last Evaluation",
       x = "Satisfaction Level",
       y = "Last Evaluation")
## `geom_smooth()` using formula = 'y ~ x'