运行 ❯
获取
你自己的
网站
×
改变方向
改变主题,黑暗/明亮
进入 Spaces
# Specify the sample mean (x_bar), the sample standard deviation (s), the mean claimed in the null-hypothesis (mu_null), and the sample size (n) x_bar <- 62.1 s <- 13.46 mu_null <- 55 n <- 30 # Calculate the test statistic test_stat = (x_bar - mu_null)/(s/sqrt(n)) # P-value the p-value of the test statistic (right tailed test) 1-pt(test_stat, n-1)
[1] 0.003618278