Z-test

For each significance level in the confidence interval, the Z-test has a single critical value (for example, 1.96 for 5% two tailed) which makes it more convenient than the Student's t-test whose critical values are defined by the sample size (through the corresponding degrees of freedom).

Both the Z-test and Student's t-test have similarities in that they both help determine the significance of a set of data.

However, the z-test is rarely used in practice because the population deviation is difficult to determine.

Because of the central limit theorem, many test statistics are approximately normally distributed for large samples.

Therefore, many statistical tests can be conveniently performed as approximate Z-tests if the sample size is large or the population variance is known.

How to perform a Z test when T is a statistic that is approximately normally distributed under the null hypothesis is as follows: First, estimate the expected value μ of T under the null hypothesis, and obtain an estimate s of the standard deviation of T. Second, determine the properties of T : one tailed or two tailed.

In some situations, it is possible to devise a test that properly accounts for the variation in plug-in estimates of nuisance parameters.

In the case of one and two sample location problems, a t-test does this.

We can ask whether this mean score is significantly lower than the regional mean—that is, are the students in this school comparable to a simple random sample of 55 students from the region as a whole, or are their scores surprisingly low?

Next calculate the z-score, which is the distance from the sample mean to the population mean in units of the standard error: In this example, we treat the population mean and variance as known, which would be appropriate if all students in the region were tested.

When population parameters are unknown, a Student's t-test should be conducted instead.

The classroom mean score is 96, which is −2.47 standard error units from the population mean of 100.

Looking up the z-score in a table of the standard normal distribution cumulative probability, we find that the probability of observing a standard normal value below −2.47 is approximately 0.5 − 0.4932 = 0.0068.

This is the one-sided p-value for the null hypothesis that the 55 students are comparable to a simple random sample from the population of all test-takers.

Another way of stating things is that with probability 1 − 0.014 = 0.986, a simple random sample of 55 students would have a mean test score within 4 units of the population mean.

We could also say that with 98.6% confidence we reject the null hypothesis that the 55 test takers are comparable to a simple random sample from the population of test-takers.

The Z-test tells us that the 55 students of interest have an unusually low mean test score compared to most simple random samples of similar size from the population of test-takers.

A deficiency of this analysis is that it does not consider whether the effect size of 4 points is meaningful.

If instead of a classroom, we considered a subregion containing 900 students whose mean score was 99, nearly the same z-score and p-value would be observed.

This shows that if the sample size is large enough, very small differences from the null value can be highly statistically significant.

See statistical hypothesis testing for further discussion of this issue.

Another class of Z-tests arises in maximum likelihood estimation of the parameters in a parametric statistical model.

Maximum likelihood estimates are approximately normal under certain conditions, and their asymptotic variance can be calculated in terms of the Fisher information.

The maximum likelihood estimate divided by its standard error can be used as a test statistic for the null hypothesis that the population value of the parameter equals zero.

When using a Z-test for maximum likelihood estimates, it is important to be aware that the normal approximation may be poor if the sample size is not sufficiently large.

Although there is no simple, universal rule stating how large the sample size must be to use a Z-test, simulation can give a good idea as to whether a Z-test is appropriate in a given situation.

Z-tests are employed whenever it can be argued that a test statistic follows a normal distribution under the null hypothesis of interest.

This test leverages the property that the sample proportions (which is the average of observations coming from a Bernoulli distribution) are asymptotically normal under the Central Limit Theorem, enabling the construction of a z-test.

Where: The confidence interval for the difference between two proportions, based on the definitions above, is:

Where: The MDE for when using the (two-sided) z-test formula for comparing two proportions, incorporating critical values for