Tutorials › Bayesian Clinical Trials › Comparing Candidate Priors Through Generated Outcomes

Prior Predictive Checks · Tutorial 98 of 696

Comparing Candidate Priors Through Generated Outcomes

Learn how to hold a trial design fixed while comparing the outcome distributions implied by candidate priors.

Intermediate 11 min read

What You'll Learn

  • Define prior predictive outcome distributions for candidate priors under one fixed trial design.
  • Derive the mean and variance of a beta-binomial event count.
  • Compare prior predictive spreads when candidate priors share the same mean.
  • Simulate treatment-arm counts and treatment differences under each candidate.
  • Assess extreme generated outcomes against clinical context and model assumptions.
  • Recognize when a comparison changes more than the prior or overstates what simulation shows.

Why Compare Priors Through Generated Outcomes?

Two candidate priors can look similar in parameter space yet imply quite different outcomes for a planned trial. Conversely, priors with visibly different parameter spreads may lead to outcomes that are practically alike at the planned sample size. Comparing generated outcomes puts the question in trial terms: what event counts, treatment differences, and unusual results would this design produce if each candidate prior were used?

The comparison is meaningful only when the trial design and outcome model are held fixed. Otherwise, a difference in generated results could arise from a changed sample size, allocation, follow-up, or likelihood rather than from the priors. The goal here is not to select a prior automatically, but to make the consequences of candidate priors visible and judge them against clinical knowledge.

Definition: For candidate prior \(j\), the prior predictive distribution of trial outcomes \(Y\) is obtained by first drawing unknown parameters \(\theta\) from that prior, then drawing outcomes from the sampling model conditional on \(\theta\). In notation, \(p_j(Y)=\int p(Y\mid\theta)\pi_j(\theta)\,d\theta\). It describes outcomes implied by the prior together with the model and planned design, before observing trial data.

A Fair Comparison: Fix the Trial, Vary the Prior

Suppose a planned two-arm trial assigns 100 participants to control and 100 to treatment, and records whether each participant experiences a binary event by a specified follow-up time. Let \(p_C\) and \(p_T\) denote the event probabilities in the control and treatment arms. Conditional on these probabilities, assume independent binomial outcomes:

$$ Y_C\mid p_C\sim\operatorname{Binomial}(100,p_C),\qquad Y_T\mid p_T\sim\operatorname{Binomial}(100,p_T). $$

This model assumes a common event probability within each arm, independent participant outcomes conditional on the probabilities, complete outcome ascertainment, and the stated fixed sample sizes. Candidate priors may express different beliefs about the probabilities or their dependence. For the examples below, arm-specific priors are independent. That independence is an assumption, not a requirement: if prior knowledge links the arm probabilities, the joint prior must represent that dependence.

For a direct comparison, use the same endpoint definition, follow-up, allocation, sample sizes, likelihood, and summary measures for every candidate. A useful generated replicate proceeds by drawing the arm probabilities from a candidate prior and then drawing arm counts from the corresponding binomial distributions. Repeating this produces a distribution of possible trial results for that candidate.

1
Specify the shared design and model.
Fix the sample sizes, allocation, endpoint, follow-up, and sampling assumptions.
2
Draw parameters under one candidate prior.
For each simulated trial, draw the probabilities or other unknown quantities jointly as specified by that prior.
3
Generate the trial outcomes.
Draw participant outcomes conditional on the parameter values, then calculate the same summaries for every candidate.
4
Compare and assess.
Contrast distributions of counts, effects, and selected extreme outcomes with clinical expectations and model assumptions.

What the Prior Does to Event-Count Variation

A simple calculation helps interpret simulated count distributions. If \(p\sim\operatorname{Beta}(a,b)\) and \(Y\mid p\sim\operatorname{Binomial}(n,p)\), then \(Y\) has a beta-binomial prior predictive distribution. Write \(s=a+b\) and \(\mu=a/(a+b)\). Its mean and variance are:

$$ E(Y)=n\mu,\qquad \operatorname{Var}(Y)=n\mu(1-\mu)\frac{n+s}{s+1}. $$

The variance contains both variation in binomial outcomes conditional on \(p\) and variation in \(p\) across prior draws. The following justification uses the law of total expectation and variance. Since \(E(Y\mid p)=np\) and \(\operatorname{Var}(Y\mid p)=np(1-p)\), and a beta variable has \(E(p)=\mu\) and \(\operatorname{Var}(p)=\mu(1-\mu)/(s+1)\), the mean is \(E\{E(Y\mid p)\}=n\mu\). For the variance:

