Two Sample Z Test Calculator

Compare two samples with clear z testing. Enter means, deviations, sizes, and hypothesis difference values. Review p values, intervals, effect size, and decisions today.

Calculator

CSV and PDF reports appear after calculation.

Formula Used

The calculator uses the two sample z test for independent means with known population deviations.

Difference: x̄₁ − x̄₂

Standard Error: √((σ₁² / n₁) + (σ₂² / n₂))

Z Score: ((x̄₁ − x̄₂) − Δ₀) / Standard Error

Confidence Interval: Difference ± z critical × Standard Error

Effect Size: Difference / √((σ₁² + σ₂²) / 2)

How to Use This Calculator

  1. Enter the mean for each independent sample.
  2. Enter the known population deviation for each group.
  3. Enter both sample sizes as whole numbers.
  4. Set the hypothesized difference. Use zero for equality.
  5. Choose a two tailed, left tailed, or right tailed test.
  6. Enter the confidence level for the interval.
  7. Press the calculate button and review the result above the form.
  8. Use the CSV or PDF button when you need a saved report.

Example Data Table

Case Mean 1 Mean 2 Deviation 1 Deviation 2 n1 n2 Test
Exam Scores 82 78 12 10 64 60 Two tailed
Plant Growth 15.4 13.9 3.2 2.9 45 48 Right tailed
Process Time 21.5 23.1 4.4 4.8 80 76 Left tailed

Understanding a Two Sample Z Test

A two sample z test compares two independent sample averages. It checks whether their observed difference is large enough to suggest a real population difference. The method works best when population standard deviations are known. It also needs independent samples and suitable sample sizes.

The calculator focuses on mean differences. It accepts each sample mean, each known deviation, and each sample size. It also accepts a hypothesized difference. This value is often zero. A zero value tests whether both population means are equal.

The tool supports two tailed, left tailed, and right tailed alternatives. A two tailed test looks for any difference. A left tailed test checks whether sample one is lower. A right tailed test checks whether sample one is higher. These choices change the p value and decision rule.

The z score measures distance from the null difference. It uses standard error as the measuring unit. A large absolute z score means the sample difference is unusual under the null. The p value then shows how unusual the result is.

Confidence intervals add another view. They estimate a likely range for the true difference. If a two sided interval excludes the null difference, it usually matches a significant two tailed test. Wider intervals show more uncertainty.

This calculator also reports an effect size. It standardizes the observed difference. This helps compare results across different measurement units. A statistically significant result may still be small in practical terms. Effect size helps reveal that gap.

Use the output with context. Check data quality before trusting the result. Confirm that samples are unrelated unless your design requires pairing. A paired design needs a different method. Also avoid using the z test when population deviations are unknown and samples are small. In that case, a two sample t test is usually more suitable.

The example table shows common inputs and outputs. It helps users verify the flow. The CSV and PDF buttons make reports easier to save. They are useful for class work, dashboards, and repeated analyses.

Keep every input in the same unit. Means and deviations must match. Sample counts must be positive whole numbers. Rounding may slightly change values, but not the main conclusion.

FAQs

What is a two sample z test?

It is a hypothesis test for comparing two independent population means. It uses sample means, known population deviations, and sample sizes to produce a z score and p value.

When should I use this calculator?

Use it when both groups are independent, population deviations are known, and you want to test a difference between two population means.

What does the p value mean?

The p value shows how likely the observed difference is under the null hypothesis. Smaller values give stronger evidence against the null claim.

What does a two tailed test check?

A two tailed test checks whether the two population means differ in either direction. It does not assume one mean must be larger.

What is the hypothesized difference?

It is the difference stated by the null hypothesis. Most tests use zero, which means the two population means are assumed equal.

Why are known deviations required?

A z test uses population standard deviations in the standard error. When those deviations are unknown, a two sample t test is usually preferred.

What does the confidence interval show?

It gives a likely range for the true difference between population means. Wider intervals indicate more uncertainty in the estimate.

Can I export the result?

Yes. After calculation, use the CSV button for spreadsheet data or the PDF button for a simple saved report.

Related Calculators

Paver Sand Bedding Calculator (depth-based)Paver Edge Restraint Length & Cost CalculatorPaver Sealer Quantity & Cost CalculatorExcavation Hauling Loads Calculator (truck loads)Soil Disposal Fee CalculatorSite Leveling Cost CalculatorCompaction Passes Time & Cost CalculatorPlate Compactor Rental Cost CalculatorGravel Volume Calculator (yards/tons)Gravel Weight Calculator (by material type)

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.