Statistical

Z.TEST Formula

Returns the one-tailed p-value of a z-test, testing whether the sample mean is significantly different from a hypothesized population mean. It is used when you have a sample and want to assess if it could have come from a population with a specific mean, optionally using a known population standard deviation.

Syntax

Z.TEST(array, x, [sigma])
ParameterDescription
array Parameter of the Z.TEST function.
x Parameter of the Z.TEST function.
[sigma] (Optional.) Parameter of the Z.TEST function.
Try Z.TEST in Viztab — free, no signup

Examples

Testing if batch average meets spec

Formula
=Z.TEST(A2:A31, 50)
Returns the one-tailed p-value testing whether the 30 measurements in A2:A31 come from a population with mean 50. Uses the sample standard deviation since sigma is omitted.

With known population std dev

Formula
=Z.TEST(B2:B51, 100, 15)
Returns the one-tailed p-value testing if the 50 values in column B come from a population with mean 100 and known standard deviation 15.

Two-tailed z-test

Formula
=2*MIN(Z.TEST(C2:C41, 200), 1-Z.TEST(C2:C41, 200))
Converts the one-tailed result to a two-tailed p-value by doubling the smaller tail probability.

Common Errors

#N/A

Returned if the array is empty or contains no numeric values.

#VALUE!

Occurs if x (the hypothesized mean) is non-numeric.

Tips

One-tailed by default

Z.TEST returns a one-tailed p-value (the probability that the sample mean is greater than or equal to what was observed). For a two-tailed test, use =2*MIN(Z.TEST(...), 1-Z.TEST(...)).

Sigma is optional

If you omit the third argument, the sample standard deviation is used. Only specify sigma when you know the true population standard deviation.

Z-test vs t-test

Z.TEST is appropriate when the population standard deviation is known or the sample size is large (n > 30). For small samples with unknown sigma, use T.TEST instead.

Try Z.TEST in Viztab

Import your data and use Z.TEST with 370+ other formulas. No signup required.

Open Viztab

Related Formulas