cps <- read.table("http://s3.amazonaws.com/assets.datacamp.com/production/course_1276/datasets/cps_ch3.csv", header = T, sep = ";") tstat <- (mean(cps$ahe12)-23.5)/(sd(cps$ahe12)/sqrt(length(cps$ahe12))) # compute the p-value by hand and assign it to pval # use pval to accept or reject the null # compute the p-value by hand and assign it to pval pval <- 1-pnorm(tstat) # use pval to accept or reject the null pval < 0.05 test_object("pval") test_or({ test_student_typed("pval <= 0.05") },{ test_student_typed("pval >= 0.05") },{ test_student_typed("pval < 0.05") },{ test_student_typed("pval > 0.05") })