What it means
The NIST/SEMATECH e-Handbook of Statistical Methods describes the one-sample test of a mean, which asks whether the true mean agrees with a known or assumed mean, is less than a standard, or is at least as large as a standard. The null hypotheses test the true mean against the assumed mean: mean equals the standard, mean is at most the standard, or mean is at least the standard.
A sample of measurements is used to decide. NIST gives the test statistic for a known standard deviation as z = (sample mean - hypothesized mean) / (standard deviation / square root of N).
For the two-sided case, the statistic is compared with the 1 - alpha/2 critical value of the standard normal distribution, while the one-sided cases use the 1 - alpha or alpha critical values. When the standard deviation is not known, NIST uses a t statistic with N - 1 degrees of freedom.
The test is otherwise built the same way. The critical values come from the t table instead of the normal table.
NIST adds a caution. If the standard deviation is assumed known for the test, that assumption should be checked by a test of hypothesis.
Its own worked example says the process history was not stable enough to treat the standard deviation as known, so it used the t statistic. For a two-sided test at alpha 0.05, the standard normal critical value is about 1.96.
For a one-sided test it is about 1.645. These figures come from the standard normal distribution.
The known standard deviation usually comes from a stable, well-monitored process with a long record. Without that record, the t-test is the safer choice.
In practice
Real-world examples.
Example
A fictional bottling line has a known fill standard deviation of 2 ml from years of data. A sample of 25 bottles averages 500.9 ml against a target of 500 ml. A z-test checks whether the line has drifted, and the statistic of 2.25 says it probably has.
Example
A fictional lender's payment processing time has a known standard deviation of 15 minutes. A sample of 36 payments averages 104.2 minutes against a target of 100. The analyst tests whether the mean is above target, and the one-sided result is only just significant.
Example
A fictional analyst has only 12 observations and no history to support a known standard deviation. A z-test would claim more precision than the data support. The analyst uses a t-test instead, with 11 degrees of freedom, which gives a wider and more honest margin for error.
Formula
Calculation
Z = (sample mean - hypothesized mean) / (sigma / sqrt(N)).
Example with assumed figures: sample mean 104.2, hypothesized mean 100, sigma 15 and N = 36. The standard error is 15 / 6 = 2.5, so z = 4.2 / 2.5 = 1.68.
The two-sided p-value is about 0.093 and the one-sided p-value is about 0.046.
At alpha 0.05, the two-sided test does not reject, since 1.68 is below 1.96. The one-sided test rejects, since 1.68 is above 1.645.
A second example with assumed figures: a fictional bottling line has a known standard deviation of 2 ml, a target of 500 ml, and a sample of 25 bottles averaging 500.9 ml. The standard error is 2 / sqrt(25) = 0.4, so z = 0.9 / 0.4 = 2.25. That is above 1.96, and the two-sided p-value is about 0.024, so the test rejects the claim that the line is filling to target on average.Case study
Seen in the real world.
This case study is fictional and illustrative. A payments team has years of data showing that clearing time has a standard deviation of 15 minutes. The target mean is 100 minutes. After a system change, the team samples 36 payments and finds a mean of 104.2 minutes.
They want to know if clearing got slower. They compute a standard error of 2.5 and a z statistic of 1.68. The analyst had said before the test that the question was one-sided, since only slower times are a concern. At alpha 0.05 the one-sided critical value is 1.645, so the null is rejected, with a p-value of about 0.046.
She also notes that the two-sided p-value is 0.093. Had the question been two-sided, the same data would not reject at 5 percent. The result is sensitive to the choice, which is why the choice must be made first. The lesson is to state the standard deviation source, the sidedness and alpha before looking at the data.
Watch out
Common mistakes.
- Using a z-test when the standard deviation is estimated from a small sample, when NIST says to use the t statistic.
- Assuming the standard deviation is known without checking, which NIST cautions against.
- Choosing one-sided or two-sided after seeing the data, which changes the p-value and the decision.
Questions
People also ask.
What is a z-test?
It is a test of a mean against a stated value that uses a known population standard deviation and the standard normal distribution.
When do I use a t-test instead?
Use the t-test when the standard deviation is not known and must be estimated from the sample. NIST then uses N - 1 degrees of freedom.
What are the usual critical values?
At alpha 0.05, about 1.96 for a two-sided test and about 1.645 for a one-sided test.
From the founder's library

Take it further with the book.
Build your financial confidence beyond this definition. Shihan's full-length guide, Accounting Fundamentals, takes the same plain-English approach and turns it into a complete, practical playbook for non-finance managers, business owners and students - with chapter-end quiz answers and presentation slides included.
25% off with code MMHQ25, applied at checkout. Priced in USD - checkout may show the equivalent in your local currency.
View the book and save 25%Related
