# Documentation/Calc Functions/ZTEST

ZTEST

## Category:

Statistical Analysis

## Summary:

Calculates the probability of observing a z-statistic greater than the one computed based on a sample. The function gives the one-tailed probability-value of a z-test. This is the probability of observing a sample mean as large or larger than the mean of the given sample for samples drawn from a normal distribution.

## Syntax:

ZTEST(Data; mu[;Sigma])

## Returns:

Returns a real number which is the one-tailed probability value of a z-test for data sample Data, mean value mu and standard deviation as Sigma. It ranges from 0 to 1, i.e. [0,1].

## Arguments:

Data is an array or a reference to a range of cells which is the given sample, drawn from a normally distributed population.

mu is a real number or a reference to the cell containing that number which is the known mean of the population.

Sigma is a positive real number or a reference to the cell containing that number which is the known standard deviation of the population. If omitted, the standard deviation of the given sample is used.

• If Sigma is negative or zero then the function returns an error value.

• ZTEST can also be related to NORMSDIST as :

ZTEST(Data,mu) = 1 - NORMSDIST((Average(Data)-mu)/(sigma/ √n))

or for the case where sigma is omitted and s is the standard deviation of the Data:

ZTEST(Data,mu) = 1 - NORMSDIST((Average(Data)-mu)/(s/√n))

• With sample being the mean of Data and

The formula for ZTEST is:

• For more details on z-test, visit Wikipedia.

## Examples:

Formula Description Returns
=ZTEST(A1:A7;8) where A1:A7 contains 5,5.9,4.1,7.3,2.8,1.2,6 The function calculates the one-tailed probability value of a z-test for data sample. Here Sigma is not mentioned hence standard deviation of the data is used. 0.999991103497123
=ZTEST(A1:A7;8;10) where A1:A7 contains 5,5.9,4.1,7.3,2.8,1.2,6 The function calculates the one-tailed probability value of a z-test for data sample. 0.814813741690979
=ZTEST(A1:A7;8;0) where A1:A7 contains 5,5.9,4.1,7.3,2.8,1.2,6 The function returns an error value for Sigma less than equal to zero. Err:502

Z.TEST

TTEST

FTEST

NORMDIST

NORMSDIST

AVERAGE

## ODF standard:

Section 6.18.87, part 2

ZTEST