Two-Sample Z-Test Statistic
Worked example: means 82 vs 76, sigma 10 each, n 25 and 20 → z = 2. Press Try an example to run it live, then adjust anything.
Enter your known values, leave one input blank, and solves for the missing one. Tap a variable’s symbol to see what it means, with a typical value.
See also
One-Sample Z-Test Statistic: Both use test statistic and sample mean.Confidence Interval Lower Limit: Both use sample mean and standard deviation.Confidence Interval Upper Limit: Both use sample mean and standard deviation.One-Sample T-Test Statistic: Both use sample mean and standard deviation.Z-Score (Standard Score): Both use test statistic and standard deviation.Weighted Mean of Two Groups: Both use sample mean and sample size.Two-Sample Z-Test Statistic explained
To compare two independent groups you need the standard error of the difference, and variances of independent quantities add: σ₁²/n₁ + σ₂²/n₂. Take the square root, divide the gap between the means by it, and you have a z that is read against the normal table exactly like a one-sample test. Two production lines averaging 82 and 76 with σ = 10 each and samples of 25 and 20 give a standard error of √(4 + 5) = 3, so z = 6/3 = 2.0, just past the two-sided 5% cutoff.
The mistake to avoid is averaging the two standard errors, or worse, comparing each group's confidence interval and concluding "they overlap, so no difference". Overlapping intervals frequently hide a significant difference, because the error on the gap is smaller than the sum of the individual errors. Note also that the smaller group dominates the denominator: with n₁ = 25 and n₂ = 20 above, shrinking group 2 to 5 observations would push the standard error from 3 to 4.9 and kill the result outright, no matter how large group 1 grew. Balance your groups when you can.
Two-Sample Z-Test Statistic formula
- = Test statistic
- = Mean of sample 1
- = Mean of sample 2
- = Standard deviation 1
- = Size of sample 1
- = Standard deviation 2
- = Size of sample 2
Cite this page
formula.expert. (2026, October 31). Two-Sample Z-Test Statistic Formula & Calculator. https://formula.expert/solvers/two-sample-z-test