Interactive module guide

One Sample Z-Test Calculator & Guide

A one sample z-test evaluates whether a population mean is compatible with a specified value when the population standard deviation σ is known independently of the current sample.

The statistic measures the sample mean’s distance from the null mean in known standard-error units.

This is a specialized test: a large sample does not by itself make an estimated sample standard deviation become “known,” and the one sample t-test is usually appropriate when σ must be estimated.

Free · No sign-up · Calculations stay in your browser

Is this the right module for my question?

Use it when

  • Use the test for one numerical sample, one pre-specified population mean μ₀, and a defensible population standard deviation supplied by design, calibration, or reliable external knowledge. Observations should be independent under the sampling or assignment process.
  • Choose a two-sided alternative when departures in either direction matter, a right-sided alternative only when values above μ₀ were specified as the scientific question, or a left-sided alternative only when lower values were specified. Direction must be chosen before inspecting the sample.
  • The population should be normal when the sample is small. For larger samples, the sampling distribution of the mean can be approximately normal under suitable finite-variance conditions, but severe dependence, extreme skew, or influential outliers can invalidate a simple large-sample justification.

Choose another method when

  • Do not use this procedure when σ is computed from the same observations. Substituting s into a z formula understates the extra uncertainty, especially at small n; use a one sample t-test instead.
  • It is not a test for one proportion, one variance, paired observations, or comparison of two independent means. It also cannot repair a biased convenience sample or repeated measurements treated as independent.

Interactive tool

The calculator loads as you approach this section so the guide remains fast on mobile connections.

How to read the result

The sign of z gives direction relative to μ₀; its magnitude gives standardized distance. Degrees of freedom are not needed because σ is treated as known. The critical value is another representation of the α rule, while the p-value reports how extreme the observed statistic is under the null model.

If p≤α, reject H₀ at that threshold and describe evidence for the stated alternative. If p>α, fail to reject H₀; do not say the means are equal or that the null has been proved. The current output does not supply a confidence interval, so do not infer or advertise one.

Inputs and parameter meaning

Enter raw numerical observations separated by commas, spaces, or line breaks. Keep the measurement unit consistent and include every observation selected by the stated rule. The calculator obtains n and the sample mean from these values.

Set μ₀ to the mean asserted under the null hypothesis and σ to the known population standard deviation in the same unit. σ must describe individual observations, not the standard error of the sample mean. The calculator divides σ by sqrt(n) internally.

Set α before calculation. A common value such as 0.05 is a decision threshold, not a guarantee of truth or practical importance. Match the tail option to the written alternative; changing tails after viewing the sign of z invalidates the planned error rate.

Formula, hypotheses, and assumptions

z=xˉμ0σ/nz = \frac{\bar{x} - \mu_0}{\sigma / \sqrt{n}}

Conditions to review

  • Population standard deviation is known
  • Sample is randomly selected
  • Population is normally distributed or n ≥ 30

Calculator parameters

  • Significance Level (α): default 0.05.
  • Population Mean (μ₀): default 0.
  • Population Standard Deviation (σ): default 1.
  • Test Type: default Two-tailed.

What the method is doing

The null is H₀:μ=μ₀. The two-sided alternative is μ≠μ₀; the directional alternatives are μ>μ₀ or μ<μ₀. The statistic z=(x̄−μ₀)/(σ/sqrt(n)) compares the observed difference with sampling variability expected under H₀.

Under the null and model assumptions, z follows the standard normal distribution. The p-value is the probability, assuming H₀ and the model, of a statistic at least as incompatible with H₀ as the observed statistic in the pre-specified tail or tails. It is not the probability that H₀ is true.

Worked example: checking a calibrated filling mean

A calibrated process has a known long-run individual-fill standard deviation of σ=4 mL. Ten independently sampled fills are 503, 500, 506, 498, 501, 504, 499, 505, 502, and 502 mL. Before sampling, the analyst specifies a two-sided test of H₀:μ=500 at α=0.05.

  1. 1Enter the ten values, population mean 500, population standard deviation 4, alpha 0.05, and Two-tailed. The sample mean is 502.0 mL and the known standard error is 4/sqrt(10), about 1.265 mL.
  2. 2The statistic is z=(502−500)/1.265≈1.58. A two-sided standard-normal tail beyond |1.58| produces a p-value around 0.114, which is above 0.05.
  3. 3The calculation therefore fails to reject H₀ at the chosen threshold. The observed two-milliliter difference is not sufficiently unusual relative to the known process spread and this sample size under the planned rule.

Interpretation

The data do not provide strong enough evidence, at α=0.05, that the population mean differs from 500 mL. This is not evidence that the mean is exactly 500 and not a process-capability assessment. The known-σ claim, sampling independence, measurement calibration, and operational importance of a two-milliliter shift must be considered separately.

Common mistakes

  • Calling historical σ “known” without checking whether the process and measurement system are unchanged can make the test overconfident. External knowledge must apply to the current population.
  • Choosing a one-sided test because the observed mean moved in that direction doubles the evidential advantage after the fact. Tail direction belongs in the analysis plan.
  • Statistical significance is not practical significance. A tiny mean shift can become significant at large n, while an operationally important shift may remain uncertain in a small sample.

Limits and independent validation

The calculator does not diagnose normality, independence, process stability, sampling bias, or outliers. It also does not estimate σ, confidence intervals, power, or required sample size.

The result is sensitive to treating observations as independent. Clustered or serially correlated measurements usually have a larger effective standard error than the formula uses.

Before using the result

  • Write H₀, the alternative, α, and the source of σ before entering data. Plot observations in collection order and inspect the sampling process for dependence or drift.
  • Independently compute x̄, σ/sqrt(n), and z, then compare the p-value with a standard-normal implementation. Report the test, tail, n, z, p-value, α, and a cautious conclusion in context.

See every option in the Statistical Hypothesis Test Calculator or review the DistriScope methodology. Educational information; last reviewed 2026-08-06. Verify consequential calculations independently.