Z-test Calculator

Provide sample data and population standard deviations to compute z-statistics for one-sample or two-sample comparisons.

Sample size: 5

Sample mean: 18.0000

Sample variance: 18.0000

Standard error: 1.7889

Z-statistic: 0.0000

How to Use This Calculator

  1. Select one-sample or two-sample z-test depending on your data.
  2. Enter sample observations (use raw data so means are computed automatically).
  3. Provide population standard deviation(s); z-tests assume known σ.
  4. Review the computed z-statistic before converting it to a p-value via the standard normal distribution.

Formula

One-sample: z = (x̄ − μ₀) / (σ / √n)

Two-sample: z = (x̄A − x̄B) / √[(σA² / nA) + (σB² / nB)]

Full Description

The z-test evaluates hypotheses when population standard deviations are known. It leverages the normal distribution to assess whether sample means significantly deviate from hypothesized values.

Use one-sample z-tests to compare a sample mean to a known population mean and two-sample z-tests to compare independent samples when σ is known.

Frequently Asked Questions

What if σ is unknown?

When population standard deviation is unknown, use the t-test with sample standard deviation.

How do I get p-values?

Use the z-statistic with the standard normal CDF to compute one- or two-tailed p-values.

Can I input summary statistics instead of raw data?

Not directly. Convert summary statistics to equivalent raw data or adapt the formulas manually.

Are z-tests robust to non-normality?

Large samples rely on the central limit theorem. For small samples and non-normal distributions, consider alternative methods.