Tutorials › Bayesian Clinical Trials › Worked Example: Continuous Outcomes and Allocation

Adaptive and Platform Designs · Tutorial 571 of 696

Worked Example: Continuous Outcomes and Allocation

Learn how to update normal outcome models and turn posterior probabilities of the best arm into transparent, nonzero assignment probabilities.

Advanced 11 min read

What You'll Learn

  • State the normal likelihood and prior assumptions needed for the allocation calculation.
  • Calculate arm-specific posterior means and variances when the outcome variance is known.
  • Define posterior probability of being best and estimate it using posterior simulation.
  • Convert best-arm probabilities into assignment probabilities with an exploration floor.
  • Check that probabilities are normalized and interpret them as randomization probabilities.
  • Recognize how outcome direction, model assumptions, and alternative allocation rules affect the calculation.

Why Continuous Outcomes Change the Allocation Calculation

In response-adaptive randomization, assignments for future participants depend on outcomes observed so far. With a continuous outcome, the evidence about an arm is not a count of successes: it is information about that arm’s outcome distribution. A useful Bayesian summary is the posterior probability that each arm has the best mean outcome. These probabilities can then be used to define the next assignment probabilities.

This tutorial works through one explicit rule. It is not the only defensible allocation rule, and a larger posterior probability of being best does not by itself establish that an arm is clinically preferable. The rule is a transparent way to connect a stated outcome model, the data available at an interim, and a randomized assignment decision.

Definition: Suppose there are \(K\) trial arms with outcome means \(\theta_1,\ldots,\theta_K\), and larger outcomes are better. Given the data \(D\) available at an interim, the posterior probability that arm \(i\) is best is $$ q_i=P(\theta_i=\max_{1\leq j\leq K}\theta_j\mid D). $$ A probability-of-being-best allocation rule assigns arm \(i\) with probability \(\pi_i\) determined by the \(q_i\)'s. These are probabilities for the next randomized assignment, conditional on the current data and the specified rule; they are not probabilities that an individual participant will benefit.

For a simple version with an exploration floor \(\epsilon\), where \(0\leq\epsilon<1\), define $$ \pi_i=\frac{\epsilon}{K}+(1-\epsilon)q_i,\qquad i=1,\ldots,K. $$ The first term reserves an equal share of \(\epsilon\) total allocation for all arms. The remaining \(1-\epsilon\) is distributed according to the posterior probabilities of being best. When \(\epsilon>0\), every arm has assignment probability at least \(\epsilon/K\), even if its estimated probability of being best is very small.

Model and Posterior Update

Assume each participant has one continuous outcome, measured on the same scale and in the same direction in every arm. For the calculations below, larger values are better. In arm \(i\), outcomes are conditionally independent and normally distributed with arm-specific mean \(\theta_i\) and a common, known variance \(\sigma^2\):

$$ Y_{ij}\mid\theta_i\sim N(\theta_i,\sigma^2),\qquad \theta_i\sim N(m_0,\tau_0^2). $$

Here \(Y_{ij}\) is the outcome for participant \(j\) in arm \(i\). The prior distributions for the arm means are independent, and the same prior is used for each arm in the examples. At an interim, the observed outcomes in an arm are summarized by its sample size \(n_i\) and sample mean \(\bar{y}_i\). With the variance known, the posterior distribution for that arm’s mean is normal:

$$ \theta_i\mid D\sim N(m_i,v_i),\qquad v_i=\left(\frac{1}{\tau_0^2}+\frac{n_i}{\sigma^2}\right)^{-1},\qquad m_i=v_i\left(\frac{m_0}{\tau_0^2}+\frac{n_i\bar{y}_i}{\sigma^2}\right). $$

The posterior mean is a precision-weighted combination of the prior mean and the observed sample mean. Precision is the reciprocal of variance: the data receive more weight when \(n_i/\sigma^2\) is large relative to the prior precision \(1/\tau_0^2\). The posterior variance depends on the amount of information in the prior and data, not on the observed sample mean.

The formula presumes that the outcome variance is known and common across arms, the normal sampling model is adequate, the prior is specified, and the outcomes used at the interim are available and analyzed consistently. It also presumes that the outcomes are independent conditional on their arm means. If the variance is estimated, outcomes are strongly skewed, or participant outcomes depend on time or other features not represented in this model, the calculation may not represent the uncertainty relevant to allocation.

From Posterior Distributions to Assignment Probabilities

For more than two arms, the probability that an arm is best usually requires a joint posterior calculation. Under the independent priors and likelihoods above, the arm means have independent normal posterior distributions. One can draw a set of values from those distributions, identify the largest value in each draw, and repeat. The fraction of draws in which arm \(i\) is largest estimates \(q_i\).

More formally, for \(M\) independent posterior draws \((\theta_1^{(m)},\ldots,\theta_K^{(m)})\), the Monte Carlo estimate is

$$ \hat q_i=\frac{1}{M}\sum_{m=1}^{M} I\left\{\theta_i^{(m)}=\max_{1\leq j\leq K}\theta_j^{(m)}\right\}. $$

