1. Scatterplot
ggscatter(
  data = age,
  x = "age",
  y = "education",
  add = "reg.line",
  xlab = "Age",
  ylab = "Education"
)

  1. Scatterplot interpretation

The relationship is linear. The relationship is positive. The relationship is moderate. There are no obvious extreme outliers.

  1. Descriptive Stats
mean(age$age)
## [1] 35.32634
sd(age$age)
## [1] 11.45344
median(age$age)
## [1] 35.79811
mean(age$education)
## [1] 13.82705
sd(age$education)
## [1] 2.595901
median(age$education)
## [1] 14.02915
  1. Histogram
  hist(age$age,
       main = "Age",
       breaks = 20,
       col = "lightblue",
       border = "white",
       cex.main = 1,
       cex.axis = 1,
       cex.lab = 1)

  hist(age$education,
       main = "Education",
       breaks = 20,
       col = "lightcoral",
       border = "white",
       cex.main = 1,
       cex.axis = 1,
       cex.lab = 1)

5.Histogram Interpretation

Variable 1: Age The first variable appears normally distributed. The data is symmetrical. The data has a proper bell curve.

Variable 2: USD The second variable appears normally distributed. The data is symmetrical. The data has a proper bell curve.

  1. Shapiro Test for Normality
  shapiro.test(age$age)
## 
##  Shapiro-Wilk normality test
## 
## data:  age$age
## W = 0.99194, p-value = 0.5581
  shapiro.test(age$education)
## 
##  Shapiro-Wilk normality test
## 
## data:  age$education
## W = 0.9908, p-value = 0.4385
  1. Interpret Shapiro Test

Variable 1: Age The first variable is normally distributed (p = .55).

Variable 2: USD The second variable is normally distributed (p = .437).

  1. Pearson correalation test
cor.test(age$age, age$education, method = "pearson")
## 
##  Pearson's product-moment correlation
## 
## data:  age$age and age$education
## t = 7.4066, df = 148, p-value = 9.113e-12
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.3924728 0.6279534
## sample estimates:
##       cor 
## 0.5200256

Results

A Pearson correaltion was conducted to test the raltionship between Variable 1 (M = 35.32 , SD = 0= 11.45 ) and Variable 2 (M = 13.82 , SD = 2.56). There was a statisticall signficant realtionship between the two variables, r (df) =.52, p= .001) The relationship was positive and strong.