hr <- read_csv('https://raw.githubusercontent.com/aiplanethub/Datasets/refs/heads/master/HR_comma_sep.csv')

Correlation 1: Satisfaction Level vs. Last Evaluation Score

Perform the Correlation

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

Technical Interpretation

The p-value is less than alpha (0.01), which means the correlation between satisfaction_level and last_evaluation is statistically significant. We reject the null hypothesis (H₀) and conclude that there is a positive and small correlation between last evaluation and satisfaction, indicating that as last evaluation scores increase, satisfaction levels increase slightly.

Non-Technical Interpretation

As evaluations increase, satisfaction increases slightly.

Visualization

ggplot(hr, aes(x = satisfaction_level, y = last_evaluation)) +
  geom_point() +
  geom_smooth(method = "lm", se = FALSE, color = "red") +
  labs(title = "As evaluations increase, satisfaction increases slightly.",
       x = "Satisfaction Level",
       y = "Last Evaluation")

Correlation 2: Satisfaction Level vs. Average Monthly Hours

Perform the Correlation

cor.test(hr$satisfaction_level, hr$average_montly_hours)
## 
##  Pearson's product-moment correlation
## 
## data:  hr$satisfaction_level and hr$average_montly_hours
## 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

Technical Interpretation

The p-value is is greater than alpha (0.01), so we fail to reject H₀ and conclude there is no statistically significant correlation between satisfaction level and average monthly hours.

Non-Technical Interpretation

No relationship between satisfaction and monthly hours.

Visualization

ggplot(hr, aes(x = satisfaction_level, y = average_montly_hours)) +
  geom_point() +
  geom_smooth(method = "lm", se = FALSE, color = "red") +
  labs(title = "No relationship between satisfaction and monthly hours.",
       x = "Satisfaction Level",
       y = "Average Monthly Hours")

Correlation 3: Last Evaluation Score vs. Number of Projects

Perform the Correlation

cor.test(hr$last_evaluation, hr$number_project)
## 
##  Pearson's product-moment correlation
## 
## data:  hr$last_evaluation and hr$number_project
## t = 45.656, df = 14997, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.3352028 0.3633053
## sample estimates:
##       cor 
## 0.3493326

Technical Interpretation

The p-value is less than alpha (0.01), so we reject H₀ and conclude there is a statistically significant correlation between last evaluation and number of projects. The correlation is positive and moderate, meaning as the number of projects increases, evaluation scores increase moderately.

Non-Technical Interpretation

More projects, higher performance evaluations.

Visualization

ggplot(hr, aes(x = last_evaluation, y = number_project)) +
  geom_point() +
  geom_smooth(method = "lm", se = FALSE, color = "red") +
  labs(title = "More projects, higher performance evaluations.",
       x = "Last Evaluation",
       y = "Number Project")

Correlation 4: Average Monthly Hours vs. Number of Projects

Perform the Correlation

cor.test(hr$average_montly_hours, hr$number_project)
## 
##  Pearson's product-moment correlation
## 
## data:  hr$average_montly_hours and hr$number_project
## 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

Technical Interpretation

The p-value is less than alpha (0.01), so we reject H₀ and conclude there is a statistically significant correlation between average monthly hours and number of projects. The correlation is positive and moderate, meaning as the number of projects increases, monthly hours worked increase moderately.

Non-Technical Interpretation

More projects, more hours worked.

Visualization

ggplot(hr, aes(x = average_montly_hours, y = number_project)) +
  geom_point() +
  geom_smooth(method = "lm", se = FALSE, color = "red") +
  labs(title = "More projects, more hours worked.",
       x = "Average Monthly Hours",
       y = "Number Project")