Two Sample Z Test Calculator
Use this two sample z test calculator to compare two independent population means when both population standard deviations are known. Enter raw data or summary data to find the z statistic and p-value.
Sample 1
Sample 2
How to Use the Two Sample Z Test Calculator
The Two Sample Z Test is used to compare the means of two independent groups when the population standard deviations are known.
- Select the Alternative Hypothesis (H₁) based on the direction of your test (Two-tailed, Left-tailed, Right-tailed).
- Set your Significance Level (α) (usually 0.05).
- Enter the Hypothesized Difference (μ₁ - μ₂). This is almost always 0.
- Choose Summary Data or Raw Data. Even for raw data, you must provide the known population standard deviations (σ₁ and σ₂).
- Click Calculate to compute the z-statistic, p-value, and see a step-by-step solution.
What is a Two Sample Z Test?
A two-sample z-test is a statistical hypothesis test used to check whether the unknown population means of two groups are equal or not, specifically when the population standard deviations are known and the sample sizes are sufficiently large. If the population standard deviations are unknown and estimated from the samples, a two-sample t-test should be used instead.
Two Sample Z-Test Formula
Standard Error (SE)
Because the population standard deviations (σ) are known, the standard error of the difference between the two means is calculated directly without needing to pool variances:
Test Statistic (z)
The test statistic follows a standard normal distribution:
Assumptions for the Two Sample Z Test
- Independence: The two samples must be independent of each other (different subjects in each group).
- Known Variances: The population standard deviations (σ₁ and σ₂) must be known.
- Normality: The data in both populations should be normally distributed, or the sample sizes should be sufficiently large (usually n > 30) for the Central Limit Theorem to apply.