Test for mean of a normal sample with known variance
H = nan_ztest (x, m, sigma,alpha,tail) H = nan_ztest (m1, sigma1, n1,m2, tail,alpha) [H,pval, z, ci] = nan_ztest (...)
input vector
mean value for testing
known variance of x
significance level (default alpha = 0.05)
returns whether the Null-Hypotheses must be rejected.
p-value of the test
confidence internvals (depending on alpha)
Perform a Z-test of the null hypothesis mean (x) == m for a sample x from a normal distribution with unknown mean and known variance sigma. Under the null, the test statistic z follows a standard normal distribution.
With the optional argument string tail, the alternative of interest can be selected. If tail is "~=" or "<>", the null is tested against the two-sided alternative mean (x) != m. If tail is ">", the one-sided alternative mean (x) > m is considered. Similarly for "<", the one-sided alternative mean (x) < m is considered. The default is the two-sided case.