# A school has a gifted/honors program that they claim is
# significantly better than others in the country. The gifted/honors
# students in this school scored an average of 1370 on the SAT,
# with a standard deviation of 112.7, while the national average
# for gifted programs is a SAT score of 1080.
gift <- t.test(singt_data$SATscore, mu = 1080, alternative = "two.sided")
# Direct entry of t-statistic and sample size:
d_single_t_t(9.968, 15, .05)
# Equivalent shorthand:
d_single_t_t(9.968, 15, .05)
# Using values from a t-test object and dataset:
d_single_t_t(gift$statistic, length(singt_data$SATscore), .05)
Run the code above in your browser using DataLab