How to use the Z.TEST function in Excel (2024)

How to use the Z.TEST function in Excel (1)

How to use the Z.TEST function in Excel (2)

In this article, we will learn How to use the Z.TEST function in Excel.

What is hypothesis testing and how to use Z -Test for hypothesis testing ?

In statistics, Hypothesis testing is used to find the estimation of mean for the population dataset using the different distribution function based on the part of population dataset named sample dataset. A statistical hypothesis, sometimes called confirmatory data analysis, is a hypothesis that is testable on the basis of observing a process that is modeled via a set of random variables. There are two types of hypothesis. One is null hypothesis which is the claimed statement and other is the alternate hypothesis which is just opposite of the null hypothesis. For example if we say maximum limit to lead in a maggi packet must not exceed 225 ppm (parts per million) and someone claims that there is more than fixed limit than null hypothesis (denoted by U0 ) and the alternate hypothesis (denoted by Ua )

U0 = lead content in maggi packet is more than or equal to 225ppm.

Ua = lead content in maggi packet is less than 225 ppm.

So the above hypothesis is an example of a right-tailed test as the underlying situation lies in the right side of the distribution curve. If the underlying situation lies on the left side then it would be called a left-tailed test. Let's take one more example which illustrates a one-tailed test. For example if selina said she can do 60 push ups on an average. Now you might doubt that statement and try to hypothesize the situation in statistics term then, the null and the alternate hypothesis is stated below

U0 = selina can do 60 pushups

Ua = selina cannot do 60 pushups

This is a two-tailed test where the underlying situation lies on both sides of the claimed statement. These tailed tests affect the outcome of the statistics. So choose the null and alternative hypothesis carefully.

Z - Test

A Z-test is any statistical test for which the distribution of the test statistic under the null hypothesis can be approximated by a normal distribution. Z-test tests the mean of a distribution in which we already know the population variance. Because of the central limit theorem, many test statistics are approximately normally distributed for large samples. The test statistic is assumed to have a normal distribution such as standard deviation should be known in order for an accurate z-test to be performed. For example an investor wishes to test whether the average daily return of a stock is greater than 1% can be evaluated using Z test. A Z-statistic or Z-score is a number representing how many standard deviations above or below the mean population a score derived from a Z-test is. Mathematically first we decide the null hypothesis and calculate the Z score for the distribution using the formula.

How to use the Z.TEST function in Excel (3)

Here

X (with a bar) is the mean of the sample array

U0 is the estimate population mean

s is the standard deviation where s is equal to std/(n)1/2 (where n is sample size).

As stated above Z - test follows standard normal distribution. So mathematically in Excel it follows the following formula.

Z.TEST( array,x,sigma ) = 1- Norm.S.Dist ((Average(array)- x) / (sigma/(n)1/2),TRUE)

or when sigma is omitted:

Z.TEST( array,x ) = 1- Norm.S.Dist ((Average(array)- x) / (STDEV(array)/(n)1/2),TRUE)

where x is the sample mean AVERAGE(array), and n is COUNT(array).

Let's learn how to do the Z test using the Z.TEST function to calculate the relation between the two given datasets (actual and observed).

Z.TEST Function in Excel

The Z.TEST function returns the probability that the sample mean would be greater than the average of observations in the data set (array). The function takes the following arguments.

Z.TEST Function syntax for one tailed probability:

=Z.TEST ( array , x , [sigma] )


The function can also be used to commute two-tailed probability.

Z.TEST Function syntax for one tailed probability:

=2 * MIN(Z.TEST ( array , x , [sigma] ), 1-Z.TEST ( array , x , [sigma] ) )

array : sample data distribution

x : value for which z test is evaluated

[sigma] : [optional] The population (known) standard deviation. If omitted, the sample standard deviation is used.

Example :

All of these might be confusing to understand. Let's understand how to use the function using an example. Here we have a sample dataset Sales and we need to find the Z test probability for the given hypothesized population mean assuming one tailed test.

Use the formula:

= Z.TEST( A2:A9 , C3 )

How to use the Z.TEST function in Excel (4)

