When to use it
You want to compare a sample mean with a target value and the population standard deviation σ is known in advance (a published value, a long-run process value). If σ has to be estimated from the same sample, use the One-Sample t-Test.
When not to: When σ is estimated from the same sample (use the one-sample t-test), when the sample is small with a few extreme values (cross-check with the Wilcoxon signed-rank test, which then tests the median if the values are roughly symmetric about their middle), or for a proportion (use the proportion test).
Step by step
Open it from the menu
Click Analyze in the menu bar; under Means choose One-Sample z-Test.
Fill in the form
Choose the columns: What you measured. The form lists only columns whose type fits each field. Then fill in Value to compare with (optional), Known standard deviation.
Check the options
The options start at their defaults: Alternative, Confidence level. Change one only when your question needs it.
Run the analysis
Press Run analysis. The Result Card opens on its Results tab.
What to choose in the form
| What you measured Numeric Var required | One numeric column. The continuous variable whose mean is tested |
|---|---|
| Value to compare with Mu0 optional | A value you type or choose on the form. The hypothesized population mean μ₀ the sample mean is compared with. |
| Known standard deviation Sigma required | A value you type or choose on the form. The population standard deviation σ, known from outside these data (a published or long-run process value), in the column's units. |
| Alternative | Direction of the test: the mean differs from, is less than, or is greater than μ₀ Default: two-sided. |
| Confidence level | Confidence level of the interval for the mean; the test's significance level is α = 1 − the confidence level Default: 0.95. |
How to read the card
The Results tab starts with what to know first (rows left out, checks that did not pass), then the interpretation in words and the Key Results; charts and assumption checks follow further down. Learn More explains the method in plain words. Read a Result Card covers all four tabs.
A worked example
Penguin body mass (342 birds with a value), μ₀ = 4200 g, σ = 800 g taken as known, two-sided, 95%.
Result: x̄ = 4201.75 g, z = 0.0406, p = 0.9677, 95% CI [4116.97, 4286.54] g, d = 0.002.
No clear evidence that the mean body mass differs from 4200 g; means from about 4117 to 4287 g remain compatible with the data.
From the Statistics Library.
The code tabs
Code gives this analysis as Python, R and MATLAB code (and SAS where the tab offers it), reading the data the way KernelStats did. Export sends the card to a report or to slides. See The Code tab.
Understand the statistics
Ask Oobi
Type one of these into Ask Oobi beside your data:
- Bottles are filled by a machine whose long-run SD is known to be 2 ml. Is the mean fill of today's sample different from the 500 ml target?
- Explain the one-sample z-test (known σ) in plain words.
Last reviewed November 16, 2026.
