z_test | R Documentation |
This function performs the mean test using summarized data (values).
z_test(
meanx,
nx,
sigma2 = NULL,
alternative = "two.sided",
mu = 0,
conf.level = 0.95
)
meanx |
sample mean for sample x. |
nx |
sample size for sample x. |
sigma2 |
population variance which is known. |
alternative |
a character string specifying the alternative
hypothesis, must be one of |
mu |
the hypothesized number in the null hypothesis. |
conf.level |
confidence level of the interval, by default its value is 0.95. |
A list with class htest
containing the following
components:
statistic |
the value of the statistic. |
p.value |
the p-value for the test. |
conf.int |
a confidence interval for the variance. |
estimate |
the estimated mean. |
null.value |
the specified hypothesized value for alternative hypothesis. |
alternative |
a character string describing the alternative hypothesis. |
method |
a character string indicating the type of test performed. |
data.name |
a character string giving the name of the data. |
# Example 13.1 from Freund et al. (2000)
res1 <- z_test(meanx=8.091, nx=25, mu=8, sigma2=0.16^2, alternative='two.sided')
res1
plot(res1)
# Example 13.2 from Freund et al. (2000)
res2 <- z_test(meanx=21819, nx=100, mu=22000, sigma2=1295^2, alternative='less')
res2
plot(res2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.