Interactive module guide

One Sample Z Test Calculator — Free & Interactive

This one sample z test calculator evaluates a population mean when the population standard deviation is known independently of the sample.

Open calculator

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

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.

Use the one sample z test calculator only when the population standard deviation is known from an independent source; otherwise, choose the corresponding t test.

When to use this one sample z test calculator

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.

Example preview

One-sample mean with known σ

Inputs
n=10, x̄=502, μ₀=500, σ=4; two-sided Z test.
Representative result
z≈1.58 and p≈0.114.

Illustrative only. Load the interactive tool to enter your own values and review assumptions.

Watch the explanation

4:07 min

The player loads only after you press play. You can also watch on YouTube.

Read the complete transcript

The One-Sample z-Test. Is a two-milliliter shift unusual when process spread is known?

A one sample z-test evaluates whether a population mean is compatible with a specified value when the population standard deviation sigma 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 sigma must be estimated.

The null is H naught, mu equals mu naught. The two-sided alternative is mu not equal to mu naught; the directional alternatives are mu greater than mu naught or mu less than mu naught. The statistic z divides x bar minus mu naught by sigma divided by the square root of n, comparing the observed difference with null-model sampling variability. Under the null and model assumptions, z follows the standard normal distribution. The p-value is the probability, assuming H naught and the model, of a statistic at least as incompatible with H naught as the observed statistic in the pre-specified tail or tails. It is not the probability that H naught is true. Use the test for one numerical sample, one pre-specified population mean mu naught, and a defensible population standard deviation supplied by design, calibration, or reliable external knowledge. Observations should be independent under the sampling or assignment process. The sign of z gives direction relative to mu naught; its magnitude gives standardized distance. Degrees of freedom are not needed because sigma is treated as known. The critical value is another representation of the alpha rule, while the p-value reports how extreme the observed statistic is under the null model. If p less than or equal to alpha, reject H naught at that threshold and describe evidence for the stated alternative. If p greater than alpha, fail to reject H naught; 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.

A calibrated process has a known long-run individual-fill standard deviation of sigma equals 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 naught, mu equals 500 at alpha equals 0.05. Enter 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 divided by square root of 10, about 1.265 mL. The difference, 502 minus 500, divided by 1.265 gives z approximately 1.58. A two-sided standard-normal tail beyond z equals positive or negative 1.58 produces a p-value around 0.114, which is above 0.05. The calculation therefore fails to reject H naught 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.

The data do not provide strong enough evidence, at alpha equals 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-sigma claim, sampling independence, measurement calibration, and operational importance of a two-milliliter shift must be considered separately.

Try it free at Distri Scope dot com.

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. Use the displayed known-σ confidence interval to communicate compatible mean values.

How to use the one sample z test calculator

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, and it does not estimate σ. Its confidence interval treats the supplied σ as known; prospective power and required sample size are handled by the separate planning utility.

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-09. Verify consequential calculations independently.