Proportions: One and Two Groups
Calculates the sample size required to test a specified relative risk between two independent proportions using the Farrington & Manning likelihood-score test and its large-sample normal approximation. Supports two-sided, upper-tailed, and lower-tailed hypotheses and unequal group allocation. Runs entirely in your browser.
This calculator tests the ratio of two independent binomial proportions. Let P1 denote the treatment or experimental-group proportion and P2 the reference-group proportion. The relative risk is RR = P1 / P2.
this method describes the Farrington & Manning test as using the ordinary maximum-likelihood estimates in the numerator while using estimates constrained to the null ratio in the variance calculation. For a specified null ratio R0, the constrained estimates satisfy P̃1 = R0P̃2.
For sample-size determination, the calculator uses the alternative proportions implied by the reference risk and the alternative risk ratio: P1,1 = R1P2. The null-group proportion is P1,0 = R0P2.
The required group-1 sample size is found numerically. For each candidate N1, the calculator sets N2 according to the specified allocation ratio, computes the constrained null variance, evaluates the large-sample power of the selected one- or two-sided test, and selects the smallest integer N1 whose power reaches the requested target.
The calculation assumes independent observations, binomial outcomes, fixed expected proportions, and sufficiently large samples for the normal approximation to be appropriate. Small expected cell counts can make the asymptotic calculation less reliable; exact or enumeration-based methods may be preferable in such settings.
the published Example 2 uses a one-sided test with P2 = 0.65, R0 = 1.1, R1 = 1.2, α = 0.025, power = 0.80, and equal allocation. This yields N1 = N2 = 831, total N = 1,662, with actual normal-approximation power of 0.80013.