One Sample Z-Test Calculator

One Sample Z-Test Calculator

Test whether a sample mean differs from a hypothesized population mean when the population standard deviation is known, using z = (sampleMean - mu0) / (populationSD / sqrt(n)).

📌Presets

Load a realistic z-test case, then adjust the sample mean, hypothesized mean, known population SD, sample size, tail, confidence level, and alpha.

z Statistic -- standard normal score
p-Value -- selected tail area
Mean CI -- confidence interval
Decision -- compare p to alpha

Enter a sample mean, hypothesized mean, population standard deviation, and sample size to calculate the z-test.

⚙Z-Test Inputs

Short label used in the result statement.
Shown beside mean differences and intervals.
The observed mean from the sample.
The null-hypothesis population mean.
Use known sigma, not sample SD.
Standard error is sigma / sqrt(n).
Tail choice controls the p-value.
Decision rule: reject H0 when p <= alpha.
CI is for the population mean.
Controls z, p-value, CI, and SE rounding.
Difference interval centers on sampleMean - mu0.
Updates the quick reference table.

đź“‹Live Tail Breakdown Grid

Measure
Value
Formula
Tail Area
Alpha Check
Use
Mean difference
--
sampleMean - mu0
center
--
direction
Standard error
--
sigma / sqrt(n)
scale
--
denominator
Left p
--
normal CDF(z)
P(Z <= z)
--
left tests
Right p
--
1 - CDF(z)
P(Z >= z)
--
right tests
Two p
--
2 x min tails
both sides
--
two-tailed
Critical z
--
--
--
--
cutoff

📊Output Summary Cards

--standard error
--mean difference
--CI margin
--CI z critical
--left p-value
--right p-value
--two-tail p
--alpha rule

đź—„Z-Test Reference Tables

SetupUse WhenStatisticStandard ErrorP-Value Rule
One sample z-testPopulation sigma is knownz = (sampleMean - mu0) / SEsigma / sqrt(n)Normal tail area
One sample t-testPopulation sigma is unknownt = (sampleMean - mu0) / SEs / sqrt(n)Student t with df = n - 1
Right-tailed z-testQuestion asks whether mean is greaterPositive z supports H1Known sigma scalep = 1 - CDF(z)
Left-tailed z-testQuestion asks whether mean is lessNegative z supports H1Known sigma scalep = CDF(z)
Two-tailed z-testQuestion asks whether mean differsLarge abs(z) supports H1Known sigma scalep = 2 x (1 - CDF(abs(z)))
Mean confidence intervalEstimate the population meansampleMean +/- z* x SEsigma / sqrt(n)Use central z*
AlphaOne-Tail CutoffTwo-Tail CutoffCentral ConfidenceUse ForKnown Sigma Check
0.101.2821.64590%Exploratory screenssigma set before sampling
0.051.6451.96095%Common mean testsprocess SD documented
0.0251.9602.24197.5%Stricter one-tail rulesnot sample SD
0.012.3262.57699%Strict claimsstable population spread
0.0013.0903.29199.9%Very rare tail evidencenormal model suitable
ReferenceTail / ConfidenceAlphaLower zUpper zDecision Cue
CommonTwo-tail0.05-1.9601.960abs(z) >= 1.960

đź§®Formula Notes

Test statistic: z = (sampleMean - mu0) / (populationSD / sqrt(n)). The p-value is read from the standard normal distribution using the selected left, right, or two-tailed alternative.
Confidence interval: mean CI = sampleMean +/- z* x populationSD / sqrt(n), where z* is the central normal critical value for the selected confidence level.
Use known population SD. If sigma is estimated from the same sample, a one sample t-test is usually the better match.
Set the alternative first. A one-tailed z-test should be chosen before looking at whether the sample mean moved up or down.

It is a factory floor. There is a clipboard. Bottles roll along on a conveyor belt. Is it what the bottle say? It is fifty milliliters. Your sample consists of 64 bottles that average 49.8. Maybe that’s just a rounding error. Maybe it’s just some sensor glitch. Maybe it’s a real process failure.

How do you know? The one sample z-test replace your intuition with evidence and transforms a vague feeling into a statistical verdict. But only if you have the correct inputs.

How to Use the One Sample Z-Test

What’s needed? The test require knowledge of the standard deviation for the population. This means you don’t estimate the spread based off your current sample. You know the naturaly variation in the system, because you have historic data or some other sort of certified process specification.

When you guess the spread, you’re using your current sample. In that case, you should of run a t-test. Otherwise you’re assuming you know the terrain. That make a difference in the math.

That’s why the calculator above runs the numbers for you. You give it the known standard deviation. It saves you having to look up tables manualy.

How much does it matter? Let’s find out.

Plug in the mean of your sample. Plug in your target hypothesis. Plug in the standard deviation you know about. The calculator spits out the standard error, or the noise floor of your measurement. It take the population spread and divides it by the square root of the number in your sample. The bigger the sample, the more confident we feels. The error term shrinks. We can see smaller changes because they stands out against this backdrop. With ten bottle, zero point two milliliters gets lost. With a thousand bottles, it stand out.

Next, select which way the tail face. Decide before seeing results. Decide depending on what you’re asking. Worry about low values? Left-tailed test. Care about both high and low values? Two-tailed test. Violates honesty (or efficiency). Don’t get this one confused after the fact. Statistical sin. Like moving the goalposts. P-value depend on your selection. Pick the side before starting.

So what does the confidence interval provide? It is a range that includes plausible values of the true mean. Your target value falls within this range. There’s no reason to reject the null hypothesis. In other words, the data match your target. But it’s not perfectly on-target.

Then there are the critical cutoffs from the reference table. These list common alpha levels such as zero point zero five. Here you can verify your z-score and determine whether or not it cross over into rejection territory.

A stable process is where this test shines. Look, you’re monitoring call center response time. You are monitoring your manufacturing line. You are looking at standardized test scores. All of these have long histories. We know what their standard deviations looks like.

The process is new or chaotic. The known sigma is no longer real. Don’t force the z-test here. Let the history and data speaks for themselves.

That is what the z-test do. It separates noise from signal. It works off of a known baseline. It turns measurements into a decision rule. You evaluate a survey result. You audit a production run. The tool does the work. You bring the historical context. You bring the right questions.

The bottles on the belt didn’t care about your hunch. They cared about the numbers.

One Sample Z-Test Calculator