# How To Use The Z.TEST Function In Google Sheets

What it does – It is used to compare the mean of the sample dataset against the mean of the population dataset

Syntax:
`=Z.TEST(data, value, [standard_deviation])`

`Data` – It refers to the array or range containing the dataset to consider.

`Value` – It refers to the test statistic provided for this Z-test.

`Standard_deviation` – It is an optional argument that refers to the standard deviation to be assumed for the z-test.

Sample usage:
`=Z.TEST(A2:A50, 70, 1.5)`

// It calculates the p-value for a sample dataset in the range of A2:A50 with a population mean of 70 and a standard deviation of 1.5.

Sample Google Sheets template with formula here.

Google Sheets provide us with a diverse range of tools and functionalities to perform statistical analysis on a given dataset. The Z.TEST function in Google Sheets is an important tool to understand the relationship between sample data and the whole dataset.

In this tutorial, we are going to learn how to use the Z.TEST function in Google Sheets. The article comprises of the following sections:

## Requirements of the Z.TEST function

The requirements to be kept in mind before applying the Z.TEST function in Google Sheets are as follows:

• In order to compare your dataset to the test statistic, you first need an array or range that contains the dataset and a test statistic.
• Z.TEST function in Google Sheets returns a p-value, which indicates whether your sample population means are statistically different from the overall population.
• There should be at least 30 samples in a dataset before using the Z.TEST.

## Z.TEST function in Google Sheets

In the following tutorial, we will learn how to implement the Z.TEST function in Google Sheets. We have a dataset comprising the score of 15. Our objective is to use the Z.TEST function in Google Sheets to find the p-value. This will help us find the probability that a randomly generated sample of same size has mean value greater than that of the original dataset.

In order to calculate the Mean value, type in the following formula:

``=AVERAGE(A4:A18, 15)``

In order to calculate the Standard deviation value, type in the following formula:

``=STDEV(A4:A18)``

We have the required values to proceed with the implementation of the Z.TEST function in Google Sheets

The step-by-step procedure is as follows:

• Select the empty cell next to the Z-Test cell
• Begin your function with the ‘=’ sign. Type in the ‘Z.TEST’. The Google Sheets will prompt this function, press the Tab/Enter key to autocomplete. The tooltip guide will appear along with the details.
• Enter the range of data as the first parameter. In this case, it is A4:A18
• Enter the address of the population mean as the second parameter. In this case, it is C4
• Enter the address of the standard deviation of the population as the third parameter. In this case, it is C5. The final formula should look like this:
``=Z.TEST(A4:A18, C4, C5)``
• Press the Enter key and it will display the Z-test value

The Z-test value indicates that the probability of a randomly generated sample of same size having a mean value greater than 58 (mean of the original dataset) is about 30 percent.

Conclusion

We have learned how to implement the Z-test using the Z.TEST function in Google Sheets. Along with this, we have also understood how the Z-test value is useful in calculating the probability of a randomly generated sample having higher mean value compared to that of the original dataset . You are now all set to use this tool to your advantage.

### What is the difference between z and t-test?

A z-test, like a t-test, is a form of hypothesis testing. Where a t-test looks at two sets of data that are different from each other — with no standard deviation or variance — a z-test views the averages of data sets that are different from each other but have the standard deviation or variance given.

### When would you use a one-sample z-test?

The one-sample Z test is used when we want to know whether our sample comes from a particular population.

### Where do we use the t-test and z-test?

Generally, z-tests are used when we have large sample sizes (n > 30), whereas t-tests are most helpful with a smaller sample size (n < 30). Both methods assume a normal distribution of the data, but the z-tests are most useful when the standard deviation is known.