EDUCBA Logo

EDUCBA

MENUMENU
  • Explore
    • EDUCBA Pro
    • PRO Bundles
    • Featured Skills
    • New & Trending
    • Fresh Entries
    • Finance
    • Data Science
    • Programming and Dev
    • Excel
    • Marketing
    • HR
    • PDP
    • VFX and Design
    • Project Management
    • Exam Prep
    • All Courses
  • Blog
  • Enterprise
  • Free Courses
  • Log in
  • Sign Up
Home Excel Excel Resources Statistical Functions in Excel Z TEST in Excel
 

Z TEST in Excel

Madhuri Thakur
Article byMadhuri Thakur

Updated July 4, 2023

Z TEST in Excel

 

 

Z TEST in Excel

With the help of the Z-Test, we compare the means of two datasets in Excel that are equal or not. In Excel, we have a function for Z-Test named as ZTest, where, as per syntax, we need to have Array and X value (Hypothesized sample mean) and Sigma value (Optional). Mostly X is a minimum of 95% probability, which can take from 0 to 5. Another way of doing Z-Test is from the Data Analysis option from the Data menu tab. There we would need 2 variable ranges, 2 variances of each range. If Z < Z Critical then we will reject the null hypothesis.

Watch our Demo Courses and Videos

Valuation, Hadoop, Excel, Mobile Apps, Web Development & many more.

Z TEST Formula in Excel

Below is the Z TEST Formula:

ZTEST Formula in Excel

Z TEST Formula has the below arguments:

  • Array:  Test the hypothesized sample mean for the given set of values.
  • X: The hypothesized sample mean, which requires a test.
  • Sigma: This is an optional argument that represents the population standard deviation. If it’s not given or unknown, use the sample standard deviation.

How to Use the Z Test Function in Excel?

There are two ways to use Z TEST in Excel, which are:

You can download this Z TEST Excel Template here – Z TEST Excel Template
  • One sample Z TEST
  • Two sample Z TEST

Here we will cover both ways one by one in detail.

One sample Z TEST:

If we have given one dataset, we use the Z TEST function, which falls under the statistical functions category. This Z TEST function in Excel gives the one-tailed probability value of a test.

Z TEST function:

This function gives you the probability that the supplied hypothesized sample mean is greater than the mean of the supplied data values.

Z TEST Function is very simple and easy to use.

Working of Z TEST Function in Excel with Examples

Let’s understand the working of the Z TEST Function in Excel with some examples.

Example #1

We have given the below set of values:

Z-TEST Example 1-1

To calculate the one-tailed probability value of a Z Test for the above data, let’s assume the hypothesized population mean is 5. Now we will use the Z TEST formula as shown below:

Z-TEST Example 1-2

The result is given below:

Z-TEST Example 1-3

Using the above result, we can also calculate the two-tailed probability of a Z TEST.

The formula below calculates the two-tailed P-value of a Z TEST for the given hypothesized population, which is 5.

Z-TEST Example 1-4

The result is given below:

Z-TEST Example 1-5

Two Sample Z Test:

While using the Z Test, we test a null hypothesis that states that the two population’s mean is equal.

i.e.

H0: µ1 – µ 2 = 0

H1: µ1 – µ 2 ≠ 0

Where H1 is called an alternative hypothesis, the mean of the two populations is not equal.

Let’s take an example to understand the usage of two sample Z tests.

Example #2

Let’s take the example of student’s marks in two different subjects.

Z-TEST Example 2-1

Now we need to calculate the variance of both subjects, so we will use the below formula for this:

VAR.P Formula

The above formula applies for Variance 1 (Subject 1) like below:

Z-TEST Example 2-2

The result is given below:

Z-TEST Example 2-3

The above same formula applies for Variance 2 (Subject 2) like below:

Z-TEST Example 2-4

The result is given below:

Z-TEST Example 2-5

  • Now, Go to the Data Analysis tab in the extreme upper right corner under the DATA tab as shown below screenshot:

Z-TEST Example 2-6

  • It will open a dialog box with Data Analysis options.
  • Click on z-Test: Two-Sample for Means and click on OK, as shown below.

Z-TEST Example 2-7

  • It will open a dialog box for Z-test, as shown below.

Dialog Box

  • Now in the Variable 1 range box, select subject 1 range from A25:A35

Range Box

  • Similarly, in the Variable 2 range box, select subject 2 range from B25:B35

Variable Range

  • Under the Variable 1 variance box, enter cell B38 variance value.
  • Under the Variable 2 variance box, enter cell B39 variance value.

Variable Variance

  • In Output Range, Select the cell where you want to see the result. Here we have passed cell E24 and then clicked on OK.

Output Range

The result is shown below:

Result

Explanation

  • We can reject the null hypothesis if z < -z Critical two-tail or z stat > z Critical two-tail.
  • Here 1.279 > -1.9599 and 1.279 < 1.9599; hence we can’t reject the null hypothesis.
  • Thus, the means of both populations don’t differ significantly.

Things to Remember

Z test is only applicable for two samples when the variance of both populations is known. While using the Z Test function below error occurs:

  • #VALUE! error: If the value of x or Sigma is non-numeric.
  • #NUM! error: If the Sigma argument value equals zero.
  • #N/A error: If the dataset values or passed array is empty.
  • #DIV/0! error: This error occurs in two conditions:
  1. If the given array contains only one value.
  2. The sigma is not given, and the standard deviation is zero of the passed array.

Recommended Articles

This has been a guide to Z TEST in Excel. Here we discuss the Z TEST Formula and how to use the Z TEST Function in Excel, along with practical examples and downloadable Excel templates. You can also go through our other suggested articles –

  1. Excel T.Test Function
  2. One Variable Data Table in Excel
  3. MATCH Function in Excel
  4. Errors in Excel

Primary Sidebar

Footer

Follow us!
  • EDUCBA FacebookEDUCBA TwitterEDUCBA LinkedINEDUCBA Instagram
  • EDUCBA YoutubeEDUCBA CourseraEDUCBA Udemy
APPS
EDUCBA Android AppEDUCBA iOS App
Blog
  • Blog
  • Free Tutorials
  • About us
  • Contact us
  • Log in
Courses
  • Enterprise Solutions
  • Free Courses
  • Explore Programs
  • All Courses
  • All in One Bundles
  • Sign up
Email
  • [email protected]

ISO 10004:2018 & ISO 9001:2015 Certified

© 2025 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA

Download Z TEST Excel Template

EDUCBA Login

Forgot Password?

EDUCBA

Download Z TEST Excel Template

EDUCBA

डाउनलोड Z TEST Excel Template

🚀 Limited Time Offer! - ENROLL NOW