z.test: Z-Test.

View source: R/z.test.R

z.testR Documentation

Z-Test.

Description

Perform z-test

Usage

z.test(x, mu, sigma, n = length(x), conf.level = 0.95)

Arguments

x

a vector of data values, or the mean of data values.

mu

the null hypothesis true mean.

sigma

the standard deviation of data values in the population.

n

the number of data values.

conf.level

a confidence level that will be used to evaluate a confidence interval.

Value

List containing xbar, z, p, and confint.

Note

Similar to t-test, but assumes that sigma is known without error.

It is wrong to assume that sigma=sqrt(SS/n-1) or sqrt(SS/n), unless x is the complete population.

It also makes no sense to perform a z-test if x is the complete population, since the true mean is known.

Rarely used in statistical inference, unlike the related t.test and wald.test that are commonly used.


arnima-github/arni documentation built on Oct. 28, 2023, 6:18 p.m.