Google Sheets ZTEST Function: Syntax, Examples & Tips

The ZTEST function calculates the z-score for a sample mean, comparing it to a population mean, useful for hypothesis testing.
Google Sheets
ZTEST(data, value, [standard_deviation])

One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.

On this page
  1. Parameters
  2. What is a ZTEST?
  3. A Practical Example
  4. ZTEST Formula
  5. Result of the Formula
  6. Why Use ZTEST?
  7. Key Takeaways:
  8. Example use case

Parameters

data:
The range of cells containing the sample data for which you want to perform the Z-test.

value:
The hypothesized population mean that you want to test against the sample data.

standard_deviation:
(Optional) The standard deviation of the population. If omitted, the standard deviation is calculated from the sample data.

What is a ZTEST?

The ZTEST function in Google Sheets is a statistical tool used to determine whether the mean of a sample is significantly different from a known population mean. It performs a one-sample Z-test, which is particularly useful when the population standard deviation is known and the sample size is large (typically n > 30). This function helps in hypothesis testing by providing a Z-score that indicates how many standard deviations the sample mean is from the population mean.

In simpler terms, ZTEST allows you to assess if the average of your sample data significantly deviates from a known average, helping you make informed decisions based on statistical evidence.

A Practical Example

Imagine you are analyzing the test scores of students in a class and want to see if their average score is significantly different from the national average score:

Sample Data:

StudentIDTestScore
185
290
378
488
592

Known Population Mean:

  • National Average Test Score: 80

ZTEST Formula

To determine if the average test score of your sample is significantly different from the national average, you would use the ZTEST function as follows:

Google Sheets
=ZTEST(A2:A6, 80, STDEV(A2:A6), COUNT(A2:A6))

In this formula:

  • A2:A6 is the range containing the TestScores of the sample.
  • 80 is the known population mean (national average).
  • STDEV(A2:A6) calculates the standard deviation of the sample scores.
  • COUNT(A2:A6) counts the number of scores in the sample.

Result of the Formula

When you apply the ZTEST formula to the sample data, it will return a Z-score that indicates how many standard deviations the sample mean is from the population mean. A Z-score greater than 1.96 or less than -1.96 typically indicates a statistically significant difference at the 0.05 significance level.

Why Use ZTEST?

ZTEST is beneficial because it provides a straightforward way to conduct hypothesis testing when you have a large sample size and know the population standard deviation. It helps in making data-driven decisions by allowing you to assess the significance of your findings. Additionally, it is a key component in various fields such as education, healthcare, and market research where statistical analysis is crucial.

Key Takeaways:

  • ZTEST: A statistical function that tests if a sample mean is significantly different from a known population mean.
  • Large Sample Size: Best used when the sample size is large (n > 30) and the population standard deviation is known.
  • Hypothesis Testing: A valuable tool for making informed decisions based on statistical evidence.
  • Common Use Cases: Ideal for educational assessments, quality control, and any scenario where comparing sample means to population means is necessary.

ZTEST is an essential function for anyone working with data analysis in Google Sheets, providing a powerful way to enhance statistical evaluation and reporting capabilities.

Happy analyzing!

Example use case

You have a dataset of test scores in Column A and their corresponding grades in Column B. You can use ZTEST to determine if the average score of a new sample significantly differs from the established average, aiding in performance analysis.

Need more help with Google Sheets formulas?

Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.

Explore all Google Sheets formulas

Browse our complete library of Google Sheets formula guides

Compare your options

Decide with evidence, not a sales pitch.

Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.

  1. 01ChatGPTOpen a balanced comparison prompt in ChatGPT.
  2. 02ClaudeOpen the same research prompt in Claude.
  3. 03PerplexityResearch the comparison with linked web sources.

AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.