Clinical Tools · Biostatistics · Bayesian Design
Bayesian Sample Size Calculator
Estimate per-arm sample size for a two-arm binary outcome trial using Beta-Binomial conjugate priors and a target posterior probability of treatment superiority.
Quick Answer
Bayesian sample size planning targets a posterior probability — such as P(treatment success rate > control | data) ≥ 0.95 — rather than frequentist power at fixed alpha. This calculator uses Beta-Binomial conjugate priors to estimate per-arm enrollment for two-arm binary trials, aligned with FDA adaptive design guidance. Priors must be pre-specified in the statistical analysis plan; final sizing requires simulation by a qualified biostatistician.
Prior: p ~ Beta(α, β) Posterior after s successes in n: Beta(α + s, β + n − s)
Simple mode — prior mean rates
Enter expected control and treatment success rates. The calculator builds Beta priors from prior strength (equivalent sample size) and finds the smallest n per arm where the approximate posterior probability of superiority meets your threshold at expected event counts.
Prior parameters — Beta(α, β) per arm
Specify conjugate Beta priors directly for control and treatment arms. Posterior updating follows Beta(α + successes, β + failures).
Bayesian vs frequentist sample size
The standard frequentist sample size calculator sizes trials on power — the probability of detecting a prespecified effect at alpha = 0.05. Bayesian planning instead asks: after collecting n patients per arm, what is the probability that the treatment success rate exceeds control, given the data and pre-specified priors?
Informative priors (for example, historical control data) can reduce required enrollment when the borrowed information is credible. Vague priors behave similarly to frequentist approaches with larger n. Both frameworks require pre-specification; switching after unblinded data is not acceptable.
FDA adaptive and Bayesian guidance
FDA's 2019 adaptive design guidance describes pre-planned modifications — sample size re-estimation, arm dropping, enrichment — based on interim data. Bayesian posterior probabilities are commonly used as interim decision metrics in Phase II and adaptive Phase III designs.
FDA also provides guidance on Bayesian statistics in medical device trials. Drug and biologic sponsors should document prior elicitation, simulation of operating characteristics, handling of multiplicity, and sensitivity to prior choice in the statistical analysis plan before regulatory interaction.
Interim analysis and adaptive enrichment for pharma BD
Business development and portfolio teams evaluate whether a trial can stop early for success, expand in a biomarker-positive subgroup, or fail fast when posterior evidence is weak. Bayesian interim metrics support go/no-go decisions at data safety monitoring board (DSMB) reviews without waiting for fixed frequentist boundaries — provided the design was simulated upfront.
Adaptive enrichment — restricting Phase III to patients who responded in Phase II — changes effective sample size and prior assumptions. BD models should align enrollment caps, posterior thresholds, and probability-of-success estimates with the biostatistics group's simulation output, not a single-point calculator result.
Method note
This calculator uses a normal approximation to independent Beta posteriors at expected success counts (rounded from n × expected rate). A simulation-lite check with 5,000 Monte Carlo draws from the posteriors is reported when n is found. Results are planning approximations only; confirm with full trial simulation.
Evidence & sources
- ICH E9: Statistical Principles for Clinical Trials
- FDA: Adaptive Designs for Clinical Trials of Drugs and Biologics (2019)
- FDA: Guidance on the Use of Bayesian Statistics in Medical Device Clinical Trials
- Competitive landscape: MetricGate Bayesian Sample Size Planning targets posterior credible-interval width and assurance for continuous effects — not two-arm Beta-Binomial superiority thresholds with conjugate priors. SmartPhlex SampleSize2Binomials simulates Type I error and power under prior elicitation for binary trials but requires Shiny navigation and lacks integrated frequentist comparison or pharma clinical-tools hub links. NovaPharmaNews offers a free two-arm Beta-Binomial planner with posterior superiority thresholds, Monte Carlo check, frequentist n comparison, and links to sample size, randomization, and CI tools.