Q1

library(moments)
library(readxl)
Q1 <- read_excel("/Users/juliaye/Downloads/Exam1Q1.xlsx")

plot(density(Q1$Highschool))

plot(density(Q1$BS))

agostino.test(Q1$Highschool)
## 
##  D'Agostino skewness test
## 
## data:  Q1$Highschool
## skew = -0.24041, z = -0.69269, p-value = 0.4885
## alternative hypothesis: data have a skewness
agostino.test(Q1$BS)
## 
##  D'Agostino skewness test
## 
## data:  Q1$BS
## skew = -0.37545, z = -1.06900, p-value = 0.285
## alternative hypothesis: data have a skewness
#anscombe.test(Q1$Highschool)
#anscombe.test(Q1$BS)

t.test(Q1$Highschool, Q1$BS, var.equal = TRUE)
## 
##  Two Sample t-test
## 
## data:  Q1$Highschool and Q1$BS
## t = -10.812, df = 76, p-value < 2.2e-16
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -13.326942  -9.180751
## sample estimates:
## mean of x mean of y 
##  39.51282  50.76667

This dataset has two variables, which are High School annual earnings and BS annual earnings. I plot the earnings for both BS and high school, and find that skewness for high school is -0.24, and skewness for BS is -0.38. The T test indicates that high school diploma average earning is around 39.51, and for bacherlor diploma average earning is 50.76. The study shows that earnings are varied with different diploma.