Quick Navigation
ZTEST Function
Summary
The ZTEST function performs a one-tailed z-test to determine the probability that the sample mean is greater than a hypothesized population mean. It calculates the p-value associated with a z-statistic for hypothesis testing.
Syntax
ZTEST(array, x, [sigma])
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| array | Number array |
Yes | The array or range of sample data for testing |
| x | Number |
Yes | Hypothesized population mean value |
| sigma | Number |
No | Known population standard deviation (sample std dev used if omitted) |
Using the ZTEST Function
ZTEST is used in statistical hypothesis testing to assess whether a sample mean significantly differs from a hypothesized population mean. It returns the one-tailed p-value, helping researchers and analysts determine statistical significance in their data analysis.
Common ZTEST Examples
Basic One-Tailed Z-Test
=ZTEST(A2:A11,4)
Calculates one-tailed p-value testing if sample mean > 4 (result: 0.090574)
Two-Tailed Z-Test Formula
=2*MIN(ZTEST(A2:A11,4),1-ZTEST(A2:A11,4))
Converts one-tailed result to two-tailed p-value (result: 0.181148)
Test with Hypothesized Mean of 6
=ZTEST(A2:A11,6)
Tests if sample mean > 6 using sample std dev (result: 0.863043)
Frequently Asked Questions
Common Errors and Solutions
#N/A Error
Cause: Empty array or range provided
Solution: Ensure array contains numeric data
#VALUE! Error
Cause: Non-numeric values in array or invalid parameters
Solution: Verify all inputs are numbers
Unexpected p-value > 0.5
Cause: Sample mean less than hypothesized value
Solution: This is normal due to one-tailed test nature
Notes
- Legacy function - consider Z.TEST for improved accuracy
- Returns probability sample mean > observed mean when population mean = x
- If sample mean < x, result > 0.5 due to normal distribution symmetry
- Excel 2007+ compatibility
Compatibility
Available in: Excel 2007, Excel 2010, Excel 2013, Excel 2016, Excel 2019, Excel 2021, Microsoft 365
Not available in: Excel 2003 and earlier
Content last reviewed: December 9, 2025
Update frequency: As needed
Excel versions tested: Excel 2007+