## Formula to Calculate Z Test in Statistics

Z Test in statistics refers to the hypothesis test which is used to determine whether the two samples means calculated are different, in case the standard deviations are available and the sample is large.

**Z = (x –**

**μ) /**

**ơ**

where x = any value from the population

- μ = population mean
- ơ = population standard deviation

In the case of a sample, the formula for z-test statistics of value is calculated by deducting sample mean from the x-value and then the result is divided by the sample standard deviation. Mathematically, it is represented as,

**Z = (x – x_mean**

**) / s**

where

- x = any value from the sample
**x_mean**= sample mean- s = sample standard deviation

### Z Test Calculation (Step by Step)

**The formula for z-test statistics for a population is derived by using the following steps:**

**Step 1:**Firstly, calculate the population means and population standard deviation based on the observation captured in the population mean, and each observation is denoted by x_{i}. The total number of observations in the population is denoted by N.

Population mean,

Population standard deviation,

**Step 2:**Finally, the z-test statistics is computed by deducting population mean from the variable and then the result is divided by the population standard deviation as shown below.

**Z = (x – ****μ) / ****ơ**

**The formula for z-test statistics for a sample is derived by using the following steps:**

**Step 1:**Firstly, calculate the sample mean and sample standard deviation the same as above. Here, the total number of observations in the sample is denoted by n such that n < N.

Sample mean,

Sample standard deviation,

**Step 2:**Finally, the z-test statistics is calculated by deducting sample mean from the x-value and then the result is divided by the sample standard deviation as shown below.

**Z = (x – x_mean****) / s**

### Examples

#### Example #1

**Let us assume a population of students in a school who appeared for a class test. The mean score in the test is 75 and the standard deviation is 15. Determine the z-test score of David who scored 90 in the test.**

Given,

- The population mean, μ= 75
- Population standard deviation, ơ = 15

Therefore, the z-test statistics can be calculated as,

Z = (90 – 75) / 15

**Z Test Statistics will be –**

**Z = 1**

Therefore, David’s test score is one standard deviation above the mean score of the population i.e. as per z-score table, 84.13% of students less score than David.

#### Example #2

**Let us take the example of 30 students who were selected as a part of a sample team to be surveyed to see how many pencils were being used in a week. Determine the z-test score for the 3 ^{rd} student of based on the given responses: 3, 2, 5, 6, 4, 7, 4, 3, 3, 8, 3, 1, 3, 6, 5, 2, 4, 3, 6, 4, 5, 2, 2, 4, 4, 2, 8, 3, 6, 7.**

4.9 (1,067 ratings) 250+ Courses | 40+ Projects | 1000+ Hours | Full Lifetime Access | Certificate of Completion

Given,

- x = 5, since the 3
^{rd}student’s response, is 5 - Sample size, n = 30

Sample mean, = (3 + 2 + 5 + 6 + 4 + 7 + 4 + 3 + 3 + 8 + 3 + 1 + 3 + 6 + 5 + 2 + 4 + 3 + 6 + 4 + 5 + 2 + 2 + 4 + 4 + 2 + 8 + 3 + 6 + 7) / 30

**Mean = 4.17**

Now, the sample standard deviation can be calculated by using the above formula.

**ơ = 1.90**

Therefore, the z-test score for the 3^{rd} student can be calculated as,

Z = (x – x ) / s

- Z = (5 –17) / 1.90
- Z = 0.44

Therefore, the 3^{rd} student’s usage is 0.44 times the standard deviation above the mean usage of the sample i.e. as per z- score table, 67% students use fewer pencils than the 3^{rd} student.

### Example #3

**Let us take the example of 30 students who were selected as a part of a sample team to be surveyed to see how many pencils were being used in a week. Determine the z-test score for the 3 ^{rd} student of based on the given responses: 3, 2, 5, 6, 4, 7, 4, 3, 3, 8, 3, 1, 3, 6, 5, 2, 4, 3, 6, 4, 5, 2, 2, 4, 4, 2, 8, 3, 6, 7.**

Below is given data for calculation of Z Test Statistics

You can refer to the given excel sheet below for the detailed calculation of Z Test Statistics.

### Relevance and Uses

It is very important to understand the concept of z-test statistics because it is usually used whenever it is arguable whether or not a test statistic follows a normal distribution under the concerned null hypothesis. However, it should be kept in mind that a z-test is used only when the sample size is greater than 30, otherwise, the t-test is used.

### Recommended Articles

This has been a guide to Z Test Statistics Formula. Here we learn how to calculate Z Test in statistics using its formula along with examples and downloadable excel template. You can learn more about financial analysis from the following articles –

- 250+ Courses
- 40+ Projects
- 1000+ Hours
- Full Lifetime Access
- Certificate of Completion