- Introduced by
- Spiegelhalter & Freedman (1986); O'Hagan, Stevens & Campbell (2005)
- Year
- 1986
- Type
- Bayesian sample size determination
What does it do?
Bayesian power analysis, also called assurance, is a sample size method that replaces the fixed-effect power calculation with an average of power over a prior distribution on the effect size.
Spiegelhalter and Freedman (1986) proposed a predictive approach to trial sizing based on prior clinical opinion, and O'Hagan, Stevens and Campbell (2005) defined assurance as the prior expectation of power, which is the unconditional probability that the trial yields a statistically significant result. The method answers the question: given current uncertainty about the true effect, which sample size gives a high overall probability of a positive result?
The intuition behind the method
Classical power analysis fixes the true effect at one assumed value and asks how large a sample is needed to detect it. Assurance recognises that the effect is uncertain and represents that uncertainty with a prior distribution. It then averages the power function over plausible effects, weighted by the prior. The result is a single number, the assurance, which describes the probability of success across the range of effects the prior allows, rather than the power at one assumed point.
History
Spiegelhalter and Freedman (1986) proposed a predictive approach to selecting clinical trial size based on subjective clinical opinion. Their method took the point of clinical equivalence as the null hypothesis and used the prior to predict the probabilities of the possible end-of-study decisions. O'Hagan, Stevens and Campbell (2005) defined assurance as the prior expectation of power, extended the theory to two-sided testing and equivalence trials, and gave worked calculations for normal, binary and gamma data.
When to use it
Use Bayesian power analysis when you can state a credible prior distribution over the effect size, for example from a pilot study, a systematic review, or structured expert elicitation, and you want the sample size justification to reflect that uncertainty explicitly. It suits planning where the question is the probability that the study will succeed, rather than the power at one assumed effect. Clinical trials are a typical setting, and the design prior used for planning can be broader than the analysis prior used for inference. Do not use it when no defensible prior can be specified: the prior would then be arbitrary and the assurance would inherit that arbitrariness. In that case, simulation-based power analysis under explicitly stated effect scenarios is the more transparent option.
Limitations and considerations
- The assurance depends on the prior. A poorly justified prior produces a misleading sample size, so the prior must be defended on substantive grounds.
- Outside simple model families the prior expectation generally has to be evaluated numerically, and the simulation estimate carries Monte Carlo error of order sqrt(A(1−A)/S), which shrinks only as the number of simulated trials grows.
- The approach is less familiar to reviewers and ethics committees than conventional power, so the rationale needs explicit explanation in the protocol.
- It does not remove the need for a clinically meaningful effect threshold; the prior should still be anchored in substantive knowledge about which effect matters.
- Assurance is defined for a fixed model, test and α, and assumes the design prior is consistent with that model; changing the test or α changes the assurance.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Quantifies uncertainty about the effect size directly, rather than conditioning on one assumed value.
- Gives an assurance figure that is the probability of a significant result averaged over plausible effects, which reflects the practical chance of trial success better than power at a single assumed effect.
- Allows the design prior and the analysis prior to differ, so planning assumptions need not dictate the final inference.
- Accepts external evidence, such as pilot estimates or meta-analytic results, as the basis for the prior.
Applications
- Sample size justification for clinical trials where pilot or meta-analytic data provide a prior on the treatment effect.
- Planning of equivalence trials, which O'Hagan, Stevens and Campbell (2005) extended the theory to cover.
- Elicitation-based planning, in which clinicians' opinions about the treatment difference are converted into a design prior, as in Spiegelhalter and Freedman (1986).
- Comparative studies in other fields where a prior on the effect size can be justified and a fixed-effect power calculation would be optimistic.
How it works
How it works
The null and alternative hypotheses depend on the planned test. In the standard case a point null with two-sided testing is used, H0: θ = θ0 against H1: θ ≠ θ0. Spiegelhalter and Freedman (1986) instead take the point of clinical equivalence as the null, and O'Hagan, Stevens and Campbell (2005) extend the theory to two-sided testing and equivalence trials. The key difference from frequentist power analysis is that the effect size θ is not fixed. It is treated as a random variable drawn from a design prior p(θ) that encodes existing knowledge or expert opinion about how large the effect plausibly is. Assurance is defined relative to a specific model, a specific significance test and a stated significance level α, and the design prior should be specified before data collection and be consistent with the statistical model.
Formula
H_0:\; \theta = \theta_0 \;\; \text{vs.}\;\; H_1:\; \theta \neq \theta_0 \quad (\text{or an equivalence-margin null, depending on the planned test})Assurance is the prior expectation of the power function, Assurance = E_θ[Power(θ)] = ∫ Power(θ) p(θ) dθ, where Power(θ) is the conventional power of the planned test at a fixed effect θ and sample size n. In the simulation approximation, for each s = 1,…,S a parameter θ_s is drawn from the design prior p(θ), a trial of size n is simulated under θ_s, and the planned significance test is applied to it, giving p-value_s. The proportion of simulated trials with p-value_s < α estimates the assurance at that n. The Monte Carlo standard error of this estimate is sqrt(A(1−A)/S), where A is the estimated assurance. Report an interval based on it, and choose S large enough that this error is small relative to the target γ.
Formula
\text{Assurance}(n) = \int \text{Power}(\theta, n)\, p(\theta)\, d\theta \;\approx\; \frac{1}{S}\sum_{s=1}^{S} \mathbf{1}\!\left[p\text{-value}_{s} < \alpha\right],\quad \theta_s \sim p(\theta),\; \text{data}_s \sim f(\cdot \mid \theta_s, n)The analyst increases n until the estimated assurance reaches a target level γ, for example 0.80 or 0.85, and adopts the smallest such n as the study sample size. Assurance is not guaranteed to be monotone in n for every test and prior, so evaluate it over a grid covering the whole relevant range of n, or confirm the chosen n on a grid, rather than stopping at the first crossing. Assurance averages power over the prior, so it can be lower or higher than the power at the prior mean, depending on the shape of the power curve and the prior. When the prior places weight on smaller effects it is typically lower, which guards against optimistic assumptions about the effect.
Formula
\text{Choose } n^* = \min\{n : \text{Assurance}(n) \geq \gamma\}Common pitfalls
- An overconfident (too narrow) prior inflates the assurance and can lead to underpowered studies, so run sensitivity analyses across several priors.
- Assurance is a pre-study planning quantity, not a posterior probability computed from observed data; reporting it as the latter is an error.
- Assurance at a given n is not the same as frequentist power at the prior mean, so a target of 0.80 for assurance does not carry the same meaning as 80% conventional power. State explicitly which quantity the target refers to.
- A single simulation estimate reported without its Monte Carlo error, or based on few simulated trials, can make the chosen n look more precise than it is.
Frequently asked questions
How is assurance different from frequentist power?
Frequentist power is computed at one assumed effect size. Assurance is the expectation of power over a prior distribution on the effect size, and so it is the unconditional probability of a significant result. If the prior is a point mass at the assumed value, assurance equals the frequentist power at that value. For a prior spread over a range of effects, assurance is a weighted average of power across that range and can differ from power at the prior mean, being lower or higher depending on the shape of the power curve and the prior. When the prior gives weight to smaller effects, assurance is typically lower, which gives a more realistic view of the chance of study success.
What prior should I use for the effect size?
The design prior should capture your genuine uncertainty before the study. Common choices are a Normal prior centred on the clinically meaningful effect with a standard deviation derived from a pilot study or meta-analysis, or a Student-t prior with heavier tails to express more uncertainty. It is good practice to run sensitivity analyses under several priors to confirm that the recommended sample size is robust.
Can I use different priors for design and analysis?
Yes, and this is one of the method's key features. The design prior is used only for sample size planning and can be broad and realistic. The analysis prior governs inference after data collection and is often sceptical or non-informative in regulatory contexts. Keeping the two separate prevents the planning assumptions from influencing the final inference.
Why can the result differ substantially from conventional power calculations?
Conventional calculations depend on a single assumed effect, often taken from a pilot or earlier estimate. Assurance averages over the prior, so when the prior places weight on smaller effects, the assurance at the same n can be lower. The gap shows how sensitive the required sample size is to uncertainty about that effect. It may indicate that a conventional calculation underestimates the required sample size, but this is not true in every case.
Related methods
Sources
O'Hagan, A., Stevens, J.W. & Campbell, M.J. (2005). Assurance in Clinical Trial Design. Pharmaceutical Statistics, 4(3), 187–201.
Open DOI referenceSpiegelhalter, D.J. & Freedman, L.S. (1986). A Predictive Approach to Selecting the Size of a Clinical Trial, Based on Subjective Clinical Opinion. Statistics in Medicine, 5(1), 1–13.
Open DOI reference