—
2.738613
—
0
—
2.738613
—
0
The Z-Test Calculator performs a one-sample Z-test to determine whether a sample mean differs significantly from a known population mean when the population standard deviation is known. The Z-test is one of the most fundamental hypothesis tests in statistics, forming the basis for understanding more advanced testing procedures.
The Z-test is appropriate when you have a large sample (n ≥ 30) or when the population standard deviation is known. Common applications include quality control (testing if a manufacturing process mean has shifted), pharmaceutical testing (comparing treatment outcomes to established baselines), and educational assessment (testing if a group's performance differs from the national average).
This calculator computes the Z-statistic, standard error, approximate two-tailed p-value, and a significance decision at your chosen α level — giving you the complete picture for making a statistical inference.
The one-sample Z-test evaluates the hypotheses:
Test Statistic:
$$z = \frac{\bar{x} - \mu_0}{\sigma / \sqrt{n}}$$
where $\bar{x}$ is the sample mean, $\mu_0$ is the hypothesized population mean, $\sigma$ is the known population standard deviation, and $n$ is the sample size.
Standard Error:
$$SE = \frac{\sigma}{\sqrt{n}}$$
The p-value is computed from the standard normal CDF using the Abramowitz-Stegun polynomial approximation. For a two-tailed test, $p = 2 \cdot P(Z > |z|)$.
Decision Rule: Reject $H_0$ if $p < \alpha$, or equivalently, if $|z| > z_{\alpha/2}$. The calculator reports whether the result is significant at your chosen significance level.
The Z-Statistic measures how many standard errors the sample mean is from the hypothesized population mean. A z-value near zero suggests no difference; large |z| values suggest a significant difference.
The P-Value gives the probability of observing a z-statistic as extreme as the calculated one if H₀ is true. If p < α, the result is statistically significant and you reject H₀. The Significant indicator (1 or 0) provides the binary decision at your chosen α.
Inputs
Results
A sample of 36 people with mean IQ of 105 yields z=2.0 and p≈0.046. At α=0.05, this is significant — the sample mean is significantly higher than 100.
Inputs
Results
A production sample with mean weight 500.3g vs. target 500g yields z=0.85, p≈0.40. Not significant at α=0.01 — no evidence the process has shifted.
Use a Z-test when the population standard deviation (σ) is known and/or the sample size is large (n ≥ 30). Use a T-test when σ is unknown and estimated from the sample, especially with small samples. In practice, the T-test is more common since σ is rarely known.
The Z-test assumes: (1) the observations are independent, (2) the population standard deviation is known, (3) the sampling distribution of the mean is approximately normal (satisfied by CLT for n ≥ 30 or if the population is normal).
A negative z-statistic means the sample mean is below the hypothesized population mean. For a two-tailed test, the sign doesn't affect the conclusion since you look at |z|. For a one-tailed test, the direction matters for determining significance.
This calculator is designed for testing means. For proportions, the formula is $z = (\hat{p} - p_0) / \sqrt{p_0(1-p_0)/n}$. You could approximate it here by setting std_dev = √(p₀(1-p₀)) and using the appropriate means, but a dedicated proportion test calculator would be more appropriate.
The normal CDF is computed using a polynomial approximation (Abramowitz & Stegun) rather than exact numerical integration. The approximation is accurate to about 5 decimal places, which is sufficient for virtually all practical applications.
A non-significant result (p > α) means there is insufficient evidence to reject H₀. It does NOT mean H₀ is true — only that the data don't provide strong enough evidence against it. The difference could still exist but be too small to detect with your sample size (a power issue).
Roboculator Team
The Roboculator Team explains calculations, planning tools, and practical formulas in clear language for real-life situations.
How helpful was this calculator?
Be the first to rate!
P-Value Calculator
Statistical Inference & Hypothesis Testing
Confidence Interval Calculator
Statistical Inference & Hypothesis Testing
Margin of Error Calculator
Statistical Inference & Hypothesis Testing
Sample Size Calculator
Statistical Inference & Hypothesis Testing
Critical Value Calculator
Statistical Inference & Hypothesis Testing
One-Sample T-Test Calculator
Statistical Inference & Hypothesis Testing