# Z-test

A z-test is a statistical hypothesis test in which the test statistic is assumed to follow a standard normal distribution when the null hypothesis is true. The name comes from z, the conventional symbol for a standard normal variable. The most common forms test a population mean when the population standard deviation is known, or test one or two population proportions using a normal approximation to binomial data.<sup>[1](https://www.itl.nist.gov/div898/handbook/prc/section2/prc.htm)</sup><sup> • </sup><sup>[2](https://nvlpubs.nist.gov/nistpubs/TechnicalNotes/NIST.TN.2106.pdf)</sup>

| Key fact | Detail |
|---|---|
| Test statistic (known σ) | \( z = (\bar{Y} - \mu_0)/(\sigma/\sqrt{N}) \), where \( \bar{Y} \) is the sample mean, \( \mu_0 \) the hypothesized mean, \( \sigma \) the known population standard deviation, and N the sample size<sup>[1](https://www.itl.nist.gov/div898/handbook/prc/section2/prc.htm)</sup> |
| Reference distribution | The standard normal; the statistic is compared with critical values such as \( z_{\alpha/2} \)<sup>[1](https://www.itl.nist.gov/div898/handbook/prc/section2/prc.htm)</sup> |
| Common critical values | 1.96 corresponds to the central 95% of a normal distribution (±1.96 SD of the mean); 1.645 is the one-sided 5% critical value \( z_{0.95} \)<sup>[3](https://www.physoc.org/magazine-articles/the-strange-origins-of-the-students-t-test/)</sup><sup> • </sup><sup>[4](https://www.itl.nist.gov/div898/handbook/prc/section2/prc24.htm)</sup> |
| Key assumption | The population standard deviation is known; if it must be estimated from the sample, the corresponding statistic follows Student's t distribution with N − 1 degrees of freedom<sup>[1](https://www.itl.nist.gov/div898/handbook/prc/section2/prc.htm)</sup><sup> • </sup><sup>[5](https://www.mathworks.com/help/stats/hypothesis-test-assumptions.html)</sup> |
| Approximate nature | The z test is based on the normal approximation, so its nominal significance levels are close to actual levels only when the sample is reasonably large and the population nearly normal<sup>[6](https://www.stat.berkeley.edu/pub/users/stark/SticiGui/Text/zTest.htm)</sup> |

## The test statistic and decision rule

For a test of a population mean with known standard deviation, the statistic is

\[ z = \frac{\bar{Y} - \mu_0}{\sigma/\sqrt{N}} \]

where \( \bar{Y} = (1/N)\sum_{i=1}^{N} Y_i \) is the sample mean. At a chosen significance level \( \alpha \), typically 0.01, 0.05, or 0.10, the null hypothesis that the mean equals \( \mu_0 \) is rejected when the statistic exceeds the appropriate standard normal critical value: \( |z| \ge z_{\alpha/2} \) for a two-sided test, \( z \ge z_{\alpha} \) for an upper one-sided test, or \( z \le -z_{\alpha} \) for a lower one-sided test.<sup>[1](https://www.itl.nist.gov/div898/handbook/prc/section2/prc.htm)</sup>

The critical values come directly from the normal distribution. A data point from any normal distribution has a 95% probability of lying within ±1.96 standard deviations of the mean, which is why 1.96 serves as the two-sided 5% critical value.<sup>[3](https://www.physoc.org/magazine-articles/the-strange-origins-of-the-students-t-test/)</sup> For one-sided tests at \( \alpha = 0.05 \), the critical value is \( z_{0.95} = 1.645 \).<sup>[4](https://www.itl.nist.gov/div898/handbook/prc/section2/prc24.htm)</sup>

## When the z-test applies

**Known versus estimated standard deviation.** The defining condition for the z-test is that the population standard deviation \( \sigma \) is known. When it must be estimated from the data by the sample standard deviation \( s = \sqrt{(1/(N-1))\sum_{i=1}^{N}(Y_i - \bar{Y})^2} \), the analogous statistic \( t = (\bar{Y} - \mu_0)/(s/\sqrt{N}) \) follows Student's t distribution with N − 1 degrees of freedom, and the t-test is used instead.<sup>[1](https://www.itl.nist.gov/div898/handbook/prc/section2/prc.htm)</sup> The t curve is broader and flatter than the normal curve, which accounts for the extra variability introduced by estimating the standard deviation.<sup>[7](https://stat-www.berkeley.edu/users/stark/SticiGui/Text/zTest.htm)</sup> In practice, traditional z-test methods relied on \( \sigma \) being known, or on samples large enough (typically n > 30) for the sample standard deviation to approximate it reliably.<sup>[8](https://encyclopedia.arabpsychology.com/t-test/)</sup>

**Normality and independence.** Like the t-test, the z-test assumes the data are independently sampled from a normal distribution.<sup>[5](https://www.mathworks.com/help/stats/hypothesis-test-assumptions.html)</sup> If the population itself is non-normal, large samples are still justified by the Central Limit Theorem: the mean of many independent random variables that share the same distribution and have finite mean and variance is approximately normally distributed.<sup>[2](https://nvlpubs.nist.gov/nistpubs/TechnicalNotes/NIST.TN.2106.pdf)</sup> With small samples and a skewed population, the normal approximation to the distribution of the sample mean can be poor, and the nominal significance level of the test can differ substantially from its actual value.<sup>[6](https://www.stat.berkeley.edu/pub/users/stark/SticiGui/Text/zTest.htm)</sup>

## z-tests for proportions

A second family of z-tests applies to binomial data. For a sample of N items of which a proportion \( \hat{p} \) are judged defective, the test statistic is based on a normal approximation, and a one-sided test at \( \alpha = 0.05 \) fails to reject a hypothesis of no degradation if \( z < z_{0.95} = 1.645 \), though failing to reject does not establish that the hypothesis is true.<sup>[4](https://www.itl.nist.gov/div898/handbook/prc/section2/prc24.htm)</sup><sup> • </sup><sup>[12](https://www.stat.berkeley.edu/pub/users/stark/SticiGui/Text/testing.htm)</sup> The same normal-approximation framework extends to comparing two proportions, the two-proportion z-test.<sup>[9](https://online.stat.psu.edu/stat500/Lesson12)</sup>

The proportion case is a notable exception to the rule of choosing z when the standard deviation is known and t when it is estimated.

## Approximate character and sample size

A z test has its nominal significance level exactly when its test statistic has the standard normal distribution under the null hypothesis; when that distribution is only approximated by the standard normal, its actual significance level may differ from the nominal level.<sup>[13](https://www.stat.berkeley.edu/~stark/SticiGui/Text/zTest.htm)</sup> When the sample size is reasonably large and the population nearly normal, the nominal and actual significance levels are close; when these conditions fail, they can differ substantially.<sup>[6](https://www.stat.berkeley.edu/pub/users/stark/SticiGui/Text/zTest.htm)</sup> For small samples, accuracy suffers for two reasons: the normal curve may approximate the sampling distribution of the mean badly, and the sample standard deviation may estimate the population standard deviation poorly, which makes the standard error untrustworthy.<sup>[7](https://stat-www.berkeley.edu/users/stark/SticiGui/Text/zTest.htm)</sup>

The same normal critical values also enter the design of experiments. The minimum sample size needed to detect a change \( \delta \) in a proportion with a one-sided test takes the form \( N \ge \left( (z_{1-\alpha}\sqrt{p_0(1-p_0)} + z_{1-\beta}\sqrt{p_1(1-p_1)})/\delta \right)^2 \); a worked example with \( \alpha = 0.05 \), \( \beta \) giving \( z_{1-\beta} = 1.282 \), \( p_0 = 0.1 \), \( p_1 = 0.2 \), and \( \delta = 0.1 \) yields a minimum of about 102, or 112 with a continuity correction.<sup>[10](https://www.itl.nist.gov/div898/handbook/prc/section2/prc242.htm)</sup>

## Relation to the t-test

The z-test and the t-test address the same question, whether a population mean equals a particular value, and their statistics have the same algebraic form; the difference is whether the denominator uses a known \( \sigma \) or an estimate \( s \).<sup>[1](https://www.itl.nist.gov/div898/handbook/prc/section2/prc.htm)</sup><sup> • </sup><sup>[11](https://online.stat.psu.edu/stat200/Lesson08)</sup> The t framework grew out of small-sample work at the beginning of the 20th century, when statistical practice was dominated by large samples and the normal distribution; [William Sealy Gosset](https://www.edgepedia.org/william-sealy-gosset), publishing as "Student", derived the t distribution that bears that name, and the t-test became the standard tool for the more typical case in which the standard deviation must be estimated from the data.<sup>[3](https://www.physoc.org/magazine-articles/the-strange-origins-of-the-students-t-test/)</sup> The normal distribution underlying the z-test itself dates to de Moivre's derivation in 1733 for games of chance, later expressed as a probability frequency distribution by Gauss in the context of astronomical analysis.<sup>[3](https://www.physoc.org/magazine-articles/the-strange-origins-of-the-students-t-test/)</sup>

## References

1. [7.2.2. Are the data consistent with the assumed process mean?, NIST/SEMATECH e-Handbook of Statistical Methods](https://www.itl.nist.gov/div898/handbook/prc/section2/prc.htm)
2. [Comparing Instruments, NIST Technical Note 2106](https://nvlpubs.nist.gov/nistpubs/TechnicalNotes/NIST.TN.2106.pdf)
3. [Angus Brown, The strange origins of the Student's t-test, The Physiological Society](https://www.physoc.org/magazine-articles/the-strange-origins-of-the-students-t-test/)
4. [7.2.4. Does the proportion of defectives meet requirements?, NIST/SEMATECH e-Handbook of Statistical Methods](https://www.itl.nist.gov/div898/handbook/prc/section2/prc24.htm)
5. [Hypothesis Test Assumptions, MATLAB & Simulink Documentation, MathWorks](https://www.mathworks.com/help/stats/hypothesis-test-assumptions.html)
6. [Philip B. Stark, Approximate Hypothesis Tests: the z Test and the t Test, SticiGui, UC Berkeley](https://www.stat.berkeley.edu/pub/users/stark/SticiGui/Text/zTest.htm)
7. [Philip B. Stark, Approximate Hypothesis Tests: the z Test and the t Test (mirror), SticiGui, UC Berkeley](https://stat-www.berkeley.edu/users/stark/SticiGui/Text/zTest.htm)
8. [Inferential Statistics: Decoding Data Significance, Arab Psychology Encyclopedia](https://encyclopedia.arabpsychology.com/t-test/)
9. [12. Summary and Review, STAT 500, Penn State Eberly College of Science](https://online.stat.psu.edu/stat500/Lesson12)
10. [7.2.4.2. Sample sizes required, NIST/SEMATECH e-Handbook of Statistical Methods](https://www.itl.nist.gov/div898/handbook/prc/section2/prc242.htm)
11. [8. Inference for One Sample, STAT 200, Penn State Eberly College of Science](https://online.stat.psu.edu/stat200/Lesson08)
12. [stat.berkeley.edu](https://www.stat.berkeley.edu/pub/users/stark/SticiGui/Text/testing.htm)
13. [stat.berkeley.edu](https://www.stat.berkeley.edu/~stark/SticiGui/Text/zTest.htm)

---
*Topic: Encyclopedia › Physical world and mathematics › Mathematics and statistics › Statistics and probability › Statistical inference, estimation, sampling, and testing › Hypothesis testing*

*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license
