Load libraries
library(readr)
library(ggplot2)
Load data
hr <- read_csv("https://raw.githubusercontent.com/aiplanethub/Datasets/refs/heads/master/HR_comma_sep.csv")
## Rows: 14999 Columns: 10
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (2): Department, salary
## dbl (8): satisfaction_level, last_evaluation, number_project, average_montly...
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
2. Interpret the results in technical terms.For each correlation,
explain what the test’s p-value means (significance).
The p-value is less than 0.05, which means the correlation is
statistically significant. Because the p-value is extremely small,
we reject the null hypothesis and conclude that there is evidence of
a relationship between satisfaction level and last evaluation.
————————————————————————————————————————————-
The correlation coefficient is 0.28, which indicates a positive and
small-to-moderate relationship. This means that as satisfaction
increases, last evaluation scores tend to increase as well, but not
perfectly.
3. Interpret the results in non-technical terms.For each
correlation, what do the results mean in non-techical terms.
Employees who are more satisfied tend to receive better performance
evaluations.In other words, happier employees usually get higher
performance ratings.
4. Create a plot that helps visualize the correlation. For each
correlation, create a graph to
help visualize the realtionship between the two variables. The title
must be the non-technical interpretation.
ggplot(hr, aes(x = last_evaluation, y = satisfaction_level)) +
geom_point(alpha = 0.2) +
geom_smooth(method = "lm", se = FALSE, color = "blue") +
labs(
title = "Last Evaluation Score VS Satisfaction Level",
x = "Last Evaluation Score",
y = "Satisfaction Level"
)
## `geom_smooth()` using formula = 'y ~ x'

Employees who are more satisfied tend to receive better performance
evaluations.
2. Interpret the results in technical terms.For each correlation,
explain what the test’s p-value means (significance).
The p-value is less than 0.05, meaning the correlation is
statistically significant. Because the p-value is extremely small,
we reject the null hypothesis and conclude that there is evidence of
a relationship between number of projects and monthly hours worked.
——————————————————————————————————————————
The correlation coefficient is 0.42, indicating a moderate positive
relationship. This means that employees who have more projects
tend to work more hours per month.
3. Interpret the results in non-technical terms.For each
correlation, what do the results mean in non-techical terms.
Employees with more assigned projects work more hours each
month.
4. Create a plot that helps visualize the correlation. For each
correlation, create a graph to
help visualize the realtionship between the two variables. The title
must be the non-technical interpretation.
ggplot(hr, aes(x = number_project, y = average_montly_hours)) +
geom_point(alpha = 0.2) +
geom_smooth(method = "lm", se = FALSE, color = "blue") +
labs(
title = "Employees with more projects work more monthly hours",
x = "Number of Projects",
y = "Average Monthly Hours"
)
## `geom_smooth()` using formula = 'y ~ x'

Employees with more assigned projects work more hours each
month.
2. Interpret the results in technical terms.For each correlation,
explain what the test’s p-value means (significance).
The p-value is less than 0.05, so the correlation is statistically
significant. Because the p-value is extremely small,
we reject the null hypothesis and conclude that satisfaction level
is related to time spent at the company.
——————————————————————————————————————————
The correlation coefficient is -0.10, which shows a small negative
relationship. This means that as employees stay at the
company longer, their satisfaction tends to decrease slightly.
3. Interpret the results in non-technical terms.For each
correlation, what do the results mean in non-techical terms.
Employees who stay at the company longer tend to be slightly less
satisfied.
4. Create a plot that helps visualize the correlation. For each
correlation, create a graph to
help visualize the realtionship between the two variables. The title
must be the non-technical interpretation.
ggplot(hr, aes(x = time_spend_company, y = satisfaction_level)) +
geom_point(alpha = 0.2) +
geom_smooth(method = "lm", se = FALSE, color = "blue") +
labs(
title = "Employees who stay longer tend to be slightly less satisfied",
x = "Years at Company",
y = "Satisfaction Level"
)
## `geom_smooth()` using formula = 'y ~ x'

Employees who stay at the company longer tend to be slightly less
satisfied.
2. Interpret the results in technical terms.For each correlation,
explain what the test’s p-value means (significance).
The p-value is less than 0.05, indicating the correlation is
statistically significant. The extremely small p-value means
we reject the null hypothesis and conclude that evaluation score is
related to monthly hours worked.
——————————————————————————————————————————
The correlation coefficient is 0.34, which shows a moderate positive
relationship. This means employees with higher evaluation
scores tend to work more hours per month.
3. Interpret the results in non-technical terms.For each
correlation, what do the results mean in non-techical terms.
Employees with higher performance evaluation scores tend to work
more hours.
4. Create a plot that helps visualize the correlation. For each
correlation, create a graph to
help visualize the realtionship between the two variables. The title
must be the non-technical interpretation.
ggplot(hr, aes(x = average_montly_hours, y = last_evaluation)) +
geom_point(alpha = 0.2) +
geom_smooth(method = "lm", se = FALSE, color = "blue") +
labs(
title = "Employees with higher evaluation scores tend to work more hours",
x = "Average Monthly Hours",
y = "Last Evaluation Score"
)
## `geom_smooth()` using formula = 'y ~ x'

Employees who are more satisfied tend to receive better performance
evaluations.