Statistical Calculators › Bayesian Sample Size Methods › Bayesian Assurance Calculator
← All Calculators

Bayesian Sample Size Methods

Bayesian Assurance Calculator

Estimate the unconditional probability that a planned trial will achieve a successful result while accounting for uncertainty in the true treatment effect. This calculator implements the normal-prior assurance framework illustrated in nQuery Bayes.

Trial & Prior Assumptions

Specify the prior distribution for the treatment difference and the planned sampling variance.

Assurance Result

Assurance averages the conditional probability of success over the prior distribution of the treatment effect.
Enter the trial assumptions and click Calculate Assurance.

Methodology

Bayesian assurance is the unconditional probability of a successful trial after integrating the conditional probability of success over a prior distribution for the unknown treatment effect. In other words, rather than calculating power at one fixed assumed effect, assurance averages power over the plausible effects represented by the prior distribution.

Normal-prior assurance for a difference in means

This calculator follows the normal-prior, normal-sampling framework illustrated by nQuery Bayes for an assurance superiority calculation. Let the treatment difference have prior distribution

δ ∼ Normal(m, v)

For two independent groups, the planned sampling variance of the observed difference is

τ = σ₁²/n₁ + σ₂²/n₂

For a one-sided superiority test, the critical value is z1−α and the assurance is

A = Φ[(m − δ₀ − z1−α√τ) / √(v + τ)]

For a two-sided test, the two tails are integrated over the same prior-predictive distribution:

A = Φ[(−c − μ)/s] + 1 − Φ[(c − μ)/s],   μ = m − δ₀,  s = √(v + τ),  c = z1−α/2√τ

Maximum achievable assurance

For a one-sided superiority calculation, as the sampling variance approaches zero, the maximum assurance under the specified normal prior is

AMAX = Φ[(m − δ₀) / √v]

This quantity is useful when determining whether a requested assurance is attainable under the specified prior. If the target exceeds the maximum achievable assurance, increasing the sample size cannot reach the target without changing the prior assumptions or the success criterion.

Interpretation: Assurance is not the same as conventional power. Power conditions on one particular true effect, whereas assurance incorporates uncertainty about the true effect through the prior distribution. Consequently, assurance depends directly on the prior mean and variance.

Worked example

The nQuery Bayesian Assurance white paper gives an assurance-superiority example with α = 0.05, a one-sided test, prior mean m = 0.200, prior variance v = 0.060, σ₁ = σ₂ = 0.250, and N = 25 per group. The resulting posterior variance of the difference is τ = 0.005, with assurance A = 0.629 and maximum achievable assurance AMAX = 0.793.

The calculator reproduces these values to the displayed precision: assurance = 62.9% and maximum achievable assurance = 79.3%.

References

O'Hagan, A., Stevens, J. W., & Campbell, M. J. (2005). Assurance in clinical trial design. Pharmaceutical Statistics, 4(3), 187–201.

Statsols. Bayesian Assurance: Formalizing Sensitivity Analysis for Sample Size. nQuery Bayes white paper. The nQuery documentation describes assurance as averaging power over a prior distribution and provides the worked assurance-superiority example reproduced above.

Statsols. Sample Size for Bayesian Statistics. nQuery Bayes documentation. Describes Bayesian assurance as a method for calculating the true probability of success while accounting for parameter uncertainty.