Here \(I\{\cdot\}\) equals 1 when the condition in braces holds and 0 otherwise. With continuous posterior distributions, exact ties have probability zero. Every draw has one best arm, so the estimated probabilities sum to 1. The Monte Carlo estimate has simulation error: its approximate standard error is \(\sqrt{\hat q_i(1-\hat q_i)/M}\). Increasing \(M\) reduces this numerical error but does not correct a misspecified outcome model or a poorly chosen allocation rule.

Worked Example: Three Arms With Symmetric Evidence

Suppose a hypothetical trial compares three arms, A, B, and C, with higher outcome values better. Use independent priors \(\theta_i\sim N(0,100)\), a known outcome variance \(\sigma^2=100\), and \(n_i=8\) participants per arm. Suppose all three observed sample means are 5 outcome units. Calculate the posteriors and the resulting probabilities of assignment when \(\epsilon=0.06\).

For each arm, the posterior variance and mean are $$ v_i=\left(\frac{1}{100}+\frac{8}{100}\right)^{-1} =\frac{1}{0.09}=11.11, $$ $$ m_i=11.11\left(\frac{0}{100}+\frac{8(5)}{100}\right) =11.11(0.40)=4.444. $$ Thus each posterior is \(N(4.444,11.11)\). The three posterior distributions are identical and independent, so symmetry gives \(q_A=q_B=q_C=1/3\). This value is exact; it does not require posterior simulation.

The assignment probability for each arm is $$ \pi_i=\frac{0.06}{3}+0.94\left(\frac{1}{3}\right) =0.02+0.3133=0.3333. $$ The rule therefore gives equal assignment probabilities. The observed outcomes do not favor one arm over another under this model, so adapting the allocation does not create an imbalance in this example.

Worked Example: Favoring the Arm With the Largest Posterior Best Probability

Now suppose a hypothetical three-arm trial has \(n_i=10\) participants in each arm, known variance \(\sigma^2=100\), and independent priors \(\theta_i\sim N(0,100)\). The observed sample means are 12, 6, and 0 outcome units for arms A, B, and C, respectively. Use \(\epsilon=0.06\), and suppose 10,000 posterior draws give best-arm counts of 8,850 for A, 1,120 for B, and 30 for C.

The posterior variance is the same for each arm: $$ v_i=\left(\frac{1}{100}+\frac{10}{100}\right)^{-1} =\frac{1}{0.11}=9.091. $$ The posterior means are $$ m_A=9.091\left(\frac{10(12)}{100}\right)=10.91,\qquad m_B=9.091\left(\frac{10(6)}{100}\right)=5.455,\qquad m_C=9.091\left(\frac{10(0)}{100}\right)=0. $$ Each posterior standard deviation is \(\sqrt{9.091}=3.015\) outcome units.

The posterior draw counts give \(\hat q_A=8850/10000=0.885\), \(\hat q_B=1120/10000=0.112\), and \(\hat q_C=30/10000=0.003\). These are Monte Carlo estimates, not exact probabilities. Their sum is 1. Applying the allocation rule gives $$ \pi_A=0.02+0.94(0.885)=0.8519,\qquad \pi_B=0.02+0.94(0.112)=0.12528,\qquad \pi_C=0.02+0.94(0.003)=0.02282. $$ The rounded probabilities sum to 1. The rule assigns about 85.2% to A, 12.5% to B, and 2.28% to C. The floor keeps C’s probability above 2%, despite its small estimated probability of having the largest mean.

The simulation counts should be interpreted as an illustrative possible output of posterior sampling. For example, the approximate Monte Carlo standard error for \(\hat q_A\) is \(\sqrt{0.885(0.115)/10000}=0.00319\). This quantifies simulation noise in that estimate, not uncertainty about whether the normal model or the rule is appropriate.

Lower Is Better and Other Outcome Conventions

The definition of “best” must match the clinical meaning of the outcome. For time to symptom resolution or another outcome for which smaller values are preferable, define the best arm as the one with the smallest mean. Its posterior probability is

$$ q_i=P(\theta_i=\min_{1\leq j\leq K}\theta_j\mid D). $$

The posterior update is unchanged; only the comparison made across posterior draws changes. A common error is to use the largest mean automatically. That would favor worse outcomes when lower values are clinically desirable. The direction should be stated before calculating best-arm probabilities.

Worked Example: Adaptation for a Lower-Is-Better Outcome

Consider a hypothetical three-arm trial in which the outcome is days to symptom resolution, so fewer days are better. Let the prior for each mean be \(N(7,100)\), let the known variance be \(\sigma^2=25\), and suppose each arm has \(n_i=5\) participants. The observed sample means are 8 days for A, 6 days for B, and 7 days for C. Suppose 10,000 posterior draws yield minimum-mean counts of 2,100 for A, 5,600 for B, and 2,300 for C. Use \(\epsilon=0.06\).

