# Documentation/Calc Functions/Z.TEST

TDF LibreOffice Document Liberation Project Community Blogs Weblate Nextcloud Redmine Ask LibreOffice Donate

## Function name:

Z.TEST

## Category:

Statistical Analysis

## Summary:

Calculates the one-tailed cumulative 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:

Z.TEST(**Data**; **mu**[;**Sigma**])

## Returns:

Returns a real number which is the one-tailed cumulative 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. - If
**mu**or**Sigma**is not a real number then the function returns a #VALUE! error.

## Additional details:

- It is such that Z.TEST(Data,mu) = 1 - NORM.S.DIST((Average(Data)-mu)/(sigma/√n), TRUE()) or for the case where sigma is omitted and s is the standard deviation of the Data, Z.TEST(Data,mu) = 1 - NORM.S.DIST((Average(Data)-mu)/(s/√n), TRUE())
- With sample being the mean of Data and

The formula for Z.TEST is:

- For more details on Z-test, visit Wikipedia.

## Examples:

Formula | Description | Returns |
---|---|---|

=Z.TEST(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 cumulative probability value of a Z-test for data sample. Here Sigma is not mentioned hence standard deviation of the data is used. |
0.999991103497123 |

=Z.TEST(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 cumulative probability value of a Z-test for data sample. | 0.814813741690979 |

=Z.TEST({5;-5.9;4.1;-7.3;2.8;1.2;0};8;10) | The function calculates the one-tailed cumulative probability value of a Z-test for data sample. | 0.983013023242316 |

=Z.TEST(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 |

## Related LibreOffice functions:

## ODF standard:

None

## Equivalent Excel functions:

Z.TEST