Two proportion z test

Two Sample proportion Z-Test

Video One sample proportion calculator

Calcualate h effect size


Information

Target: To check if the difference between the probability of succees (p) of two groups (populations) is significant, using sample data
Hypotheses
H0: p1 = p2
H1: p1 < > p2
Test statistic
Z statistic
Normal distribution
z distribution left tailed z distribution two tailed z distribution right tailed

When using continuity correction

The correction adjust the statistic toward the zero.
p1 < p2: F = 1.
p1 > p2: F = -1.
p1 = p2: F = 0.

Cont =F(1+1)
2n1n2

The continuity correction cannot change the direction of the statistic i.e. correct positive statistic to negative, or vice versa.
Cont = Min(Cont,Abs(p1 - p2)).

Z =1 - p̂2 + Cont
√( p̂(1-p̂)(1/n1 + 1/n2) )

Assumptions

Normal DistributionBinomial distribution - the probability for event within each group is identical
difference dExpected difference d between the populations's average is known
Required Sample Data
p1, p̂2 the sample probabilities or x1, x2 the number of successes
sample sizen1,n2 - Sample size of group1 and group2

R Code

The following R code should produce the same results:

The prop.test uses the Chi-squared statistic with one degree of freedom, which is exactly as using the Z test: z22(1)