Tutorials | 14 min read | Beginner
How to Use the BioStatHub Simon's Two-Stage Design Calculator
A step-by-step guide to the BioStatHub Simon's two-stage design calculator: enter p₀, p₁, α and power, generate and compare designs, then select, document and export one.
What This Tutorial Covers
This is a step-by-step guide to the BioStatHub calculator rather than a statistics primer. It takes one illustrative single-arm Phase II trial through the workspace: entering the assumptions, generating candidate Simon's two-stage designs, comparing them, selecting one, and documenting and exporting the decision. Every number shown comes from BioStatHub's exact calculations for the stated inputs.
The statistics behind each screen — the decision rule, how PET, expected sample size, Type I error and power are calculated, and how to choose between the designs — are worked through for the same example in the Simon's two-stage design example. For the design in general, see Simon's two-stage design explained.
Before you begin, gather four assumptions: an unacceptable response rate (p₀), a promising response rate (p₁), an acceptable type I error (α), and a target power (1 − β, entered in BioStatHub as β). You also need two operational facts: the largest number of patients your site network could realistically enroll, and whether the protocol can pause enrollment for an interim analysis. The tutorial closes with a documented, exportable design record.
Step 1: Define the Trial Assumptions
Create a study and open the Study Parameters panel. You enter the four assumptions; everything else follows from them.
Enter the null response rate (p₀) and the target response rate (p₁) under Response Assumptions; p₁ must be greater than p₀. Enter the Type I error (α) and the Type II error (β) under Statistical Criteria. BioStatHub asks for β directly and displays power = 1 − β beneath the field. The Generation Settings can usually be left at their defaults.
The assumptions used throughout this guide are illustrative — they demonstrate the workflow rather than recommend values for any particular indication:
| Parameter | Field in BioStatHub | Meaning | Illustrative value |
|---|---|---|---|
| p₀ | Null response rate | The response rate that would make the treatment uninteresting | 0.10 |
| p₁ | Target response rate | The smallest response rate worth pursuing further | 0.30 |
| α | Type I error | Largest acceptable false-positive probability | 0.05 |
| β | Type II error | Largest acceptable false-negative probability | 0.20 |
| 1 − β | Power (displayed) | Probability of declaring activity at p₁ | 0.80 |
Common parameter mistakes
The most frequent error is taking p₀ from a registry average without checking that the trial population, endpoint definition, and assessment schedule match the historical series. The second is setting p₁ so close to p₀ that the required sample size becomes infeasible. A third is importing α from a confirmatory setting without discussion: here α controls how often an inactive treatment advances to Phase III, which is a portfolio decision as much as a statistical one.
Treat the four values as a starting point you will revisit once you see what the candidates cost. Choosing assumptions and choosing a design are usually iterative.
Step 2: Generate Candidate Designs
Select Generate Designs at the top right of the workspace. BioStatHub searches every two-stage design that satisfies your α and power requirements up to the sample-size limit it is searching — 300 patients by default — and returns those on the admissible frontier rather than a single answer.
Three labels appear in the results. The Optimal design has the lowest expected sample size under p₀, the Minimax design has the lowest maximum sample size, and the Admissible designs sit between the two. All of them meet the same α and power criteria.
Read the columns as a single design rather than as independent numbers:
| Column | What it tells you |
|---|---|
| n₁ | How many patients are enrolled before the interim analysis |
| r₁ | The stage-one futility boundary: stop if the number of responses is at most r₁ |
| N | The maximum total sample size if the trial continues to stage two |
| r | The final boundary: declare activity if total responses exceed r |
| EN(p₀) | Expected sample size when the true response rate equals p₀ |
| PET(p₀) | Probability of stopping after stage one when the true response rate equals p₀ |
| Type I | Actual type I error rate achieved by the integer boundaries, at or below α |
| Power | Actual power achieved at p₁, at or above the target |
How the stopping rules work
Each row is a complete decision rule: stop after r₁ or fewer responses in the first n₁ patients, otherwise continue to N, and declare the treatment promising only if total responses exceed r. In this example every candidate uses r = 5, so six or more responses are needed. The Simon's two-stage design example explains the rule and its operating characteristics in detail.
Step 3: Compare Designs and Interpret the Results
Tick the checkboxes beside the candidates in the Overview table and select Compare selected. The Compare view puts the chosen designs side by side against a benchmark design you nominate, and shows the trade-off rather than a verdict.
In Original mode, the comparison table shows the benchmark's values and every other selected design as a difference from it. Normalized mode instead places each design among all the admissible designs for the study, from 0 (best) to 1 (worst). The table includes expected sample size under p₁ as well as under p₀, so you can see how much each design enrolls when the treatment is promising, not only when it is inactive. Type I error and power are the exact rates each design achieves; all four stay at or below α = 0.05 and at or above 0.80 power.
The two numbers that usually drive the decision are expected sample size EN(p₀) and maximum sample size N. How they, PET(p₀), Type I error and power are calculated for these designs is shown step by step in the Simon's two-stage design example.
The complete output for the worked example, rounded from BioStatHub's exact calculation, is:
| Design | n₁ / r₁ | N / r | EN(p₀) | PET(p₀) | Type I | Power |
|---|---|---|---|---|---|---|
| Minimax | 15 / 1 | 25 / 5 | 19.51 | 0.549 | 0.033 | 0.802 |
| Admissible(1) | 12 / 1 | 26 / 5 | 16.77 | 0.659 | 0.036 | 0.805 |
| Admissible(2) | 11 / 1 | 27 / 5 | 15.84 | 0.697 | 0.040 | 0.806 |
| Optimal | 10 / 1 | 29 / 5 | 15.01 | 0.736 | 0.047 | 0.805 |
Reading the charts
The Efficiency Frontier plots every candidate with EN(p₀) on the horizontal axis and maximum N on the vertical axis; designs nearer the bottom-left corner are better on both measures, and the frontier is the set from which no further improvement is possible without giving something up. Selecting a design highlights it on the frontier, which makes the cost of each step visible.
The Power & Expected Sample Size Curves and the Probability of Early Termination chart answer a different question: how sensitive is the design to being wrong about p? Power rises with the true response rate, and the PET curve falls as the treatment becomes more active. A design whose curves are steep around p₁ looks decisive, and a design whose PET stays high across a range of inactive response rates keeps stopping cheaply even if your p₀ estimate was optimistic.
Step 4: Select and Finalize a Design
Selecting a design is a judgement about which constraint binds your study. If accrual is slow, the indication is rare, or the ethics committee will scrutinise total exposure, the Minimax design's cap of 25 patients is the strongest argument. If the priority is to expose as few patients as possible when the treatment is inactive, and 29 is deliverable, the Optimal design's expected 15.01 is the better case. If both matter, the intermediate admissible designs are the defensible middle, and Admissible(1) is where most of the expected saving is available for a single extra patient.
The Study Priority selector above the table (Balanced, Minimize Expected Sample Size, Minimize Maximum Sample Size) changes which candidate is highlighted as recommended; it does not change any calculation. Treat the recommendation as a starting point for the discussion rather than the decision itself.
Select a row in the Overview table to open Design Details. Check the six metrics against your assumptions, read the trade-off summary, and expand Operating curves if you want to see how the design behaves across the whole range of response rates before committing. When you are satisfied, select Set as Final Design.
What to verify before it reaches the protocol
Confirm that the interim boundary and the final boundary are written as you intend them: stop after r₁ or fewer responses in n₁ patients, otherwise continue to N, and declare activity only if total responses exceed r. Confirm that N fits the realistic accrual and timeline, including the pause for the interim analysis. Confirm that the achieved type I error and power are the ones you are prepared to defend, and that p₀ and p₁ still match the protocol's population and endpoint.
Two further checks are worth doing with a statistician. First, ask what happens if the true response rate is between p₀ and p₁ — the operating curves show that region. Second, confirm that the design meets any sponsor, institutional, or regulatory expectation that applies to your programme, since those expectations can be stricter than the defaults used here.
BioStatHub computes and documents a design; it does not approve one. Its output is evidence for a protocol discussion, not a substitute for statistical review, ethics approval, or regulatory agreement.
Step 5: Document the Decision
Once a design is final, a Documented rationale field appears in Design Details. This is where you record why this design was chosen — the constraint that drove it, the alternatives you rejected, and any trade-off you accepted. Save rationale stores it with the study, and it is carried into the finalized protocol and the exported reports so that a reviewer can follow the reasoning without reconstructing it.
The Finalized Protocol view gathers the frozen inputs, the stopping rules, the operating curves, and the validation evidence for the selected design in one place. The Validation tab adds a Monte Carlo simulation check against the exact calculation, reporting the random seed, the maximum observed relative error, and a theoretical-versus-simulated table for type I error and power. Because the seed is recorded, the check can be repeated.
Keeping these two records together — the reason for the choice and the evidence that the design meets its criteria — is what turns a calculation into something a protocol author, a statistician, and a reviewer can all work from.
Exporting and Sharing the Record
The Export & Documentation tab is where the record leaves the workspace. Export all designs or a single design as JSON or CSV for the statistical analysis plan and any downstream analysis; export the operating characteristics to keep the exact power, expected sample size, and early-termination curves alongside the protocol; or create a read-only share link that shows co-investigators and reviewers the frozen results without an account.
Narrative PDF, Word, and LaTeX reports are available where the account has report access; where they are not, the report cards are shown as coming soon. Everything described here is the reproducible record of a design decision — the exact inputs, the boundaries, the achieved error rates, and the reason for the choice — which is what a protocol reviewer needs in order to check the design rather than take it on trust.
Key Takeaways
Simon's two-stage designs are chosen from a family, not looked up as a single answer: Optimal, Minimax, and the admissible designs between them all satisfy the same α and power criteria.
Read the interim rule and the final rule together. In this example all four candidates require six or more responses for a positive result; they differ in how many patients are exposed before the first decision and in the maximum enrollment.
Expected sample size and maximum sample size trade off directly. Lowering n₁ raises PET(p₀) and lowers the expected enrollment, but the larger stage-two cohort required to keep power increases the maximum.
Use the frontier and the operating curves to judge how sensitive the design is, then choose according to the constraint that binds your study rather than accepting a default.
Record the rationale and keep the validation evidence with the protocol. The design is only reproducible if the assumptions, boundaries, and reason for the choice travel together.
Frequently Asked Questions
Does BioStatHub choose the design for me?
No. It generates every design that meets your criteria and flags a recommended candidate according to the Study Priority you select. You choose the final design and record the reason, which is what a protocol reviewer needs to see.
Why are there several admissible designs with the same α and power?
Because the criteria constrain the error rates but not the stage-one size. Different n₁ values shift the balance between expected and maximum enrollment, and each design on the frontier is the best available at its maximum sample size.
What should I do if no design is found?
BioStatHub reports when the search limit was reached. You can search larger sample sizes or revisit the assumptions — usually a wider gap between p₀ and p₁, a higher α, or a lower target power — before generating designs again.
Can I put the exported numbers straight into a protocol?
The exported parameters, boundaries, and operating characteristics are exact and reproducible. They still need statistical review and the approvals that apply to your programme before they become a protocol.