Z-Test Calculator
Perform hypothesis tests for population means and proportions when the population standard deviation is known or the sample size is large (n ≥ 30).
Sample 1
Sample 2
Sample 1
Sample 2
Z-Statistic
P-Value
Critical Value(s)
Standard Error
Confidence Interval
Test Summary
Test Type
H₀
H₁
α
Z-Test Formulas
One-Sample Z-Test (Mean)
Two-Sample Z-Test (Means)
One-Sample Z-Test (Proportion)
Two-Sample Z-Test (Proportions)
where p̂ = (x₁ + x₂) / (n₁ + n₂) is the pooled sample proportion
What Is a Z-Test?
A z-test is a statistical hypothesis test that uses the standard normal distribution to determine whether a sample statistic differs significantly from a hypothesized population parameter. Z-tests are used when the population variance is known or the sample size is large enough (typically n ≥ 30) for the Central Limit Theorem to ensure the sampling distribution is approximately normal.
When to Use a Z-Test
- Known population standard deviation: The population σ is known (not estimated from the sample).
- Large sample size: When n ≥ 30, the sampling distribution of the mean is approximately normal regardless of the population distribution.
- Normal population: When the population is normally distributed, z-tests work well even with small sample sizes (provided σ is known).
- Comparing proportions: For testing population proportions with sufficiently large samples (np ≥ 5 and n(1−p) ≥ 5).
Z-Test vs. T-Test
Use a z-test when the population standard deviation is known. Use a t-test when the population standard deviation is unknown and must be estimated from the sample. For large samples (n ≥ 30), the z-distribution and t-distribution are nearly identical, making both tests appropriate.
Steps of Hypothesis Testing
1. State the Hypotheses
Define the null hypothesis (H₀) representing the status quo and the alternative hypothesis (H₁) representing the claim you want to test. Choose one-tailed or two-tailed based on the research question.
2. Choose Significance Level
Select the significance level α (commonly 0.05). This is the probability of rejecting H₀ when it is actually true (Type I error).
3. Calculate the Test Statistic
Compute the z-statistic using the appropriate formula for your test type. The z-statistic measures how many standard errors the sample statistic is from the hypothesized parameter.
4. Determine the P-Value
The p-value is the probability of observing a test statistic as extreme as (or more extreme than) the one computed, assuming H₀ is true. A smaller p-value provides stronger evidence against H₀.
5. Make a Decision
If p-value ≤ α, reject H₀ in favor of H₁. If p-value > α, fail to reject H₀. Failing to reject H₀ does not prove it is true — only that there is insufficient evidence to reject it.
Types of Alternative Hypotheses
Two-Tailed Test
H₁: μ ≠ μ₀
Tests whether the parameter is different from the hypothesized value (in either direction). The rejection region is split between both tails.
Left-Tailed Test
H₁: μ < μ₀
Tests whether the parameter is less than the hypothesized value. The rejection region is in the left tail.
Right-Tailed Test
H₁: μ > μ₀
Tests whether the parameter is greater than the hypothesized value. The rejection region is in the right tail.
Practical Examples
- Quality control: A manufacturer tests whether the mean weight of cereal boxes differs from the advertised 500g using a one-sample z-test with known production σ.
- Medical research: A researcher compares the mean blood pressure reduction between two drug groups using a two-sample z-test when population variances are known from prior large-scale studies.
- A/B testing: A website tests whether a new design increases the conversion rate (proportion of visitors who sign up) compared to the current design using a two-sample z-test for proportions.
- Political polling: A pollster tests whether the proportion of voters supporting a candidate exceeds 50% using a one-sample z-test for proportions.
References
The formulas and methods used in this calculator are based on established statistical theory:
Related Calculators
Note: This calculator uses the standard normal (z) distribution and is appropriate when the population standard deviation is known or the sample size is large (n >= 30). For small samples with unknown population variance, use a t-test instead. Always verify critical calculations with professional statistical software.
Recommended Calculator
Casio FX-991ES Plus
The professional-grade scientific calculator with 417 functions, natural display, and solar power. Perfect for students and professionals.
View on Amazon