Z-Test Calculator
Perform one-sample and two-sample Z-tests for means and proportions with exact p-values, critical boundaries, and confidence intervals.
Test if a sample mean significantly differs from a known population mean (known σ).
Interactive, data-driven visualization computed from your current input values.
Standard Normal Sampling Distribution (Z)
H₀: μ = 100 vs H₁ (two-tailed). Observed Z = 2
Step-by-Step Mathematical Derivation
Detailed derivation with exact formulas, user input substitutions, and statistical interpretations.
Calculate Standard Error of the Mean
The standard error quantifies the expected dispersion of sample means around the true population mean.
Compute Mean Difference
Determines the observed difference between the sample mean and the hypothesized baseline parameter.
Compute Z-Score Test Statistic
The sample mean is 2 standard errors above the hypothesized population mean.
Calculate P-Value & Critical Values
For a two-tailed test with significance threshold α = 0.05, the p-value is 0.0455. Since p < α, this result is statistically significant.
95% Confidence Interval for Population Mean
We are 95% confident that the true population mean μ lies between 100.1 and 109.9.
Evaluation & Analysis Guidelines
- Population standard deviation σ is known
- Sample size n ≥ 30 or population normally distributed
- Observations are independent
Z-Test Methodology & Formulas
Statistical formulations for one-sample and two-sample Z-tests, standard errors, and standard normal integrals.
One-Sample Mean Z-Test Formula
Measures how many standard errors the sample mean x̄ is away from the hypothesized mean μ₀. Valid when population standard deviation σ is known and the sample size is large (n ≥ 30) or the population is normally distributed.
Two-Sample Independent Z-Test Formula
Determines whether the difference between two population means is statistically significant when both population standard deviations σ₁ and σ₂ are known.
One-Sample Proportion Z-Test Formula
Tests whether an observed sample proportion p̂ = x/n differs significantly from a hypothesized proportion p₀ under normal approximation conditions (np₀ ≥ 5, n(1-p₀) ≥ 5).
Step-by-Step Guide: Conducting One-Sample, Two-Sample & Proportion Z-Tests
Z-tests quantify how many standard errors a sample mean or proportion deviates from a null hypothesis baseline under the standard normal N(0, 1) distribution.
- 1
Choose Your Test Mode (One Mean, Two Means, or One Proportion)
Use One-Sample Mean when comparing a cohort average against a target μ₀; Two-Sample Means when comparing two independent populations with known σ₁, σ₂; or One-Proportion for binomial success counts.
- 2
Specify Alternative Hypothesis Direction (Tail) & Significance α
Select Two-tailed (≠) unless prior experimental design specifically dictates testing only an increase (Right-tailed) or decrease (Left-tailed).
- 3
Compare Observed Z, P-Value & Interactive Shaded Curve
Inspect the shaded normal tail integral directly against your orange critical boundaries (±z_crit) and review the companion confidence interval.
Standard Normal (Z) Critical Value & Rejection Threshold Reference
Exact critical Z boundaries for the three standard significance levels across two-tailed and one-tailed hypotheses.
| Significance Level (α) | Confidence Level | Two-Tailed Critical Z (±) | One-Tailed Critical Z | Decision Threshold |
|---|---|---|---|---|
| α = 0.10 | 90% | ±1.6449 | +1.2816 or −1.2816 | Reject H₀ if |Z| > 1.645 (2-tail) |
| α = 0.05 | 95% | ±1.9600 | +1.6449 or −1.6449 | Reject H₀ if |Z| > 1.960 (2-tail) |
| α = 0.01 | 99% | ±2.5758 | +2.3263 or −2.3263 | Reject H₀ if |Z| > 2.576 (2-tail) |
| α = 0.001 | 99.9% | ±3.2905 | +3.0902 or −3.0902 | Strong confirmatory evidence |
Statistical Assumptions & When NOT to Use a Z-Test
Unknown Population Standard Deviation (σ)
In real experiments, true population σ is rarely known. Whenever you estimate spread from your sample data (s) rather than known population σ, switch to the Student's / Welch's T-Test Calculator.
Small-Sample Normality Requirement
For small samples (n < 30), mean Z-tests assume the underlying population itself follows a normal distribution; proportion Z-tests require np₀ ≥ 5 and n(1 − p₀) ≥ 5.
Z-Test Calculator — Worked Examples
Real-world scenarios and verified benchmark inputs for the Z-Test Calculator.
Quality Control Mean Benchmark
Testing whether 36 precision bolts (x̄ = 105 mm, σ = 15 mm) deviate from a 100 mm target specification.
Two-Batch Manufacturing Comparison
Comparing mean tensile scores across Batch A (x̄₁ = 108, σ₁ = 12, n₁ = 40) and Batch B (x̄₂ = 100, σ₂ = 15, n₂ = 45).
Proportion Response Rate Test
Evaluating whether 65 favorable responses out of 100 sampled users differs significantly from a 50% baseline.
Z-Test Calculator — Frequently Asked Questions
Frequently asked questions regarding Z-tests, normal assumptions, critical rejection regions, and p-values.
When should I use a Z-test instead of a T-test?
Use a Z-test when the population standard deviation (σ) is known in advance and either the population is normally distributed or the sample size is large (n ≥ 30 by the Central Limit Theorem). If σ is unknown and must be estimated from your sample standard deviation (s), use a Student's or Welch's T-test instead.
What is the difference between a one-tailed and two-tailed Z-test?
A two-tailed test checks for a statistically significant difference in either direction (above or below H₀), splitting α equally between both tails (e.g., ±1.96 at α = 0.05). A one-tailed test commits your entire significance threshold α to one pre-specified direction (e.g., +1.645 right-tailed or -1.645 left-tailed).
What sample size assumptions apply to a one-proportion Z-test?
For the normal approximation of a binomial proportion to hold accurately, check the success-failure condition under the null hypothesis: both n·p₀ ≥ 5 (or ≥ 10 for stricter benchmarks) and n·(1 − p₀) ≥ 5. For very small samples or extreme proportions near 0 or 1, exact binomial tests are preferred.
How does increasing sample size (n) change the Z-score and p-value?
Standard error equals σ / √n, so increasing n reduces the standard error and shrinks the confidence interval width. Even a small raw difference between sample mean and population mean yields a larger |Z| and smaller p-value as n grows, which is why practical significance matters alongside statistical significance.
What is the critical Z-value for 90%, 95%, and 99% confidence?
For standard two-tailed hypothesis tests, critical Z boundaries are ±1.6449 at α = 0.10 (90% confidence), ±1.9600 at α = 0.05 (95% confidence), and ±2.5758 at α = 0.01 (99% confidence).
Why does the one-proportion confidence interval differ slightly from the Z-test SE?
When testing H₀: p = p₀, the standard error is computed using the null hypothesized proportion p₀ because we evaluate surprise under the assumption H₀ is true. When building a confidence interval around the observed estimate, standard error uses the sample proportion p̂.
Related Calculators
Explore connected statistics & probability and related computation tools.