The ztest is a hypothesis test used to test the mean against a specified value. The ztest is used where the standard deviation is known or the sample is large (greater than about 30). The population must also conform to a normal distribution. The hypothesis is:
H_{0} the population mean equals a specified value
H_{1} the popular mean is [equal to/less than/greater than] a specified value
The test is:
where:

sample mean 
μ _{0} 
specified value 
s 
sample standard deviation 
n 
sample size 
The pvalue can be obtained from Excel using the function:
onetail test: = 1  NORMSDIST(Z_{0})
twotail test: = (1  NORMSDIST(Z_{0}))/2
Alternatively the critical values of the z statistic can be found from tables. For a one sided test:
α 
0.10

0.05

0.025

0.01

Z_{α} 
1.28

1.64

1.96

2.33

For samples less than 30 use the ttest.
