What is Z-test in Statistics?

Z-test is a statistical method to determine whether the distribution of the test statistics can be approximated by a normal distribution. It is the method to determine whether two sample means are approximately the same or different when their variance is known and the sample size is large (should be >= 30).

When to Use Z-test:

  • The sample size should be greater than 30. Otherwise, we should use the t-test.
  • Samples should be drawn at random from the population.
  • The standard deviation of the population should be known.
  • Samples that are drawn from the population should be independent of each other.
  • The data should be normally distributed, however for large sample size, it is assumed to have a normal distribution.

Steps to perform Z-test:

  • First, identify the null and alternate hypotheses.
  • Determine the level of significance (∝).
  • Find the critical value of z in the z-test using
  • Calculate the z-test statistics. Below is the formula for calculating the z-test statistics.

Z = (X¯ - µ )/(σ/√n)
  • where,
  • X¯: mean of the sample.
  • Mu: mean of the population.
  • Sd: Standard deviation of the population.
  • n: sample size.
  • Now compare with the hypothesis and decide whether to reject or not to reject the null hypothesis