cps <- read.table("http://s3.amazonaws.com/assets.datacamp.com/production/course_1276/datasets/cps_ch3.csv", header = T, sep = ";")
# Calcular la estadÃstica t a mano y asignarla al termostato
# Usa tstat para aceptar o rechazar la nula
# Calcular la estadÃstica t a mano y asignarla al termostato
tstat <- (mean(cps$ahe12)-23.5)/(sd(cps$ahe12)/sqrt(length(cps$ahe12)))
# Usa tstat para aceptar o rechazar la nula
tstat > qnorm(0.95)
test_object("tstat")
test_or({
test_function_result("qnorm")
},{
test_student_typed("1-pnorm(tstat)")
},{
test_student_typed("pnorm(tstat, lower.tail = F)")
})
test_or(test_output_contains("T"), test_output_contains("F"))