Statistical Calculators › Proportions: One and Two Groups › Relative Risk (Risk Ratio) Test Sample Size Calculator
← All Calculators

Proportions: One and Two Groups

Relative Risk (Risk Ratio) Test Sample Size Calculator

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.

Study Design

Enter the reference-group risk, the null and alternative risk ratios, desired power, and the planned allocation.

Required Sample Size

Farrington & Manning likelihood-score test with the large-sample normal approximation.
Enter the study assumptions and click Calculate Sample Size.

Methodology

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.

Hypotheses

Two-sided: H0: P1/P2 = R0   vs.   H1: P1/P2 ≠ R0
Upper-tailed: H0: P1/P2 ≤ R0   vs.   H1: P1/P2 > R0
Lower-tailed: H0: P1/P2 ≥ R0   vs.   H1: P1/P2 < R0

Farrington & Manning likelihood-score statistic

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 = R02.

z = (P̂1 / P̂2 − R0) / √[ P̃1(1−P̃1)/N1 + R022(1−P̃2)/N2 ]

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.

Important assumptions

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.

Validation Example

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.

Validation target: P2 = 0.65  |  R0 = 1.10  |  R1 = 1.20  |  alpha = 0.025  |  power = 0.80  |  N2/N1 = 1
Expected: N1 = 831  |  N2 = 831  |  Total N = 1662  |  Actual power ≈ 0.80013

References

  1. Farrington, C. P., & Manning, G. (1990). Test Statistics and Sample Size Formulae for Comparative Binomial Trials with Null Hypothesis of Non-Zero Risk Difference or Non-Unity Relative Risk. Statistics in Medicine, 9, 1447–1454.
  2. the software, LLC. this method Sample Size Software: Non-Unity Null Tests for the Ratio of Two Proportions, Chapter 206. the relevant methodological literature describes the Farrington & Manning likelihood-score statistic, normal-approximation power calculation, and published validation examples.
  3. Chow, S. C., Shao, J., & Wang, H. (2008). Sample Size Calculations in Clinical Research, 2nd Edition. Chapman & Hall/CRC.
  4. Fleiss, J. L., Levin, B., & Paik, M. C. (2003). Statistical Methods for Rates and Proportions, 3rd Edition. John Wiley & Sons.