The probability value comes in decimal, so you can convert the value to percentage changing the format of the cell to percentage.

How to use the Z.TEST function in Excel (5)

As you can see the probability value for the hypothesized population mean 18 comes out to be 0.012% for the one tailed distribution.

Now calculate the probability assuming two tailed distributions having the same parameters.

Use the formula:

= 2 * MIN( Z.TEST(A2:A9,C4) , 1 - Z.TEST(A2:A9,C4) )

How to use the Z.TEST function in Excel (6)

For the two tailed distribution the probability gets doubled for the same sample dataset. So it's necessary to check the null hypothesis and alternate hypothesis.

Now calculate the probability for the different hypothesized population mean and one tailed distribution.

Use the formula:

= Z.TEST( A2:A9 , C5 )

How to use the Z.TEST function in Excel (7)

As you can see the probability value for the hypothesized population mean 22 comes out to be 95.22% for the one tailed distribution.

Now calculate the probability assuming two tailed distributions having the same parameters.

Use the formula:

= 2 * MIN( Z.TEST(A2:A9,C6) , 1 - Z.TEST(A2:A9,C6) )

How to use the Z.TEST function in Excel (8)

As you can differ from the above snapshot that the probability value gets less when calculating the two tailed distribution. The function returns 9.56% for the hypothesized population mean 22.

Z.TEST represents the probability that the sample mean would be greater than the observed value AVERAGE(array), when the underlying population mean is 0. From the symmetry of the Normal distribution, if AVERAGE(array) < x, Z.TEST will return a value greater than 0.5.

Here are all the observational notes using the Z.TEST function in Excel
Notes :

  1. The function only works with numbers. If population mean or sigma argument is non numeric, the function returns #VALUE! error.
  2. Value in decimal or value in percentage is the same value in Excel. Convert the value to percentage, if required.
  3. The function returns #NUM! Error, if the sigma argument is 0.
  4. The function returns #N/A! Error if the provided array is empty.
  5. The function returns #DIV/0! Error,
    1. If the standard deviation of the array is 0 and sigma argument is omitted.
    2. If the array contains only one value.

Hope this article about How to use the Z.TEST function in Excel is explanatory. Find more articles on statistical formulas and related Excel functions here. If you liked our blogs, share it with your friends on Facebook. And also you can follow us on Twitter and Facebook. We would love to hear from you, do let us know how we can improve, complement or innovate our work and make it better for you. Write to us at info@exceltip.com.

Related Articles :

How To Use Excel T TEST Function in Excel : The T.TEST is used to determine the confidence of an analysis. Mathematically, it is used to know if the mean of the two samples are equal or not. T.TEST is used to accept or reject the null hypothesis.

How to use Excel F.TEST Function in Excel : The F.TEST Function is used to calculate F statistic of two samples in excel internally and returns the two tailed probability of the F statistic under Null Hypothesis.

How to use the DEVSQ Function in Excel : DEVSQ function is a built-in statistical function to calculate the sum of squared deviations from the mean or average of the range of data values provided.

How to use Excel NORM.DIST Function : Calculate the Z score for the normal cumulative distribution for the pre specified values using the NORMDIST function in Excel.

How to use Excel NORM.INV Function : Calculate the inverse of Z score for the normal cumulative distribution for the pre-specified probability values using the NORM.INV function in Excel.

How to Calculate Standard Deviation in Excel : To calculate the standard deviation we have different functions in Excel. The standard deviation is the square root of the variance value but It tells more about the dataset than variance.

How to use the VAR function in Excel : Calculate the variance for the sample dataset in excel using the VAR function in Excel.

Popular Articles :

How to use the IF Function in Excel : The IF statement in Excel checks the condition and returns a specific value if the condition is TRUE or returns another specific value if FALSE.

How to use the VLOOKUP Function in Excel : This is one of the most used and popular functions of excel that is used to lookup value from different ranges and sheets.

How to use the SUMIF Function in Excel : This is another dashboard essential function. This helps you sum up values on specific conditions.

How to use the COUNTIF Function in Excel : Count values with conditions using this amazing function. You don't need to filter your data to count specific values. Countif function is essential to prepare your dashboard.

