From a decision rule to a design
A sample-size decision is not determined by a target assurance alone. It depends on the treatment effect being planned for, the prior distribution, the rule that will declare success, and any additional operating constraints. An end-to-end design therefore calculates the chance of meeting the Bayesian rule and checks other constraints separately. A design that meets one target but fails another is not a successful design.
The hypothetical example below concerns a two-arm randomized trial with a continuous endpoint measured in points, where higher values favor treatment. It is deliberately simple enough to calculate transparently. The workflow is general: specify the model and success rule, derive the data boundary, evaluate operating characteristics, and select from a prespecified set of candidate sample sizes.
The normal model and known variance make the calculations exact; they are not claims that real trial data will necessarily satisfy these assumptions. Equal allocation gives \(\operatorname{Var}(D\mid\theta)=10^2/n+10^2/n=200/n\). The prior has mean \(2\) points and standard deviation \(4\) points. These choices, including the prior’s positive mean, are consequential: the prior contributes to the posterior decision boundary and the assurance calculation.
Deriving the posterior success boundary
Consider first a rule that declares success when the posterior probability of a beneficial effect exceeds a specified cutoff \(q\): \(P(\theta>0\mid D)\geq q\). For the normal prior and likelihood above, the posterior is normal. Writing \(v=200/n\), its precision is \(1/16+1/v\), and its mean is the precision-weighted average of the prior mean and \(D\).
Let \(z_q\) be the \(q\) quantile of the standard normal distribution. Since the posterior is normal, the rule \(P(\theta>0\mid D)\geq q\) holds exactly when the posterior mean divided by its posterior standard deviation is at least \(z_q\). Solving this inequality for the observed difference gives a data threshold \(c_n(q)\).
The prior-mean contribution \(2/16\) must remain in this expression. It affects the required observed effect and cannot be dropped when substituting numbers. This boundary translates a posterior probability rule into a rule on trial data; it does not itself guarantee a particular frequentist type I error.
Worked Example: Translating a 0.975 Posterior Rule
Suppose the proposed rule is \(P(\theta>0\mid D)\geq0.975\), so \(z_q\approx1.96\), and consider \(n=825\) participants per arm. The sampling variance of \(D\) is \(v=200/825\approx0.242424\), and \(1/16+n/200=4.1875\). Thus,
Under this rule, the trial declares success when the observed treatment-minus-control difference is at least about \(0.9420\) points. For example, \(D=1.00\) point passes the data boundary, while \(D=0.90\) point does not. This conclusion describes the rule’s application to the observed difference; it is not a statement about the probability that the treatment effect is beneficial before observing the data.
Assurance and the separate null-error check
Assurance is the probability of meeting the success rule when the treatment effect is itself drawn from the design prior and the trial data are then generated under that effect. In this model, integrating over \(\theta\sim N(2,16)\) gives the prior-predictive distribution \(D\sim N(2,16+200/n)\). Therefore, for a threshold \(c_n(q)\), assurance has a direct normal-tail calculation.
A hybrid design may also impose a frequentist constraint under the null effect. For the one-sided null \(\theta=0\), the sampling distribution is \(D\mid\theta=0\sim N(0,200/n)\). The null type I error of this decision rule is consequently \(P_0(D\geq c_n(q))=1-\Phi(c_n(q)/\sqrt{200/n})\). This is a separate probability under a fixed null value, not the prior-predictive probability used for assurance.
Worked Example: Assurance and Type I Error at Nearby Sample Sizes
Continue with the \(q=0.975\) rule. At \(n=800\), the boundary is \[ c_{800}(0.975)= \frac{1.96\sqrt{4.0625}-0.125}{4} \approx0.9564\text{ points}. \] The prior-predictive standard deviation of \(D\) is \(\sqrt{16.25}\approx4.031\) points, so \[ \operatorname{Assurance}(800,0.975) = 1-\Phi\left(\frac{0.9564-2}{4.031}\right) \approx0.6022. \] Thus the trial has about a \(60.22\%\) prior-predictive chance of meeting the posterior rule at 800 per arm.
The null standard error is \(\sqrt{200/800}=0.5\) points. Hence the null type I error is \[ 1-\Phi(0.9564/0.5)=1-\Phi(1.913)\approx0.0279. \] A \(2.5\%\) type I error cap is therefore not met, despite assurance exceeding \(0.60\).
At \(n=825\), the boundary just derived is about \(0.9420\) points. Its assurance is \(1-\Phi((0.9420-2)/\sqrt{16.2424})\approx0.6035\), while its null type I error is \(1-\Phi(0.9420/\sqrt{200/825})\approx0.0279\). At \(n=850\), the boundary is about \(0.9283\) points, assurance is about \(0.6049\), and null type I error is about \(0.0278\). The assurance target is met at these candidates, but each still fails the \(0.025\) null-error cap.
Checking constraints and selecting a design
The calculations show why the decision rule must be checked against every design requirement. Under the \(0.975\) posterior cutoff, 800 per arm is the first of the nearby candidates to exceed \(0.60\) assurance, but its null type I error is about \(0.0279\), above \(0.025\). Increasing the sample size to 825 or 850 does not solve that problem. The hybrid constraints are not satisfied merely because the assurance target is.
A protocol team could revise the posterior cutoff during design, with scientific and regulatory agreement, and then repeat the full operating-characteristic calculation. The following worked calculation illustrates a prospectively specified \(q=0.99\) rule. Changing the cutoff after looking at trial outcomes would be inappropriate; the rule and constraints need to be set before the trial data are examined.
Worked Example: Applying a Revised Rule Across Candidate Sizes
Use \(q=0.99\), with \(z_q\approx2.3263\), and assess the prespecified candidate grid \(n=800,900,1000,1100\) participants per arm. For \(n=1000\), the boundary and assurance are
The assurance target of \(0.60\) is not met at 1000 per arm. At \(n=1100\),
The null standard error at 1100 per arm is \(\sqrt{200/1100}\approx0.4264\) points. The null type I error is \(1-\Phi(0.9749/0.4264)\approx0.0111\), below the \(0.025\) cap. For comparison, the assurance values at \(n=800\) and \(n=900\) under the revised rule are about \(0.5844\) and \(0.5907\), respectively. Their null type I errors are about \(0.0112\) each. In this candidate grid, 1100 per arm is the first size satisfying both assurance of at least \(0.60\) and null type I error of at most \(0.025\).
The design choice is therefore 1100 participants per arm under the \(0.99\) posterior rule, for 2200 participants total, subject to the stated model and candidate grid. This is not a claim that 1100 is the unique or globally smallest feasible sample size under all possible rules or allocation plans. It is the selected candidate after evaluating the specified criteria. If recruitment, cost, or other constraints make this size infeasible, the design inputs or decision rule require an explicit, prospective review and fresh calculations.
Diagnostics, alternatives, and limitations
The closed-form calculations are useful checks on a simulation-based design. They also expose which assumptions drive the answer. In a more complex design, assurance may be estimated by simulation as in the earlier material on simulation estimation of Bayesian power and assurance, with Monte Carlo error reported as in the earlier material on Monte Carlo error for assurance estimates. Common random numbers or importance sampling may improve particular calculations, but they do not repair a misspecified model.
- Check the variance and allocation. Unequal allocation, a different outcome standard deviation, or a variance estimated from data changes the sampling distribution and threshold calculation.
- Check the prior’s role. Here the prior mean is positive, so omitting its contribution changes the boundary. Sensitivity to prior spread or a skeptical prior scenario should be considered when clinically plausible alternatives exist.
- Check the null distribution separately. A posterior probability cutoff does not automatically guarantee a chosen type I error. Calculate the null tail probability at the actual boundary for each candidate.
- Check implementation. Simulation estimates that disagree materially with the analytic result in this simple normal case can signal coding, parameterization, or tail-direction errors.
- Check the clinical decision. This example defines success as evidence that \(\theta>0\). If success should instead require a minimum clinically important benefit, the posterior event and all associated calculations must change.
Assurance differs from power calculated at a single assumed effect: it averages the success probability across a distribution of possible effects, here the design prior. That averaging makes the prior influential and requires sensitivity analysis. Neither assurance nor a null type I error calculation establishes that the model is correct, that the trial will recruit as planned, or that the measured effect answers every clinical question. Attrition, nonadherence, interim monitoring, multiple endpoints, and uncertainty in the outcome variance require additional modeling or design constraints rather than an informal adjustment.
Check Your Understanding
Answer each question, then compare with the solutions below.
- For the stated normal model, what is the sampling variance of the treatment-minus-control difference when \(n=500\) per arm?
- Under the \(q=0.975\) rule at \(n=800\), which constraint fails if the targets are assurance at least \(0.60\) and null type I error at most \(0.025\)?
- Why is the null type I error not calculated from the prior-predictive distribution used for assurance?
- Under the \(q=0.99\) rule, does \(n=1000\) per arm meet the assurance target of \(0.60\)?
Solutions. (1) \(200/500=0.4\) square points, so the standard error is \(\sqrt{0.4}\approx0.6325\) points. (2) Assurance is about \(0.6022\), which passes; null type I error is about \(0.0279\), which fails the \(0.025\) cap. (3) Assurance averages over the design prior, whereas type I error evaluates the decision rule under the fixed null effect \(\theta=0\); they are different probability calculations. (4) No. The assurance is about \(0.5960\), below \(0.60\), even though its null type I error is below \(0.025\).