Bayesian Two-Arm Design Calculator

Sizes a randomized two-arm Bayesian trial for superiority or non-inferiority, where the decision is based on the posterior probability that the treatment difference favors the experimental arm (beyond the non-inferiority margin, where applicable). Operating characteristics are estimated by Monte Carlo simulation with configurable allocation.

How it works

The tool places priors on each arm's parameter, updates them with simulated data, and declares success when the posterior probability of the target comparison exceeds the decision threshold. Repeating this over many simulated datasets under the null and the design alternative gives the probability of declaring success in each scenario, which drives the sample-size choice. Superiority and non-inferiority (with a specified margin) and unequal allocation are supported.

When to use it

  • You are designing a randomized two-arm trial and want a posterior-probability decision rule.
  • Your objective is superiority or non-inferiority against a pre-specified margin.
  • You want simulated operating characteristics under different true effects to size the trial.

Assumptions & limitations

  • The posterior decision threshold is not itself a frequentist type I error rate; the simulated probability of success under the null characterizes the error rate and should be reported and, if a target is required, calibrated.
  • For non-inferiority, conclusions are only as sound as the justification of the margin.
  • Results depend on the priors for both arms; prior sensitivity should be examined.
  • Simulated operating characteristics describe expected behavior across trials under the modeled assumptions, not a guarantee for a single realized trial.

For the full methodology, derivation, and worked examples, read the complete guide.

Loading...