Statistical

ZTEST Formula

Returns the one-tailed p-value of a z-test. This is the legacy compatibility version of Z.TEST. It tests whether a sample mean significantly differs from a specified value, assuming normal distribution of the data.

Syntax

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

Examples

Quality control check

Formula
=ZTEST(A2:A26, 75)
Returns the one-tailed p-value testing if the 25 samples in A2:A26 have a mean significantly greater than 75.

Known standard deviation

Formula
=ZTEST(B2:B101, 500, 50)
Tests whether the 100 observations differ from a population mean of 500, using the known population standard deviation of 50.

Checking if mean is below target

Formula
=1-ZTEST(C2:C51, 80)
Returns the probability that the sample mean is significantly less than 80 (the left-tail p-value).

Common Errors

#N/A

Returned if the array has no numeric values.

#VALUE!

Occurs if the hypothesized mean is non-numeric.

Tips

Migrate to Z.TEST

ZTEST is the compatibility function. Use Z.TEST in new spreadsheets for consistency with the modern function naming convention.

Understanding the output

A value close to 0 means the sample mean is much higher than the hypothesized mean. A value close to 1 means the sample mean is near or below the hypothesized mean.

Minimum sample size

While there is no hard minimum, the z-test assumes normality. For non-normal data, aim for at least 30 observations so the Central Limit Theorem can take effect.

Try ZTEST in Viztab

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

Open Viztab

Related Formulas