Skip to content
LoveToCalc

Definition — what does that mean?

Two-proportion z statistic

How far apart two sample proportions are, counted in standard errors, under the hypothesis that the population proportions are equal.

In Swedish: Teststatistika för två andelar

Z test statistic for two proportions

The relation

z=p̂₁−p̂₂n₁p̂₁+n₂p̂₂n₁+n₂(1−n₁p̂₁+n₂p̂₂n₁+n₂)(1n₁+1n₂)

How many standard errors apart two sample proportions are, when the null hypothesis says the population proportions are equal: the difference divided by the square root of the pooled p̂(1 − p̂)(1/n₁ + 1/n₂).

z≈2.124

z equals (0.6 minus 0.45) divided by the square root of (((((100 times 0.6) plus (100 times 0.45)) divided by (100 plus 100)) times (1 minus (((100 times 0.6) plus (100 times 0.45)) divided by (100 plus 100)))) times ((1 divided by 100) plus (1 divided by 100))), equals 0.15 divided by the square root of ((((60 plus 45) divided by 200) times (1 minus ((60 plus 45) divided by 200))) times (0.01 plus 0.01)), equals 0.15 divided by the square root of (((105 divided by 200) times (1 minus (105 divided by 200))) times 0.02), equals 0.15 divided by the square root of ((0.525 times (1 minus 0.525)) times 0.02), equals 0.15 divided by the square root of ((0.525 times 0.475) times 0.02), is approximately 0.15 divided by the square root of (0.2494 times 0.02), is approximately 0.15 divided by the square root of (0.005), is approximately 0.15 divided by 0.0706, is approximately 2.124

Working9 steps

Practice questions

You are given

  • p̂₁=0.5
  • p̂₂=0.58
  • n₁=300
  • n₂=200

Round to 2 decimals.

The formula

z = (p̂₁ − p̂₂) / √( p̂ (1 − p̂) (1/n₁ + 1/n₂) )

Holds for two independent random samples when n₁p̂ and n₂p̂ and their complements are all about 10 or more. The pooled proportion is p̂ = (n₁p̂₁ + n₂p̂₂)/(n₁ + n₂), the total number of successes over the total number of observations.

The null hypothesis says p₁ = p₂, so the spread is estimated from the two samples together. The confidence interval for a difference asserts no such thing and keeps the proportions apart.

Version A converts 60 of 100 visitors, version B 45 of 100: p̂ = 105/200 = 0.525, the root √(0.525 · 0.475 · 0.02) = 0.0706, and z = 0.15/0.0706 ≈ 2.12. Against 1.96 in the normal table this rejects equality at the 5% level.

Unequal sizes

30% of 200 against 20% of 300: p̂ = (60 + 60)/500 = 0.24, the root √(0.24 · 0.76 · (1/200 + 1/300)) = 0.0390, and z = 0.10/0.0390 ≈ 2.56. The pooled share is not the mean of 0.30 and 0.20, since the samples differ in size.

Common mistakes

For a single proportion against a fixed value, see the one-proportion statistic.

Looking for another letter? The formula solved for each one
Solved for each letter
Solve forRearrangedWith the numbersComes to
zp̂₁−p̂₂n₁p̂₁+n₂p̂₂n₁+n₂(1−n₁p̂₁+n₂p̂₂n₁+n₂)(1n₁+1n₂)0.6−0.45100·0.6+100·0.45100+100(1−100·0.6+100·0.45100+100)(1100+1100)2.124

Last reviewed October 11, 2026 ·How pages are reviewed

Statistics and probabilityAll formulas

Put this formula on your site

Copy the code into your page where the formula card should appear. It loads from lovetocalc.com, so it stays current on its own — all we ask is that the credit line comes with it.