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:

The BioStatHub Study Parameters panel with the null response rate set to 0.1, the target response rate set to 0.3, type I error set to 0.05, type II error set to 0.20, and the Generate Designs button visible.
Figure 1. The Study Parameters panel with the illustrative assumptions entered. BioStatHub shows power = 1 − β under the β field, and the tutorial assumes the default maximum total sample size of 300.
ParameterField in BioStatHubMeaningIllustrative value
p₀Null response rateThe response rate that would make the treatment uninteresting0.10
p₁Target response rateThe smallest response rate worth pursuing further0.30
αType I errorLargest acceptable false-positive probability0.05
βType II errorLargest acceptable false-negative probability0.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:

The BioStatHub candidate designs table for the worked example, listing Minimax, Admissible(1), Admissible(2) and Optimal with stage-one sample size, stage-one boundary, maximum sample size, final boundary, expected sample size, probability of early termination, type I error and power.
Figure 2. The Overview table after generating designs for p₀ = 0.10, p₁ = 0.30, α = 0.05 and 80% power. The four candidates differ in stage-one size and maximum sample size; the checkboxes on the left feed the Compare view in Step 3.
ColumnWhat 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₁
NThe maximum total sample size if the trial continues to stage two
rThe 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 IActual type I error rate achieved by the integer boundaries, at or below α
PowerActual 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:

The BioStatHub Compare view for the worked example, showing a comparison table of Optimal and Minimax against the chosen benchmark, including expected sample size under p₀ and p₁ and Type I error, above the Efficiency Frontier chart plotting expected sample size under p₀ against maximum sample size.
Figure 3. The Compare view with Optimal as the benchmark. The comparison table shows the Minimax design as differences from the benchmark, including expected sample size under p₁ and Type I error. The Efficiency Frontier plots all four candidates on expected sample size EN(p₀) against maximum sample size N: Optimal at the top left, Minimax at the bottom right, and the two Admissible designs between them, with the recommended design called out.
Designn₁ / r₁N / rEN(p₀)PET(p₀)Type IPower
Minimax15 / 125 / 519.510.5490.0330.802
Admissible(1)12 / 126 / 516.770.6590.0360.805
Admissible(2)11 / 127 / 515.840.6970.0400.806
Optimal10 / 129 / 515.010.7360.0470.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.

The BioStatHub Design Details panel for the Optimal design, showing 10 / 1 for stage one, 29 / 5 for the maximum and final boundary, EN(p0) 15.01, PET(p0) 0.736, type I error 0.0471, power 0.805, the trade-off summary, and the Set as Final Design button.
Figure 4. Design Details for a selected candidate. The parameter set, the achieved operating characteristics, and the trade-off summary sit together, with Set as Final Design at the end of the panel.

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.

BioStatHub Design Details showing the Final Design status for the selected design, with the Documented rationale text box, its guidance text, and the Save rationale button.
Figure 5. A finalized design. The Documented rationale field records why this design was chosen; the saved text travels with the design into the finalized protocol and the exported reports.

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.

The BioStatHub Export and Documentation tab showing export all designs, export single design, share design, and export operating characteristics cards.
Figure 6. Export & Documentation. Design data and operating characteristics download as JSON or CSV, and a read-only share link gives co-investigators and reviewers the frozen results.

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.