## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.4     ✔ purrr     1.0.4
## ✔ forcats   1.0.0     ✔ stringr   1.5.1
## ✔ ggplot2   3.5.1     ✔ tibble    3.2.1
## ✔ lubridate 1.9.4     ✔ tidyr     1.3.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
## 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.

1. Satisfaction Level vs 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 null hypothesis is there is no correlation
The alternative hypothesis is that there is a correlation

We reject the Ho because the p-value is < .01
The correlation is positive and weak

Non-Technical Interpretation

An increase in the last evaluation will increase satisfaction slightly

## `geom_smooth()` using formula = 'y ~ x'

2. Average Monthly Hours vs. Last Evaluation

## 
##  Pearson's product-moment correlation
## 
## data:  hr$average_montly_hours and hr$last_evaluation
## t = 44.237, df = 14997, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.3255078 0.3538218
## sample estimates:
##       cor 
## 0.3397418

Technical Interpretation

The null hypothesis states that there is no correlation.
The alternative hypothesis suggests that there is a correlation.
We reject the Ho because the p-value is < .01
The correlation is negative and weak

Non-Technical Interpretation

An increase in the number of hours worked will decrease satisfaction slightly

## `geom_smooth()` using formula = 'y ~ x'

3. Time Spent at the Company vs. Number of Projects

## 
##  Pearson's product-moment correlation
## 
## data:  hr$time_spend_company and hr$average_montly_hours
## t = 15.774, df = 14997, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1119801 0.1434654
## sample estimates:
##       cor 
## 0.1277549

Technical Interpretation

We reject the Ho because the p-value is < .01
The correlation is positive and weak

Non-Technical Interpretation

Employees who’ve been at the company longer tend to work slightly more hours each month.

## `geom_smooth()` using formula = 'y ~ x'

4. Satisfaction Level vs. Average Monthly 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

We reject the Ho because the p-value is < .01
The correlation is negative and weak

Non-Technical Interpretation

Employees who work more hours per month tend to have lower satisfaction levels

## `geom_smooth()` using formula = 'y ~ x'