$$ \begin{aligned} \operatorname{Var}(Y) &=E\{\operatorname{Var}(Y\mid p)\}+\operatorname{Var}\{E(Y\mid p)\}\\ &=nE\{p(1-p)\}+n^2\operatorname{Var}(p)\\ &=n\mu(1-\mu)\left(1-\frac{1}{s+1}\right) +n^2\frac{\mu(1-\mu)}{s+1}\\ &=n\mu(1-\mu)\frac{n+s}{s+1}. \end{aligned} $$

At a fixed prior mean, smaller \(s\) means a more diffuse beta prior and generally a broader predictive count distribution. The binomial sampling variation remains even if the prior becomes very concentrated; prior uncertainty adds variation beyond that conditional sampling component.

Worked Example: Same Control-Arm Mean, Different Predictive Spread

Consider the 100-person control arm and two hypothetical priors for its event probability: Candidate A has \(p_C\sim\operatorname{Beta}(1,9)\), and Candidate B has \(p_C\sim\operatorname{Beta}(10,90)\). Both have mean event probability \(0.10\). Calculate the prior predictive mean and standard deviation of the event count \(Y_C\) under each.

For Candidate A, \(a+b=10\), so:

$$ E(Y_C)=100(0.10)=10,\qquad \operatorname{Var}(Y_C)=100(0.10)(0.90)\frac{100+10}{10+1} =9\frac{110}{11}=90. $$

Thus \(SD(Y_C)=\sqrt{90}\approx9.487\) events. For Candidate B, \(a+b=100\), giving:

$$ \operatorname{Var}(Y_C)=100(0.10)(0.90)\frac{100+100}{100+1} =\frac{1800}{101}\approx17.82,\qquad SD(Y_C)=\sqrt{\frac{1800}{101}}\approx4.222\text{ events}. $$

Both candidates imply an average of 10 events, but Candidate A implies much greater variation in the event count across prior predictive trials. The standard deviations describe the spread of the predictive distribution; they do not say that all or nearly all counts must lie within one standard deviation of 10.

Compare Treatment Differences as Well as Arm Counts

A clinically important comparison often concerns the treatment-minus-control event-count difference \(D=Y_T-Y_C\), or the corresponding difference in event rates \(D/100\). Looking at each arm separately can miss whether the candidate prior implies implausibly large benefits or harms. Under independent arm priors and independent arm outcomes, the predictive means of the counts subtract, while their predictive variances add.

Worked Example: Predictive Spread of the Treatment Difference

Use Candidate A from the prior example for control, and assign treatment the hypothetical prior \(p_T\sim\operatorname{Beta}(1,11.5)\), with mean \(0.08\). Candidate B uses \(p_C\sim\operatorname{Beta}(10,90)\) and \(p_T\sim\operatorname{Beta}(8,92)\), also with means \(0.10\) and \(0.08\). Assume independence between the two arm probabilities under each candidate. For both candidates, \(E(D)=100(0.08)-100(0.10)=-2\) events, or a mean rate difference of \(-0.02\), which is minus 2 percentage points.

For Candidate A, the treatment prior has \(a+b=12.5\), so its predictive count variance is:

$$ \operatorname{Var}(Y_T) =100(0.08)(0.92)\frac{100+12.5}{12.5+1} =7.36\frac{112.5}{13.5} =61.333. $$

Its control count variance is 90, as calculated above. Therefore \(\operatorname{Var}(D)=61.333+90=151.333\), and \(SD(D)=\sqrt{151.333}\approx12.302\) events.

For Candidate B, the treatment count variance is:

$$ \operatorname{Var}(Y_T) =100(0.08)(0.92)\frac{200}{101} =\frac{1472}{101}\approx14.574. $$

Its control count variance is \(1800/101\approx17.822\). Hence \(\operatorname{Var}(D)=(1472+1800)/101=3272/101\approx32.396\), and \(SD(D)=\sqrt{3272/101}\approx5.692\) events. The candidates share the same mean treatment difference, but Candidate A yields a substantially wider distribution of differences. Since \(D/100\) is the rate difference, these standard deviations correspond to about 12.30 and 5.692 percentage points, respectively.

Read Generated Outcomes in Clinical Terms

Simulation makes distributional features easier to inspect than a few moments alone. For example, suppose an analyst generates 20,000 hypothetical trials under each candidate in the preceding examples. The table below gives an illustrative set of simulation summaries; the frequencies are hypothetical outputs, not exact probabilities. The event-count threshold and treatment-difference threshold would need clinical justification in an actual application.

