Bayesian trial simulation
Set up, run, and review this analysis in Lifescio.
Supported analysis
A beta prior updates with observed successes and failures. At each look the app compares the posterior probability that response exceeds the null rate with success and futility thresholds, and simulates trials under null and alternative rates.
Supported scope: The current model assumes independent binary outcomes with a common response probability and fixed looks. Historical borrowing, delayed outcomes and randomized multi-arm designs are not included.
Prepare data and configure the analysis
Enter Null response probability and Alternative response probability as decimals. Prior alpha and Prior beta parameterize a beta prior with mean alpha/(alpha+beta). They are prior shape parameters, not significance levels.
Set maximum sample size, equally spaced looks, and posterior success/futility thresholds. The monitored quantity is the posterior probability that the response probability exceeds the null benchmark. Success threshold must exceed futility threshold. This is a single-arm binary-response simulator, with no treatment-control allocation or automatic historical-data borrowing.
Input reference (9 fields)
Enter your data and prespecified choices. Ranges include both limits. For table fields, use cell editing, Paste data, or Import CSV / TSV. Review whether the first imported row contains headings and map the source columns before applying the import. Empty numeric cells are not treated as zero. Open file is for an exported Lifescio analysis JSON file, not a spreadsheet.
| Input | Format | Allowed range |
|---|---|---|
| Null response probability | Number | 0.001–0.999 |
| Alternative response probability | Number | 0.001–0.999 |
| Maximum sample size | Whole number | 10–2000 |
| Number of equally spaced looks | Whole number | 1–10 |
| Prior alpha | Number | 0.01–100 |
| Prior beta | Number | 0.01–100 |
| Posterior success threshold | Number | 0.8–0.9999 |
| Posterior futility threshold | Number | 0.001–0.5 |
| Simulation replications | Whole number | 100–20000 |
Run and review
- Give the analysis a descriptive name and review every example value. Record units, data preparation, and planning assumptions in Reproducibility & notes. For simulations, record the seed and replication or sampling settings.
- Choose Run analysis. Resolve input errors before interpreting output. In the connected app, a run uses a saved input revision; local preview runs need the page to stay open.
- Review Diagnostics for method limitations, warnings, and available numerical checks. A completed run means computation finished; it does not establish that the assumptions fit your study.
- Use the Result table selector to inspect each output. Editing inputs does not recalculate existing results: an earlier-input notice means you need to run again to obtain matching results.
Understand the outputs
Bayesian operating characteristics reports success probability under the null and alternative, Monte Carlo standard error, simulation interval, and expected N. The null row is essential for assessing false success; the posterior threshold alone does not provide that assessment.
Stopping probabilities shows unconditional success and futility frequencies at each scheduled look. There is no futility stop at the final look. Integer rounding may combine repeated proposed look sizes, so inspect the actual N values in the output.
Troubleshooting and common mistakes
If thresholds are rejected, verify success is greater than futility and both are probability values. If the prior dominates early decisions, inspect its concentration as well as its mean.
Unexpectedly high null success requires design review, not relabeling the posterior threshold as alpha. Rerun with defensible prior and threshold alternatives and sufficient replications. Delayed responses, multiple arms, or correlated outcomes are outside this model.
After correcting inputs, run again and check that the results belong to the new input snapshot. Increasing simulation draws improves numerical precision only; it does not repair invalid data or an unsuitable model.
Save, compare, and export
In the connected app, Save analysis retains the inputs in your account. Run history lets you inspect earlier runs, each with the input revision it used. In local preview, Save analysis downloads an input file instead; download results before leaving the page.
Use Result + inputs for a JSON archive containing the completed result and its inputs, Download CSV for the selected result table, PDF report for a report, and a chart's SVG button for its figure. Table displays round to three decimals; CSV and JSON exports retain calculation precision. Use those values when assessing a result near a decision boundary.
To reopen an archive, select the matching analysis method and choose Open file. Imported inputs start a new draft; a result archive can also display its retained result. It does not attach itself to an existing account analysis or recompute the result. Save or run the imported draft when you want a new account record.