Statistical Calculators › Proportions: One and Two Groups › Odds Ratio Test Sample Size
← All Calculators

Proportions: One and Two Groups

Odds Ratio Test Sample Size

Calculate the sample size required to detect a specified odds ratio between two independent proportions at a chosen significance level and statistical power. Uses the normal-approximation two-proportion sample-size calculation with the odds ratio converted to the corresponding alternative proportion.

Study Design

Enter the baseline event proportion, target odds ratio, alpha, power, and allocation between the two independent groups.
OR = 1 represents the null hypothesis. Values above 1 indicate higher odds in Group 1; values below 1 indicate lower odds.
Enter the expected event proportion in the reference/control group.
A value of 1 gives equal allocation. For example, 2 means twice as many subjects in Group 2 as in Group 1.

Required Sample Size

The result is based on the specified odds ratio and its corresponding pair of alternative proportions.
Enter study assumptions and click Calculate Sample Size.

Methodology

This calculator implements the normal-approximation sample-size method used for tests of two independent proportions when the effect is expressed as an odds ratio. this method describes its two-proportion procedure as computing power and sample size for hypothesis tests expressed in terms of the difference, ratio, or odds ratio of two independent proportions.

1. Convert the Odds Ratio to the Alternative Proportion

Let p2 be the expected proportion in Group 2 and let OR be the alternative odds ratio. The corresponding Group 1 proportion is obtained from the definition of the odds ratio:

p1 = OR × p2 / [1 + p2(OR − 1)]

This guarantees that the two proportions have the specified odds ratio:

OR = [p1 / (1 − p1)] / [p2 / (1 − p2)]

2. Calculate the Pooled Proportion

If k = N2/N1 is the Group 2 to Group 1 allocation ratio, the weighted pooled proportion is:

p̄ = (p1 + k p2) / (1 + k)

3. Calculate the Unrounded Group 1 Sample Size

For a two-sided test, the normal-approximation sample size for Group 1 is:

n1 = [ z1−α/2 √{(1 + 1/k)p̄(1−p̄)} + z1−β √{p1(1−p1) + p2(1−p2)/k} ]² / (p1−p2)²

Here, β = 1 − power. The required Group 2 sample size before integer rounding is:

n2 = k n1

The calculator rounds each group size upward to the next whole subject. The displayed total is the sum of the two rounded group sizes.

Interpretation

Validation Example

the relevant methodological literature provides a worked sample-size example using a two-sided alpha of 0.05, 90% power, equal allocation, Group 1 proportion 0.54, and Group 2 proportion 0.44. Expressing the same alternative through the odds ratio gives OR = 1.494. This yields 524 subjects in each group, for a total sample size of 1,048.

Alpha = 0.05  ·  Power = 0.90  ·  OR = 1.494  ·  p2 = 0.44  ·  N2/N1 = 1

Derived p1 ≈ 0.5400  ·  n1 = 524  ·  n2 = 524  ·  N = 1,048

The implementation reproduces this this method validation target using the unrounded normal-approximation calculation before rounding the group sample sizes upward.

References

the software, LLC / this method Sample Size Software. Tests for Two Proportions. the relevant methodological literature, Chapter 200. The procedure computes power and sample size for tests of the difference, ratio, or odds ratio of two independent proportions and provides the worked example used for validation.

Armitage, P., Berry, G., & Matthews, J.N.S. (2002). Statistical Methods in Medical Research, 4th ed. Blackwell Science. The normal-approximation two-proportion framework is also documented in the published sample-size treatment referenced by statistical software implementations.

For additional background, see the official the relevant methodological literature for two-proportion sample-size procedures .

Clinical Trials

Real trials behind this calculation

See the analysis this calculator plans for applied to published trial results, with the estimates, confidence intervals and interpretation explained.

SOCRATES
Independent statistical analysis of the SOCRATES phase 3 trial of ticagrelor versus acetylsalicylic acid after acute ischaemic stroke or transient ischaemic attack,…
Phase 3 · n = 13,307
ORIGIN
Complete statistical analysis of the ORIGIN phase 3 trial, including its factorial design, cardiovascular and diabetes endpoints, Cox and log-rank methods, odds…
Phase 3 · n = 12,537
ASPIRIN
Independent statistical analysis of Aspirin Supplementation for Pregnancy Indicated Risk Reduction In Nulliparas (ASPIRIN): primary endpoint results, effect estimate with confidence interval,…
Phase NA · n = 11,976
ACTIV-6: COVID-19 Study of Repurposed Medications: Complete Statistical Analysis
Independent statistical analysis of ACTIV-6: COVID-19 Study of Repurposed Medications: primary endpoint results, effect estimate with confidence interval, sample-size planning illustration, and…
Phase 3 · n = 10,956
A Study to Evaluate Denosumab in the Treatment of Postmenopausal Osteoporosis: Complete Statistical Analysis
Independent statistical analysis of A Study to Evaluate Denosumab in the Treatment of Postmenopausal Osteoporosis: primary endpoint results, effect estimate with confidence…
Phase 3 · n = 7,808
FIDELIO-DKD
Independent statistical analysis of Efficacy and Safety of Finerenone in Subjects With Type 2 Diabetes Mellitus and Diabetic Kidney Disease: primary endpoint…
Phase 3 · n = 5,734
See all 2,963 trials using odds ratio →
Clinical Biostats