How to use the Z.TEST function in Excel (2024)

FAQs

How to use the Z.TEST function in Excel? ›

The formula for computing a z-score is =(DataValue-Mean)/StDev. For example, to compute a z- score for the first value in our data set, we use the formula =(A2-$D$2)/$E$2 as Figure 1 illustrates. Notice the dollar signs $ in the formula. These dollar signs are what are known as absolute markers.

How do you use the z-score function in Excel? ›

The formula for computing a z-score is =(DataValue-Mean)/StDev. For example, to compute a z- score for the first value in our data set, we use the formula =(A2-$D$2)/$E$2 as Figure 1 illustrates. Notice the dollar signs $ in the formula. These dollar signs are what are known as absolute markers.

How do you use the z-test formula? ›

The formula for calculating the Z Test statistic is Z = (x̄ - µ) / (σ / √n). Here x̄ is the sample mean, µ is the population mean, σ is the population standard deviation, and n represents the sample size.

How do you use a to Z in Excel? ›

Select a cell in the column you want to sort. On the Data tab, in the Sort & Filter group, do one of the following: To quick sort in ascending order, click. (Sort A to Z).

How to do the z-score formula? ›

The formula for calculating a z-score is z = (x-μ)/σ, where x is the raw score, μ is the population mean, and σ is the population standard deviation. As the formula shows, the z-score is simply the raw score minus the population mean, divided by the population standard deviation. Figure 2.

What is the z-test for dummies? ›

A z-test is a statistical test used to determine whether two population means are different when the variances are known and the sample size is large. It can also be used to compare one mean to a hypothesized value. The data must approximately fit a normal distribution, otherwise the test doesn't work.

When to use the z-test? ›

z -tests are a statistical way of testing a hypothesis, when we know the population variance σ2 . We use them when we wish to compare the sample mean μ to the population mean μ0 .

How do you use z-test table? ›

To use a z-table, first turn your data into a normal distribution and calculate the z-score for a given value. Then, find the matching z-score on the left side of the z-table and align it with the z-score at the top of the z-table. The result gives you the probability.

How to calculate z critical value in Excel? ›

STEP 1: Click on an empty cell where you want the Z critical value to appear. STEP 2: Enter “=NORM. S. INV(α)” into the cell, replacing α with your chosen significance level.

How to find p-value with z score in Excel? ›

The excel formula NORMDIST(z) gives the area left of the z value, hence for Right Tail Test p-value = 1- NORMDIST(z) The excel formula NORMDIST(z) gives the area left of the z value, hence for Two Tail Test p-value = 2 * (1-NORMDIST(z)) OR 2 * (NORMDIST(-z))

How do you do command Z in Excel? ›

To undo an action press Ctrl+Z on your keyboard, or select Undo on the Quick Access Toolbar. You can press Undo (or Ctrl+Z) repeatedly if you want to undo multiple steps.

What is the shortcut of Excel A to Z? ›

A to Z list of Excel Shortcuts A - Select All (Ctrl + A) B - Bold (Ctrl + B) C - Copy (Ctrl + C) D - Fill Down (Ctrl + D) E - Centre (Ctrl + E) F - Find (Ctrl + F) G - Go To (Ctrl + G) H - Replace (Ctrl + H) I - Italic (Ctrl + I) J - Justify (Ctrl + J) K - Insert Hyperlink (Ctrl + K) L - Align Text left (Ctrl + L) M - ...

References

Top Articles
Latest Posts
Article information

Author: Rubie Ullrich

Last Updated:

Views: 5723

Rating: 4.1 / 5 (72 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Rubie Ullrich

Birthday: 1998-02-02

Address: 743 Stoltenberg Center, Genovevaville, NJ 59925-3119

Phone: +2202978377583

Job: Administration Engineer

Hobby: Surfing, Sailing, Listening to music, Web surfing, Kitesurfing, Geocaching, Backpacking

Introduction: My name is Rubie Ullrich, I am a enthusiastic, perfect, tender, vivacious, talented, famous, delightful person who loves writing and wants to share my knowledge and understanding with you.