z-test
# This is a sample from a population with known standard deviation
x <- rnorm(12, mean=0, sd=2)
BSDA::z.test(x, mu = 1, sigma.x = 2, conf.level = 0.95)
##
## One-sample z-Test
##
## data: x
## z = -1.6353, p-value = 0.102
## alternative hypothesis: true mean is not equal to 1
## 95 percent confidence interval:
## -1.075717 1.187454
## sample estimates:
## mean of x
## 0.0558687
July 20, 2023Less than 1 minute