What is a Z-Test Az-test is a statistical test used to determine whether two population means aredifferent when the variances are known and the sample size is large.
The test statistic is assumed to have a normal distribution, and nuisance parameters such as standard deviation should be known in order for an accurate z-test to be performed.
The basic z score formula for a sample is:z = (x – μ) / σ
To select the z-test tool, click the Data tab’s Data Analysis command button.When Excel displays the Data Analysis dialog box, select the z-Test: Two Sample for Means tool and then click OK.In the Variable 1 Range and Variable 2 Range text boxes, identify the sample values by telling Excel in what worksheet ranges you’ve stored the two samples
Use the Hypothesized Mean Difference text box to indicate whether you hypothesize that the means are equal.Use the Variable 1 Variance (Known) and Variable 2 Variance (Known) text boxes to provide the population variance for the first and second samples.In the Alpha text box, state the confidence level for your z-test calculation.
In the Output Options section, indicate where the z-test tool results should be stored. Then click ok,excel automatically calculates the z-test resultsThe z-test results show the mean for each of the data sets, the variance, the number of observations, the hypothesized mean difference, the z-value, and the probability values for one-tail and two-tail tests.