Excel Z TEST is a kind of hypothesis test that is used to test the alternative hypothesis against the null hypothesis. The null hypothesis is a hypothesis that refers to a common statement in general. By conducting a hypothesis test we try to prove that the null hypothesis is false against the alternative hypothesis.
The Z.TEST function syntax has the following arguments:
- Array (required argument) – This is the array or range of data against which we need to test x. The array is a set of values against which the hypothesized sample mean is to be tested.
- X (optional argument) – This is the hypothesized sample. It is the value to be tested.
- Sigma (optional argument) – This represents the population’s standard deviation if this is known. If omitted, the function uses the sample standard deviation.
Example: Let’s look at some Excel Z.TEST function examples and explore how to use the Z.TEST function as a worksheet function in Microsoft Excel:
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:
We can also calculate the two-tailed probability of a Z TEST here by using the above result.
The formula is given below for calculating the two-tailed P-value of a Z TEST for given hypothesized population means which is 5.
Two Sample Z Test:
While using the Z Test, we test a null hypothesis which states that the mean of the two population is equal.
H: µ1 – µ 2 = 0
H1: µ1 – µ 2 ≠ 0
Where H1 is called an alternative hypothesis, the mean of two populations is not equal.
Let’s take the example of student’s marks of two different subjects.
Step 1: The first thing we need to do is to calculate the variables for these two values by using VAR.P function.
Step 2: Now go to the Data tab and click on Data Analysis.
Step 3: For Variable 1 Range select “Student 1” scores and for Variable 2 Range select “Student 2” scores.
Step 4: Variable 1 Variance select Student 1 variance score and Variable 1 Variance select Student 2 variance score.
Step 5: Select the Output Range as a cell and press Ok.
we got the result.
If Z < – Z Critical Two Tailor Z > Z Critical Two Tail, then we can reject the null hypothesis.
So from the ZTEST result below are results.
- Z < – Z Critical Two Tail = 2.20219052059159 > – 1.959963985
- Z > Z Critical Two Tail = 2.20219052059159 > 1.959963985
Since it is meeting our criteria we can reject the null hypothesis. So the means of two students differ significantly.
- Z.TEST represents the probability that the sample mean would be higher 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.
- #VALUE! error – Occurs when the value of x or the value of sigma is non-numeric.
- #NUM! error – This error occurs when the sigma argument provided is equal to zero.
- #N/A error – Occurs when the provided array is empty.
- #DIV/0! error – Occurs when:
- The sigma is not provided and the standard deviation of the supplied array is zero.
- The given array contains just one value.