One-Sample Z-Test Calculator

Perform a one sample z-test using summary data or raw data when the population standard deviation is known, and get the z statistic, p-value, critical value, and a step-by-step solution.

Data Input Type

How to Use the One-Sample Z-Test Calculator

  1. Select the Alternative Hypothesis: μ ≠ μ₀, μ > μ₀, or μ < μ₀.
  2. Choose Summary Data and enter x̄, σ, n, and μ₀. Or choose Raw Data, enter σ and your observations.
  3. Set the Significance Level (α), then click Calculate.

What is a One-Sample Z-Test?

A one-sample z-test is a hypothesis test used to determine whether the mean of a population equals a hypothesized value (μ₀), when the population standard deviation (σ) is known. Unlike the t-test, no degrees of freedom are needed because the z-distribution is fully specified.

One-Sample Z-Test Formula

z = (x̄ − μ₀) / (σ / √n)

Where:

  • x̄ = sample mean
  • μ₀ = hypothesized population mean
  • σ = known population standard deviation
  • n = sample size

How to Do a One-Sample Z-Test

  1. State H₀ (μ = μ₀) and H₁ (μ ≠/>/< μ₀).
  2. Compute SE = σ / √n.
  3. Compute z = (x̄ − μ₀) / SE.
  4. Find the p-value from the standard normal distribution.
  5. Compare p-value to α. Reject H₀ if p < α.

Example

An education board claims the average IQ of students is 100 (σ = 15, known). A sample of n = 36 students has x̄ = 104. Test at α = 0.05 (two-tailed).

  • SE = 15 / √36 = 2.5
  • z = (104 − 100) / 2.5 = 1.6
  • p-value = 2 × P(Z > 1.6) ≈ 0.1096
  • Since 0.1096 > 0.05, we fail to reject H₀. No significant difference.

Frequently Asked Questions

Why must σ be known for a z-test?
The z-test uses the standard normal distribution, which requires knowing the exact SE = σ/√n. When σ is estimated from sample data, we introduce extra uncertainty that the t-distribution accounts for.

When is the z-test appropriate?
Use the z-test when: (1) σ is known, and (2) the sample size is large (n ≥ 30) or the population is normally distributed.

What if my σ is unknown?
Use the One-Sample T-Test Calculator instead.