Statistics
Textbooks
Boundless Statistics
Describing, Exploring, and Comparing Data
Further Considerations for Data
Statistics Textbooks Boundless Statistics Describing, Exploring, and Comparing Data Further Considerations for Data
Statistics Textbooks Boundless Statistics Describing, Exploring, and Comparing Data
Statistics Textbooks Boundless Statistics
Statistics Textbooks
Statistics
Concept Version 6
Created by Boundless

When Does the Z-Test Apply?

A $z$-test is a test for which the distribution of the test statistic under the null hypothesis can be approximated by a normal distribution.

Learning Objective

  • Identify how sample size contributes to the appropriateness and accuracy of a $z$-test


Key Points

    • The term $z$-test is often used to refer specifically to the one-sample location test comparing the mean of a set of measurements to a given constant.
    • To calculate the standardized statistic $Z = \frac{X - \mu_0}{s}$, we need to either know or have an approximate value for $\sigma^2$ $z$ σ2, from which we can calculate $s^2 = \frac{\sigma^2}{n}$.
    • For a $z$-test to be applicable, nuisance parameters should be known, or estimated with high accuracy.
    • For a $z$-test to be applicable, the test statistic should follow a normal distribution.

Terms

  • null hypothesis

    A hypothesis set up to be refuted in order to support an alternative hypothesis; presumed true until statistical evidence in the form of a hypothesis test indicates otherwise.

  • nuisance parameters

    any parameter that is not of immediate interest but which must be accounted for in the analysis of those parameters which are of interest; the classic example of a nuisance parameter is the variance $\sigma^2$, of a normal distribution, when the mean, $\mu$, is of primary interest


Full Text

$Z$-test

A $Z$-test is any statistical test for which the distribution of the test statistic under the null hypothesis can be approximated by a normal distribution. Because of the central limit theorem, many test statistics are approximately normally distributed for large samples. For each significance level, 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 which has separate critical values for each sample size. Therefore, many statistical tests can be conveniently performed as approximate $Z$-tests if the sample size is large or the population variance known. If the population variance is unknown (and therefore has to be estimated from the sample itself) and the sample size is not large ($n<30$), the Student $t$-test may be more appropriate.

If $T$ is a statistic that is approximately normally distributed under the null hypothesis, the next step in performing a $Z$-test is to estimate the expected value $\theta$ of $T$ under the null hypothesis, and then obtain an estimate $s$ of the standard deviation of $T$. We then calculate the standard score $Z = \frac{(T-\theta)}{s}$, from which one-tailed and two-tailed $p$-values can be calculated as $\varphi(-Z)$ (for upper-tailed tests), $\varphi(Z)$ (for lower-tailed tests) and $2\varphi(\left|-Z\right|)$ (for two-tailed tests) where $\varphi$ is the standard normal cumulative distribution function.

Use in Location Testing

The term $Z$-test is often used to refer specifically to the one-sample location test comparing the mean of a set of measurements to a given constant. If the observed data $X_1, \cdots, X_n$ are uncorrelated, have a common mean $\mu$, and have a common variance $\sigma^2$, then the sample average $\bar{X}$ has mean $\mu$ and variance $\frac{\sigma^2}{n}$. If our null hypothesis is that the mean value of the population is a given number $\mu_0$, we can use $\bar{X} - \mu_0$ as a test-statistic, rejecting the null hypothesis if $\bar{X}-\mu_0$ is large.

To calculate the standardized statistic $Z = \frac{(X − μ_0)} {s}$ , we need to either know or have an approximate value for $\sigma^2$, from which we can calculate $s^2 = \frac{\sigma^2}{n}$. In some applications, $\sigma^2$ is known, but this is uncommon. If the sample size is moderate or large, we can substitute the sample variance for $\sigma^2$, giving a plug-in test. The resulting test will not be an exact $Z$-test since the uncertainty in the sample variance is not accounted for—however, it will be a good approximation unless the sample size is small. A $t$-test can be used to account for the uncertainty in the sample variance when the sample size is small and the data are exactly normal. There is no universal constant at which the sample size is generally considered large enough to justify use of the plug-in test. Typical rules of thumb range from 20 to 50 samples. For larger sample sizes, the $t$-test procedure gives almost identical $p$-values as the $Z$-test procedure. The following formula converts a random variable $X$ to the standard $Z$:

$Z = \dfrac{X-\mu}{\sigma}$

Conditions

For the $Z$-test to be applicable, certain conditions must be met:

  • Nuisance parameters should be known, or estimated with high accuracy (an example of a nuisance parameter would be the standard deviation in a one-sample location test). $Z$-tests focus on a single parameter, and treat all other unknown parameters as being fixed at their true values. In practice, due to Slutsky's theorem, "plugging in" consistent estimates of nuisance parameters can be justified. However if the sample size is not large enough for these estimates to be reasonably accurate, the $Z$-test may not perform well.
  • The test statistic should follow a normal distribution. Generally, one appeals to the central limit theorem to justify assuming that a test statistic varies normally. There is a great deal of statistical research on the question of when a test statistic varies approximately normally. If the variation of the test statistic is strongly non-normal, a $Z$-test should not be used.
[ edit ]
Edit this content
Prev Concept
Odds Ratios
Range
Next Concept
Subjects
  • Accounting
  • Algebra
  • Art History
  • Biology
  • Business
  • Calculus
  • Chemistry
  • Communications
  • Economics
  • Finance
  • Management
  • Marketing
  • Microbiology
  • Physics
  • Physiology
  • Political Science
  • Psychology
  • Sociology
  • Statistics
  • U.S. History
  • World History
  • Writing

Except where noted, content and user contributions on this site are licensed under CC BY-SA 4.0 with attribution required.