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.
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.
For the full methodology, derivation, and worked examples, read the complete guide.