s <- c(154,154,186,243,159,174,183,163,192,181)s_mean <- mean(s) #표본평균s_s <- sd(s) #표본표준편차s_n <- length(s) #표본크기mu0 <- 160 #귀무가설의 평균t_test <- (s_mean-mu0)/(s_s/sqrt(s_n)) #t-검정 통계량 alpha <- 0.05 #유의수준 t.test(s, mu=160, alternative="greater")
Standard input is empty
One Sample t-test data: s t = 2.2653, df = 9, p-value = 0.02487 alternative hypothesis: true mean is greater than 160 95 percent confidence interval: 163.6059 Inf sample estimates: mean of x 178.9
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!