Z.TEST
Returns the one-tailed p-value of a z-test against hypothesized mean x.
Z.TEST evaluates whether the sample mean is significantly greater than the target value.
The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.
Syntax
=Z.TEST(array, x, [sigma])
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
array | number (range) | Required | — |
x | number | Required | — |
sigma | number | Optional | — |
Remarks
- Uses provided
sigmawhen supplied; otherwise uses the sample standard deviation (STDEV.S), as Excel does.
Error cases
- Returns
#NUM!whensigma <= 0. - Returns
#DIV/0!whensigmais omitted and there are fewer than two values or the sample standard deviation is zero. - Returns
#N/Awhen the data array has no numeric values.
Examples
Use the sample spread to find the one-tailed z-test probability.
Formula =Z.TEST({8,10,12,14,16},10)
Expected result 0.0786496035251426
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Supply the population standard deviation explicitly.
Formula =Z.TEST({8,10,12,14,16},10,3)
Expected result 0.0680185640570718
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Compare the sample with a hypothesized mean equal to its observed mean.
Formula =Z.TEST({8,10,12,14,16},12,3)
Expected result 0.5
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
A population standard deviation of zero cannot be used for the test.
Formula =Z.TEST({8,10,12,14,16},10,0)
Expected result #NUM!
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Z-test with provided sigma
Formula =Z.TEST({1,2,3,4,5},2,1)
Expected result 0.0126736593387341
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Z-test with sigma estimated from sample
Formula =Z.TEST({1,2,3,4,5},2)
Expected result 0.0786496035251426
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.