For each arm, $$ v_i=\left(\frac{1}{100}+\frac{5}{25}\right)^{-1} =\frac{1}{0.21}=4.762\ \text{days}^2. $$ The posterior means are $$ m_A=4.762\left(\frac{7}{100}+\frac{5(8)}{25}\right) =4.762(1.67)=7.952\ \text{days}, $$ $$ m_B=4.762\left(\frac{7}{100}+\frac{5(6)}{25}\right) =4.762(1.27)=6.048\ \text{days}, $$ $$ m_C=4.762\left(\frac{7}{100}+\frac{5(7)}{25}\right) =4.762(1.47)=7.000\ \text{days}. $$ The posterior probabilities of having the smallest mean, estimated from the stated counts, are \(\hat q_A=0.210\), \(\hat q_B=0.560\), and \(\hat q_C=0.230\).

Thus $$ \pi_A=0.02+0.94(0.210)=0.2174,\quad \pi_B=0.02+0.94(0.560)=0.5464,\quad \pi_C=0.02+0.94(0.230)=0.2362. $$ These probabilities sum to 1. B receives the largest assignment probability because it has the greatest estimated posterior probability of the lowest mean. The probabilities still do not mean that B will have the best outcome for a particular participant.

Checks, Alternatives, and Limitations

Before using the calculation for a randomization decision, check the outcome scale and direction, the posterior update, and the probability conversion. The sample mean used in the update must be based on the outcomes available at that decision time. Posterior draws must be generated from the specified arm-specific posterior distributions, and the same rule must be applied to all arms. Finally, check that \(0\leq q_i\leq1\), \(\sum_i q_i=1\), and \(\sum_i\pi_i=1\), allowing for rounding.

A useful comparison is with two common alternatives. Equal randomization assigns \(1/K\) to every arm regardless of observed outcomes; it avoids using interim response evidence to alter the allocation. Allocation directly proportional to posterior means uses the numerical values of the means rather than their probabilities of being best; it is generally sensitive to the outcome’s origin and units and is not a probability-of-best rule. The rule here uses posterior uncertainty as well as posterior means: an arm can have a promising mean but a modest probability of being best if its posterior is very uncertain.

ApproachHow assignment probabilities are setKey distinction
Equal randomization\(\pi_i=1/K\)Does not adapt to interim outcomes
Probability of being bestUses \(q_i\), optionally with an exploration floorUses posterior uncertainty and relative ranking
Posterior-mean-based ruleUses the arm-specific posterior means directlyUses the numerical scale of the mean, not the probability of ranking first

The probability-of-being-best rule is not automatically optimal for clinical benefit, statistical precision, or trial efficiency. A best-mean probability does not account by itself for clinical margins, safety, outcome variability across participants, or the value of learning about an arm. The exploration floor is a design choice, not a feature selected by the posterior calculation. A larger floor protects continued assignment to every arm but weakens the degree of adaptation. A smaller floor concentrates more allocation according to the estimated \(q_i\)'s but can leave little data accruing in arms with low current probabilities.

Common mistake. It is incorrect to say, “Arm A has a posterior best probability of 0.885, so the next participant has an 88.5% chance of a better outcome on A.” The 0.885 is a probability, conditional on the model and current data, that A’s mean is largest among the arms. The actual assignment probability is 0.8519 in the example because the exploration-floor rule modifies that probability. Neither quantity is an individual participant’s probability of benefit.

The assumptions also deserve attention when results seem implausible. A common known variance may be a poor description if arm-specific outcome variability differs. A normal model may be unsuitable for an outcome with severe skewness or a hard lower bound. Independent outcomes may not be reasonable when there is clustering or repeated measurement. These problems are not fixed by taking more posterior draws: they require a suitable model and, potentially, a different allocation rule. In all cases, response adaptation should be specified before the interim decision, including the model, outcome direction, allocation floor, and calculation used to obtain the probabilities.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. With three arms, the posterior probabilities of being best are 0.50, 0.30, and 0.20. If \(\epsilon=0.10\), what are the assignment probabilities?
  2. For one arm, let \(m_0=0\), \(\tau_0^2=100\), \(\sigma^2=100\), \(n_i=10\), and \(\bar{y}_i=4\). Calculate its posterior mean and variance.
  3. For a lower-is-better outcome, which posterior comparison should be used to define the probability of being best?
  4. Why does increasing the number of posterior draws not correct a misspecified outcome model?

Solutions. 1. The equal floor share is \(0.10/3=0.03333\), and the remaining multiplier is \(1-\epsilon=0.90\). Therefore, \(\pi_1=0.03333+0.90(0.50)=0.4833\), \(\pi_2=0.03333+0.90(0.30)=0.3033\), and \(\pi_3=0.03333+0.90(0.20)=0.2133\); the values sum to 1. 2. The posterior variance is \(v_i=(0.01+0.10)^{-1}=9.091\), and the posterior mean is \(m_i=9.091(10(4)/100)=3.636\). Thus the posterior is \(N(3.636,9.091)\). 3. Use \(P(\theta_i=\min_j\theta_j\mid D)\), because smaller outcome means are better. 4. More draws reduce Monte Carlo error in estimating posterior probabilities under the specified model. They do not change that model, so they cannot repair an incorrect likelihood, variance assumption, or prior.

Clinical Biostats