CandidateControl counts \(Y_C\geq20\)Differences \(|D|\geq15\)Interpretation to investigate
A2,600 of 20,000 (13.0%)4,550 of 20,000 (22.75%)Broader counts and more large absolute differences
B360 of 20,000 (1.80%)430 of 20,000 (2.15%)Less frequent large outcomes, with nonzero predictive spread

A frequency such as 13.0% estimates the probability of that event under Candidate A's prior predictive distribution for the specified design. It is not a probability that the prior is correct, nor does it establish that the threshold is clinically unacceptable. The appropriate interpretation depends on the trial context: an event count of 20 may be plausible in a large safety trial but concerning in another setting.

Worked Example: Interpreting One Generated Trial Under Each Prior

Consider two hypothetical simulation replicates from the same 100-per-arm design. Under Candidate A, suppose the sampled probabilities are \(p_C=0.03\) and \(p_T=0.22\), and the generated counts are \(Y_C=3\) and \(Y_T=22\). Then \(D=22-3=19\) events, a rate difference of \(19/100=0.19\), or 19 percentage points in the harmful direction for treatment.

Under Candidate B, suppose a replicate draws \(p_C=0.11\) and \(p_T=0.07\), generating \(Y_C=11\) and \(Y_T=7\). Then \(D=7-11=-4\) events, a rate difference of \(-0.04\), or minus 4 percentage points. These are possible generated trials, not estimates of a treatment effect from observed data. One replicate under each prior cannot establish how often such outcomes occur; the distribution across many replicates is the comparison of interest.

Diagnostics, Alternatives, and Limitations

Generated-outcome comparisons are only as useful as their shared model and summaries. Check whether the model represents the design and clinical endpoint. If the endpoint involves clustering, repeated measurements, competing events, or a different follow-up structure, a simple independent binomial model may not be adequate. Also inspect whether prior draws remain in valid parameter ranges and whether any dependence between baseline risk and treatment effect has been included when clinically justified.

Compare more than the center of a distribution. Useful summaries include event-count quantiles, treatment-difference quantiles, and prespecified probabilities of clinically important or extreme outcomes. Plotting the distributions against clinical benchmarks can show whether a small tail probability conceals an implausible central region, or vice versa. The earlier material on prior predictive quantiles, tail behavior, and graphical clinical benchmarks provides related tools for these summaries.

A common mistake is to conclude, “The two priors have the same mean event rate, so they imply the same trial outcomes.” Equal means do not imply equal predictive spreads or tail probabilities, as the beta-binomial calculations show. The correction is to compare the generated distributions, not only their centers. A second pitfall is to change the sample size or likelihood for one candidate; that no longer isolates the prior's implications.

Analytic predictive calculations, such as the beta-binomial moments above, are valuable checks on simulation summaries when they are available. Simulation is more flexible for complex models and joint outcomes, but its summaries are approximations based on generated replicates. Neither approach determines which prior is scientifically appropriate: that judgment requires substantive knowledge and transparent clinical benchmarks. A prior predictive comparison also does not use observed trial outcomes and is not a posterior analysis.

Key takeaway: To compare candidate priors through generated outcomes, hold the planned trial and sampling model fixed, generate parameter values and trial data under each prior, and compare the same clinically meaningful summaries. Differences reveal the prior's implications for this design; they do not by themselves identify a correct prior.

Check Your Understanding

Answer each question, then compare with the brief solutions.

  1. Two beta priors for a control event probability have the same mean but different concentrations. What should remain the same in a fair generated-outcome comparison, and what can differ?
  2. For \(n=100\), \(p\sim\operatorname{Beta}(2,18)\), calculate the prior predictive mean event count.
  3. In an independent two-arm model, the predictive variances of \(Y_C\) and \(Y_T\) are 20 and 30. What is the predictive variance of \(D=Y_T-Y_C\)?
  4. A simulation reports that 4% of trials under a candidate prior have at least 20 control events. State the interpretation and one limitation.
  5. Why is one generated trial under each candidate insufficient to compare their predictive distributions?

Solutions. (1) Hold the design, endpoint, follow-up, likelihood, and summaries fixed. The predictive spreads and tail probabilities can differ despite equal means. (2) The prior mean probability is \(2/(2+18)=0.10\), so \(E(Y)=100(0.10)=10\) events. (3) Independence gives \(\operatorname{Var}(D)=20+30=50\) events squared. (4) It estimates a 4% prior predictive probability of at least 20 control events for that specified design; it is not evidence that the prior is true, and the result depends on the model and the chosen threshold. (5) A single replicate shows only one possible outcome and contains no reliable information about the frequency or spread of outcomes across replicates.

Clinical Biostats