Two Sample Z Test Statistic Calculator

Test two sample differences with flexible statistical inputs. Review z scores, p values, and intervals. Export clean results for reports, lessons, and audits today.

Calculator

Example Data Table

Case Type Group 1 Group 2 Null difference Alpha
Exam scores Means Mean 54.2, SD 8.5, n 64 Mean 50.1, SD 9.1, n 70 0 0.05
Conversion rate Proportions 86 successes, n 200 69 successes, n 190 0 0.05

Formula Used

Two means:

z = ((x̄1 - x̄2) - Δ0) / sqrt((σ1² / n1) + (σ2² / n2))

Two proportions, pooled standard error:

p̂ = (x1 + x2) / (n1 + n2)

z = ((p1 - p2) - Δ0) / sqrt(p̂(1 - p̂)(1 / n1 + 1 / n2))

Two proportions, unpooled standard error:

z = ((p1 - p2) - Δ0) / sqrt((p1(1 - p1) / n1) + (p2(1 - p2) / n2))

P value:

The p value is calculated from the standard normal distribution. The selected tail controls the final probability.

How to Use This Calculator

  1. Select whether your data are two means or two proportions.
  2. Enter group labels, sample values, and sample sizes.
  3. Enter the hypothesized difference. Use zero for most equality tests.
  4. Choose a two sided, greater than, or less than alternative.
  5. Set alpha, confidence level, and rounding precision.
  6. Press calculate and read the result above the form.
  7. Use CSV or PDF export for reports and records.

Understanding the Two Sample Z Test

A two sample z test compares two independent groups. It checks whether the observed difference is larger than ordinary sampling variation. The method is useful when population standard deviations are known, or when large samples make normal approximation reasonable. It can also compare two sample proportions.

When This Test Fits

Use this test for independent samples only. Each group should come from a separate population. The samples should be random or representative. For means, the population standard deviations should be known. For proportions, expected successes and failures should be large enough. Many analysts use at least five in each cell as a simple screening rule.

What the Calculator Measures

The calculator finds the difference between group one and group two. It subtracts the hypothesized difference. Then it divides that value by the standard error. The resulting z statistic shows how many standard errors the observed result sits from the null claim. A larger absolute z score gives stronger evidence against the null hypothesis.

Interpreting the Output

The p value answers a practical question. It estimates how unusual the result would be if the null claim were true. A small p value suggests the sample difference is not likely from chance alone. Compare the p value with alpha. If p is less than or equal to alpha, reject the null hypothesis.

Confidence Interval Use

The confidence interval gives a likely range for the true difference. For means, the interval uses the standard error from known standard deviations. For proportions, it uses the unpooled sample proportion error. If a two sided interval excludes zero, it usually matches a significant two sided test at the same level.

Advanced Options

Advanced settings help match classroom, research, and audit needs. You can select the test type, tail direction, alpha, confidence level, decimal rounding, and proportion standard error style. A pooled proportion is common for a null difference of zero. Unpooled error is better for intervals and nonzero null differences.

Good Reporting Practice

Report the sample values, standard errors, z statistic, p value, alpha, and decision. Also include the confidence interval. Mention whether the test used means or proportions. Clear reporting helps readers understand both statistical evidence and practical size.

FAQs

What is a two sample z test?

It is a hypothesis test for comparing two independent groups. It can compare means or proportions when normal approximation conditions are suitable.

When should I use the means option?

Use it when you compare two group averages. It is best when population standard deviations are known or large samples justify approximation.

When should I use the proportions option?

Use it when each group has successes and total trials. Examples include conversion rates, pass rates, defect rates, and survey shares.

What does the z statistic mean?

It shows how far the observed difference is from the null difference, measured in standard errors. Larger absolute values suggest stronger evidence.

What does the p value show?

The p value estimates how unusual the result is under the null hypothesis. Smaller p values give stronger evidence against the null claim.

Should I choose pooled or unpooled proportions?

Use pooled error for a standard two proportion test with a zero null difference. Use unpooled error for intervals or nonzero null differences.

What is a continuity correction?

It adjusts a proportion test for discrete counts. It can make the z test more conservative, especially with smaller samples.

Can I export the result?

Yes. After calculation, use the CSV button for spreadsheets. Use the PDF button for printable reports and saved summaries.

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.