Z-Test Calculator for Sample Mean
This calculator performs a Z-test to determine whether a sample mean is significantly different from a known population mean. This test is used when the population standard deviation (σ) is known.
When to Use
Use the Z-test for sample mean when you want to compare your sample mean to a known or hypothesized population mean, and you know the population standard deviation (not the sample standard deviation).
⚠️ Important Distinction
The Z-test requires a known population standard deviation (σ). In practice, this is rare — you typically don't know the true population SD. When σ is unknown, use the one-sample t-test instead.
Requirements
- Sample is randomly selected
- Population standard deviation (σ) is known
- Data is normally distributed, OR sample size is large (n ≥ 30)
Examples
- Testing if a manufacturing process mean differs from a known specification
- Comparing test scores to a national standard with known SD
- Quality control when population parameters are established
Null Hypothesis
H₀: μ = μ₀ (the sample comes from a population with mean equal to the hypothesized value)
Formula
z = (x̄ - μ₀) / (σ / √n)
Where:
- x̄ = sample mean
- μ₀ = hypothesized population mean
- σ = population standard deviation (known!)
- n = sample size
Z-Test vs T-Test
| Feature | Z-Test | T-Test |
|---|---|---|
| Population SD (σ) | Known | Unknown (estimated from sample) |
| Distribution | Standard Normal | Student's t-distribution |
| Sample size | Any (with normal data) | Any (with normal data) |
| Common in practice? | Rare | Very common |