ZTEST Function (OpenOffice Calc)
Apache OpenOffice Calc ZTEST returns a signed upper normal tail for a sample mean, with known-sigma examples, omitted-sigma limits and two-sided conversion.
Verification status: Official release source and independently calculated examples for ZTEST were reviewed. No new Apache OpenOffice Calc application execution is claimed for this guide; the stated version and example limits still apply. How formula examples are checked
Quick answer: For sample 48, 50, 52, 54, 56, a null mean of 50 and known population SD of 4, =ZTEST(A2:A6;50;4) is approximately 0.131776238641. It is the upper-tail probability for the signed standardized mean difference.
Availability and version history
- Introduced: First release not established. The OpenOffice.org 3.3 function appendix documents this name; that establishes historical presence, not its introduction.
- Supported in: Apache OpenOffice 4.1.16; no final supported release established.
- Scope: Desktop Calc. Examples use English function names and semicolon argument separators; the numeric contract is release-specific.
- Checked: October 14, 2026. Retained official sources and independent mathematics checked. No new Apache OpenOffice Calc execution is claimed here.
Syntax and statistical meaning
=ZTEST(Data; mu [; Sigma])
Data and mu are required. mu is the hypothesized population mean, not the sample mean you calculated. Sigma is optional; if supplied, it must be positive and represents a known population standard deviation. Use the same measurement units for mu, Sigma and the sample observations. Release evaluator.
With known Sigma, the statistic is z=(sample mean−mu)×SQRT(n)/Sigma and the result is P(Z≥z). A sample mean above mu produces a result below 0.5; a sample mean below mu produces a result above 0.5. This tail retains direction, unlike simply evaluating a tail at ABS(z).
The exact normal-reference interpretation applies to independent normal observations with the stated known SD. Large-sample approximations need their own justification. ZTEST does not check independence, measurement design or whether Sigma was really known in advance.
Reproducible worksheet
Enter the following values in A2:A6. Their mean is 52, sample size is 5 and sample variance is 10.
| Row | A |
|---|---|
| 2 | 48 |
| 3 | 50 |
| 4 | 52 |
| 5 | 54 |
| 6 | 56 |
These references were computed independently and rounded to twelve decimal places.
| Formula | Expected result, approximately |
|---|---|
=ZTEST(A2:A6;50;4) |
0.131776238641 |
=ZTEST(A2:A6;52;4) |
0.5 |
=ZTEST(A2:A6;54;4) |
0.868223761359 |
=ZTEST(A2:A6;50) |
0.078649603525 |
=ZTEST(A2:A6;52) |
0.5 |
=ZTEST(A2:A6;54) |
0.921350396475 |
=ZTEST(A2:A6;50;2) |
0.012673659339 |
=ZTEST(A2:A6;50;8) |
0.288075061015 |
The first result corresponds to z=SQRT(5)/2, approximately 1.118033988750. Setting mu to 52 produces z=0 and p=0.5. Changing mu to 54 reverses the sign and complements the original upper tail.
Omitted Sigma does not change the reference distribution
When Sigma is absent, the implementation estimates sample variance using n−1, then still evaluates a normal tail. In the example, =ZTEST(A2:A6;50) gives approximately 0.078649603525.
That calculation is not the exact small-normal-sample unknown-SD t test. For the latter, form t=(AVERAGE(A2:A6)−50)/(STDEV(A2:A6)/SQRT(COUNT(A2:A6))) and use the t reference with df=n−1 and the intended signed alternative. Here |t|=SQRT(2), and the two-tail t probability is approximately 0.230199641080; the doubled normal tail is only 0.157299207050.
Advanced lower-tail and two-sided results
For a prechosen lower-tail alternative, use =1-ZTEST(A2:A6;50;4), approximately 0.868223761359. For a two-sided normal-reference test, first put the upper tail in B2, then calculate =2*MIN(B2;1-B2), approximately 0.263552477283.
These formulas change the stated alternative; they do not validate the model. Select the alternative before viewing the observations. For extremely small tails, subtraction from 1 can lose floating-point precision, so compare the calculation method and the precision needed for reporting.
Data and boundary checks
This evaluator requires more than one numeric observation even when Sigma is explicitly supplied; n≤1 has a division-by-zero guard. Referenced text and blank cells should not be counted as measurements. Use COUNT on the same range to make the effective sample size visible.
For constant observations with omitted Sigma, the sample-based standard error is zero. Avoid assigning a numerical p-value to that degenerate case without checking the actual error behavior in this release. Supplied Sigma≤0 is rejected. Never replace missing measurements with zeros or hide an error as a seemingly significant zero p-value.
Official evidence and calculation scope
The numerical references were recomputed independently against the retained release contract. Native application execution, import paths and locale behavior are not newly verified by these reference calculations.