﻿Two proportion z test

# Two Sample proportion Z-Test

Video One sample proportion calculator

## 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
Normal distribution

#### 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 ) 2 n1 n2

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 = p̂1 - p̂2 + Cont √( p̂(1-p̂)(1/n1 + 1/n2) )

## Assumptions Binomial distribution - the probability for event within each group is identical Expected difference d between the populations's average is known
Required Sample Data p̂1, p̂2 the sample probabilities or x1, x2 the number of successes n1,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)