validation message

Hypotheses

H_{0}: p_{1} ≥ = ≤ p_{2}

H_{1}: p_{1} < ≠ > p_{2}

Test statistic

Normal distribution

The correction adjust the statistic toward the zero.

p_{1} < p_{2}: F = 1.

p_{1} > p_{2}: F = -1.

p_{1} = p_{2}: F = 0.

Cont = | F | ( | 1 | + | 1 | ) |

2 | n_{1} | n_{2} |

The continuity correction cannot change the direction of the statistic i.e. correct positive statistic to negative, or vice versa.

Cont = Min(Cont,Abs(p_{1} - p_{2})).

Z = | p̂_{1} - p̂_{2} + Cont |

√( p̂(1-p̂)(1/n_{1} + 1/n_{2}) ) |

Binomial distribution - the probability for event within each group is identical | |

Expected difference d between the populations's average is known |

p̂_{1}, p̂_{2} the sample probabilities or x_{1}, x_{2} the number of successes | |

n_{1},n_{2} - Sample size of group1 and group2 |

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: z^{2}=χ^{2}(1)