Why Sample-Size Calculations Go Wrong
A Bayesian sample-size calculation combines a model for future trial data with a rule for declaring success. A numerical result can look precise while answering the wrong design question: for example, the chance of success at one assumed treatment effect rather than the average chance over plausible effects. Other errors arise from averaging over an unintended prior, translating a posterior decision rule incorrectly, or treating a simulation estimate as exact.
The calculations below use a continuous treatment effect to make these distinctions explicit. Let \(\delta\) denote the treatment-minus-control effect, measured in the endpoint’s units. Suppose the trial produces an estimator \(Y\) with known sampling variance \(v\), and use the model \(Y\mid\delta\sim N(\delta,v)\). The analysis prior is \(\delta\sim N(m_0,\tau^2)\), with \(\tau>0\). These assumptions are simplifying: the estimator is unbiased conditional on \(\delta\), its variance is correctly specified and fixed at the proposed sample size, and the normal likelihood and prior adequately represent the analysis. In an actual design, the data model and variance must reflect the endpoint, allocation, and planned analysis.
For a simple posterior decision rule, declare success when \(P(\delta>\delta_*\mid Y)>q\), where \(\delta_*\) is the clinically relevant threshold and \(q\) is the prespecified posterior-probability threshold. The rule, including the direction of the inequality, must be fixed before evaluating the design. A sample-size result is meaningful only with the model, the decision rule, and the distribution over which success is averaged all made explicit.
Deriving the Success Probability
Under the normal model and prior, the posterior for \(\delta\) is normal. Define \(V\) as its variance and \(m(Y)\) as its mean. Completing the square in the product of the normal likelihood and prior gives:
Let \(z_q\) be the \(q\) quantile of the standard normal distribution. The posterior probability rule is equivalent to a cutoff on the posterior mean:
This equivalence follows because the posterior probability is \(\Phi((m(Y)-\delta_*)/\sqrt{V})\), where \(\Phi\) is the standard normal cumulative distribution function. Since \(\Phi\) is increasing, exceeding \(q\) is exactly equivalent to the stated inequality. This derivation depends on a normal posterior with the stated variance; for a different model, the success rule must be evaluated using that model’s posterior rather than borrowing this cutoff.
At a fixed true effect \(\delta\), \(m(Y)\) is normally distributed with mean \(w\delta+(1-w)m_0\) and standard deviation \(w\sqrt{v}\). Thus, under these assumptions, conditional power is:
Assurance averages this probability over the design distribution:
If the design distribution is the same \(N(m_0,\tau^2)\) distribution used as the analysis prior, the marginal distribution of \(m(Y)\) is \(N(m_0,\tau^2-V)\). In that special case, assurance is \(1-\Phi((c-m_0)/\sqrt{\tau^2-V})\). This shortcut does not apply just because an analysis prior exists: it requires the design distribution to match that prior and the model assumptions above to hold.
Worked Example: Conditional Power Is Not Assurance
Hypothetical design. Suppose \(Y\) is an estimated treatment effect in endpoint units, \(v=0.25\) endpoint-units squared, and the analysis prior is \(N(0.4,0.5^2)\). The success rule is \(P(\delta>0\mid Y)>0.95\). Compare conditional power at \(\delta=0.8\) with assurance when the design distribution matches the analysis prior.
The posterior variance is \(V=(1/0.25+1/0.25)^{-1}=0.125\), so the posterior standard deviation is \(\sqrt{0.125}=0.3536\). Here \(w=0.25/(0.25+0.25)=0.5\), and \(z_{0.95}=1.645\). The posterior-mean success cutoff is \(c=0+1.645(0.3536)=0.5816\).
At the fixed true effect \(\delta=0.8\), the sampling distribution of \(m(Y)\) has mean \(0.5(0.8)+0.5(0.4)=0.6000\) and standard deviation \(0.5\sqrt{0.25}=0.2500\). Therefore:
This is about a 52.9% chance of meeting the posterior success rule if the true effect is 0.8 endpoint units. For assurance under the matching normal design distribution, the marginal standard deviation of \(m(Y)\) is \(\sqrt{\tau^2-V}=\sqrt{0.25-0.125}=0.3536\). Hence:
The design has about 30.4% assurance under that distribution, not 52.9%. Neither number is inherently wrong; each answers a different question. Reporting the conditional result as assurance would materially overstate the average probability of success under the stated design distribution.
Average Over the Intended Design Distribution
The analysis prior determines how trial data are translated into a posterior. The design distribution \(g(\delta)\) determines how conditional success probabilities are averaged when calculating assurance. They may be identical, but they serve different roles. A design distribution might instead represent a specified mixture of plausible effects, or a set of scenarios used for sensitivity analysis. The choice should reflect the design question and be stated plainly.
Worked Example: Averaging Over the Wrong Prior
Hypothetical design. Keep the analysis model and success rule from the previous example, so the conditional success probabilities at \(\delta=0\) and \(\delta=0.8\) are the ones calculated from the same posterior cutoff \(c=0.5816\). Suppose the design distribution assigns probability 0.80 to \(\delta=0\) and 0.20 to \(\delta=0.8\). This distribution is a design assumption; it is not the analysis prior \(N(0.4,0.5^2)\).
At \(\delta=0\), the sampling mean of the posterior mean is \(0.5(0)+0.5(0.4)=0.2000\), with standard deviation \(0.2500\). Thus the conditional success probability is \(1-\Phi((0.5816-0.2000)/0.2500)=1-\Phi(1.5264)\approx0.0635\). At \(\delta=0.8\), the previous calculation gives approximately 0.529.
The assurance under the stated two-point design distribution is therefore:
So assurance is approximately 15.7%. Using the analysis prior as the averaging distribution would instead give approximately 30.4%, as in the previous example. That value is not the answer for this mixture design distribution. The discrepancy is not a computational defect: it reflects different assumptions about which true effects are plausible for design averaging.
A useful diagnostic is to write the assurance integral, or its discrete weighted sum, before calculating it. Check that the weights sum to one, that the effect values have the correct endpoint units, and that the distribution represents the intended design question. If a point alternative is intended, report conditional power at that point rather than labelling it assurance.
Apply the Posterior Threshold Exactly
A posterior success criterion is a probability statement about the parameter given the observed data. It is not interchangeable with “the estimated effect is positive,” a frequentist significance test, or a posterior interval chosen after seeing results. In the normal example, the exact translation is \(m(Y)>\delta_*+z_q\sqrt V\). Omitting \(\delta_*\), using a variance where a standard deviation is required, or using the wrong tail probability changes the decision rule.
Worked Example: Check a Posterior-Probability Rule
Hypothetical result. Use the analysis prior \(N(0.4,0.5^2)\), sampling variance \(v=0.25\), and rule \(P(\delta>0\mid Y)>0.95\). Suppose the observed treatment-effect estimate is \(Y=0.8\) endpoint units.
The posterior mean is \(m(Y)=0.5(0.8)+0.5(0.4)=0.6000\), and its standard deviation is \(0.3536\). Directly evaluating the posterior probability gives:
Because \(0.955>0.95\), this hypothetical result meets the stated success rule. The equivalent mean cutoff is \(1.645(0.3536)=0.5816\), and \(0.6000>0.5816\), which confirms the decision. A calculation that compares the posterior mean with 1.645 alone would be wrong: 1.645 is a standardized normal quantile, not a treatment-effect value in endpoint units.
Simulation Error and Design Decisions
When assurance is estimated by simulation, each simulated trial produces an indicator \(I_j\): it is 1 if the trial meets the success rule and 0 otherwise. With \(M\) independent simulated trials, the estimate is \(\hat A=M^{-1}\sum_{j=1}^M I_j\). Its approximate Monte Carlo standard error is \(\sqrt{\hat A(1-\hat A)/M}\). This describes numerical uncertainty from using a finite simulation, not uncertainty in the treatment effect, uncertainty about the model, or uncertainty about the design distribution.
Worked Example: A Simulated Estimate Near the Target
Hypothetical simulation. Suppose \(M=1{,}000\) independently simulated trials are evaluated under one fully specified design, and 620 meet the success rule. The estimated assurance is \(\hat A=620/1{,}000=0.620\). Its Monte Carlo standard error is:
An approximate 95% Monte Carlo interval is \(0.620\pm1.96(0.01535)\), or approximately \((0.590,0.650)\). If the design target is assurance of at least 0.60, this run does not establish that the simulated assurance exceeds the target with useful precision: the interval includes values below 0.60. A more precise simulation is warranted before making a borderline design choice.
For a planning calculation at an assurance near 0.60, the approximate number of independent simulations needed for a Monte Carlo standard error no greater than 0.005 is \(M\geq0.60(0.40)/(0.005^2)=9{,}600\). This is a planning approximation; the required number can be larger for a rare success event or when tighter precision is needed.
Simulation diagnostics should include the number of replicates, the estimated assurance, its Monte Carlo error, and confirmation that the same success rule and data-generating assumptions were used throughout. If common random numbers or importance sampling are used, their variance calculations must match the simulation method; the simple independent-Bernoulli standard error above should not be applied without justification. A surprisingly stable estimate can still be biased if the simulated model, prior averaging, or decision rule is wrong.
Common Mistakes and Practical Checks
| Mistake | Why it fails | Correction |
|---|---|---|
| Calling power at one assumed effect assurance | It conditions on a single value rather than averaging over a stated design distribution. | Label it conditional power, or calculate the design-distribution average. |
| Averaging over the analysis prior by default | The analysis prior and design distribution have different roles and need not match. | State \(g(\delta)\) and average over that distribution; justify any choice to match the analysis prior. |
| Using a posterior cutoff with the wrong scale or tail | A quantile such as \(z_q\) is standardized; the threshold also depends on \(\delta_*\) and \(\sqrt V\). | Derive the success event from the posterior probability definition and check units. |
| Reporting simulated assurance without Monte Carlo error | A finite run estimates assurance with simulation uncertainty. | Report the replicate count and an appropriate Monte Carlo standard error or interval. |
These checks do not replace examining whether the assumed likelihood, variance, analysis prior, and design distribution are reasonable. If the outcome distribution is skewed, the event rate is very low, dropout is substantial, or the planned analysis is more complex than the model used for sizing, a simple normal calculation may not represent the eventual decision process. Simulation can accommodate complexity only when the simulation itself faithfully implements the intended trial and analysis.
Check Your Understanding
Answer each question, then compare with the solutions.
- In one sentence, distinguish conditional power at \(\delta=0.5\) from assurance.
- Why can the analysis prior and design distribution differ without making the calculation internally inconsistent?
- For a normal posterior with mean \(m\), standard deviation \(0.2\), threshold \(\delta_*=0\), and \(q=0.95\), what posterior-mean cutoff implements the success rule?
- A simulation estimates assurance as 0.50 from 400 independent replicates. Calculate the approximate Monte Carlo standard error.
Solutions. 1. Conditional power is the chance of meeting the rule if the true effect is 0.5, whereas assurance averages the chance of meeting it over a stated distribution of true effects. 2. The analysis prior determines the posterior calculation, while the design distribution specifies which true effects are averaged over; the roles differ, provided both are stated and justified. 3. The cutoff is \(0+1.645(0.2)=0.329\), so success requires \(m>0.329\). 4. The standard error is \(\sqrt{0.50(0.50)/400}=\sqrt{0.000625}=0.0250\).