Why Validate a Recursive Calculation by Simulation?
A recursive calculation propagates probability through successive analyses, retaining only paths that have not crossed a stopping boundary. It can compute stagewise rejection probabilities and power efficiently, but implementation details such as transition distributions, boundary conventions, and stopping rules can be mishandled. Simulation offers a separate check: generate complete trial paths from the assumed joint distribution, apply the same stopping rule, and compare the observed crossing frequencies with the recursive probabilities.
This is a validation check, not a replacement for the recursive calculation. Simulation has random error, while numerical integration has approximation error. A useful comparison therefore reports both, rather than treating a difference between two estimates as proof that either one is wrong.
Specify the Model and the Stopping Rule
For a standard canonical group-sequential model, let \(t_j\) be the information fraction at analysis \(j\), with \(0<t_1<\cdots<t_K=1\). Write \(Z_j\) for the standardized test statistic at analysis \(j\). Under the null hypothesis, the joint distribution is multivariate normal, with mean zero, unit marginal variances, and
Under a simple alternative with standardized drift \(\theta\), \(Z_j\) has mean \(\theta\sqrt{t_j}\) and variance 1, with the same correlation structure. This model presumes the canonical independent-increment information process and correctly specified information fractions. A simulation check only validates calculations relative to the model simulated; it cannot establish that the model describes a real trial.
For example, let \(a_j\) be an upper efficacy boundary and \(b_j\) a lower futility boundary, with \(b_j<a_j\). At each analysis, apply the rule in the specified order: if the trial has not already stopped, declare efficacy if \(Z_j\ge a_j\); otherwise stop for futility if \(Z_j\le b_j\), when futility stopping is part of the design. Paths that cross neither boundary continue. A lower futility boundary is nonbinding if crossing it does not formally require stopping; the simulation must reflect that distinction. For two-sided efficacy, rejection occurs on either designated efficacy crossing. The simulated rule must match the rule used in the recursive calculation exactly.
One convenient way to generate paths is to use independent standard normal variables \(\varepsilon_j\). Set \(Z_0=0\) and \(t_0=0\), then generate
The first term carries forward the previous statistic, the second adds the alternative drift, and the last represents the new independent information. Under \(H_0\), set \(\theta=0\). This recursion generates the specified normal means, variances, and correlations; it does not mean that the \(Z_j\) values at different analyses are independent.
Estimate Stagewise Probabilities and Their Uncertainty
For \(N\) independent simulated paths, let \(C_j\) be the number that first cross an efficacy boundary at analysis \(j\). The estimated stagewise probability is \(\hat q_j=C_j/N\). The total estimated rejection probability is \(\hat q=\sum_j C_j/N\) when the stagewise events are mutually exclusive, as they are under first-crossing classification. Each simulated path either rejects or does not, so the total crossing count is binomial with success probability \(q\), and its Monte Carlo standard error is
The same formula applies to a single stagewise event using \(\hat q_j\). For the full vector of stagewise counts, the categories are multinomial: their estimates are not independent. In particular, a path cannot first reject at two different stages. Comparing each stage separately is useful, but should not be mistaken for a set of independent checks.
A rough 95% Monte Carlo interval for a probability is \(\hat q\pm1.96SE_{\mathrm{MC}}(\hat q)\), when the count is large enough for a normal approximation to be reasonable. It describes simulation uncertainty under the assumed model, not uncertainty about an unknown treatment effect or the probability that the design is correct. For rare crossings or small counts, use a binomial interval with better small-sample behavior rather than relying on this approximation.
Worked Example: Checking Stagewise Null Crossing Probabilities
Suppose a hypothetical three-analysis design is simulated under \(H_0\) using \(N=200{,}000\) independent paths. The observed first efficacy crossings are \(1{,}002\) at analysis 1, \(1{,}210\) at analysis 2, and \(1{,}818\) at analysis 3. A recursive calculation gives stagewise probabilities \(0.0050\), \(0.0060\), and \(0.0091\), respectively.
The simulated estimates are
Their Monte Carlo standard errors are, respectively, \(\sqrt{0.00501(1-0.00501)/200{,}000}\approx0.0001579\), \(\sqrt{0.00605(1-0.00605)/200{,}000}\approx0.0001734\), and \(\sqrt{0.00909(1-0.00909)/200{,}000}\approx0.0002122\). The differences from the recursive results are \(0.00001\), \(0.00005\), and \(-0.00001\). Each is small relative to its Monte Carlo standard error, so these stagewise results are consistent with the recursive calculation.
There are \(1{,}002+1{,}210+1{,}818=4{,}030\) total rejections, giving \(\hat q=4{,}030/200{,}000=0.02015\). The recursive total is \(0.0050+0.0060+0.0091=0.0201\). For the simulated total, \(\sqrt{0.02015(1-0.02015)/200{,}000}\approx0.0003142\). The difference, \(0.00005\), is about \(0.16\) Monte Carlo standard errors. The simulation does not show a meaningful discrepancy at this precision; it also does not establish that the numerical integration error is zero.
Check Power Under an Alternative
To validate power, repeat the simulation under the specified alternative drift and count paths that reject according to the design. A path that stops for futility without crossing an efficacy boundary is not a rejection. If the design has two-sided efficacy boundaries, either specified efficacy crossing contributes to power. Thus, power is not necessarily the probability of crossing an upper boundary alone.
Worked Example: Comparing Simulated and Recursive Power
For a hypothetical alternative \(\theta=0.35\), suppose a design with its specified efficacy and futility rules is simulated for \(N=50{,}000\) independent paths. There are \(18{,}462\) paths that reject. The recursive calculation gives power \(0.3668\).
The simulated power estimate is \(\hat q=18{,}462/50{,}000=0.36924\), and its Monte Carlo standard error is \(\sqrt{0.36924(1-0.36924)/50{,}000}\approx0.002158\). A rough 95% Monte Carlo interval is \(0.36924\pm1.96(0.002158)\), or approximately \((0.3650,0.3735)\).
The recursive value \(0.3668\) lies in this interval. The estimate differs from the recursive value by \(0.00244\), about \(1.13\) Monte Carlo standard errors. This is a plausible simulation fluctuation, not evidence by itself of a numerical error. The interval quantifies uncertainty from using 50,000 simulated paths; it does not incorporate error in the recursive integration.
Separate Monte Carlo Error From Integration Error
The recursive result may itself depend on grid spacing, interpolation, truncation, or quadrature tolerances. Those numerical choices create integration error. Monte Carlo uncertainty instead arises because a finite number of random paths estimates a probability. The two sources should be assessed separately:
Report \(N\), the event counts, and Monte Carlo standard errors or intervals for the total and stagewise probabilities.
Compare recursive results across finer grids or tighter integration settings, using the convergence checks established for numerical calculations.
Interpret the simulation-recursion difference relative to Monte Carlo uncertainty and the numerical stability assessment. Agreement is reassuring, but does not prove either calculation is exact.
Worked Example: Reading a Difference Alongside Grid Refinement
Suppose a hypothetical null calculation gives a total crossing probability of \(0.02034\) on a coarse grid and \(0.02010\) on a refined grid. A separate simulation with \(N=100{,}000\) paths observes \(2{,}014\) rejections.
The simulated estimate is \(\hat q=2{,}014/100{,}000=0.02014\). Its Monte Carlo standard error is \(\sqrt{0.02014(1-0.02014)/100{,}000}\approx0.0004442\). The simulation differs from the refined-grid result by \(0.00004\), much less than one Monte Carlo standard error. The coarse-to-refined change is \(0.00024\), which is a separate indicator of numerical sensitivity.
This comparison supports compatibility between the simulation and refined result at the simulation’s precision, while the grid change shows why refinement matters. The grid difference is not automatically a rigorous bound on integration error, and the simulation interval does not measure integration error. Further grid checks or tighter integration tolerances may be needed if the required design precision is smaller than these discrepancies.
Diagnostics, Alternatives, and Limitations
A useful simulation check examines more than a single total. Compare the first-crossing frequencies by analysis, confirm that the counts sum to the total number of simulated paths when nonrejection outcomes are also classified, and inspect whether the estimates stabilize as \(N\) increases. Under \(H_0\), also check that the simulated marginal means are near zero and marginal variances near one; under the alternative, compare the means with \(\theta\sqrt{t_j}\). These checks can expose incorrect drift, information fractions, or transition variances before interpreting crossing probabilities.
Large disagreement relative to Monte Carlo uncertainty warrants investigation, but random fluctuation remains possible. Check for a reversed boundary inequality, an incorrect update of the conditional mean, accidental independent draws of the \(Z_j\), or a mismatch in whether futility is binding. Repeated simulation batches can reveal instability; increasing \(N\) reduces Monte Carlo standard errors at rate \(1/\sqrt{N}\), so reducing them by half requires about four times as many paths.
Simulation complements, rather than supersedes, recursive integration or direct multivariate normal probability calculations. Recursive calculations can provide precise results efficiently but require numerical choices to be controlled. Direct multivariate normal calculations are another numerical benchmark, as covered in the earlier material on direct multivariate normal probabilities. Simulation is often easy to implement and can validate the stopping logic, but may be inefficient for very small probabilities and never removes model or coding errors automatically. All three approaches can share a mistaken boundary specification, so verify inputs and event definitions independently.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- Why must simulated statistics at successive analyses be correlated under the canonical model?
- A simulation has \(N=10{,}000\) paths and an estimated rejection probability of \(0.04\). Calculate its Monte Carlo standard error.
- Why does a lower futility boundary affect simulated power even though crossing it is not a rejection?
- A refined recursive result differs from a simulation estimate by 1.5 Monte Carlo standard errors. What can and cannot be concluded?
- What happens to Monte Carlo standard error if the number of simulated paths is multiplied by four?
Solutions. (1) Later statistics include information accumulated at earlier analyses; the canonical correlation is \(\sqrt{t_i/t_j}\), not zero. (2) \(SE_{\mathrm{MC}}=\sqrt{0.04(0.96)/10{,}000}=\sqrt{0.00000384}\approx0.001960\). (3) A path stopped for futility cannot later cross an efficacy boundary, so it is counted as a nonrejection under that rule. (4) The difference is compatible with ordinary Monte Carlo fluctuation at that scale, but this does not prove the recursive result is exact or the model is correct. (5) Since the standard error is proportional to \(1/\sqrt{N}\), it is halved.