Tutorials › Bayesian Clinical Trials › Bayes Factors and Conflict-Driven Reweighting

Robustness to Prior-Data Conflict · Tutorial 412 of 696

Bayes Factors and Conflict-Driven Reweighting

Learn to derive and calculate the Bayes factor that updates robust-mixture component odds, and interpret how current-trial evidence reallocates posterior probability between borrowing and protective components.

Advanced 12 min read

What You'll Learn

  • Derive posterior component odds from a two-component prior mixture.
  • Define the Bayes factor as a ratio of component-specific marginal likelihoods.
  • Calculate the updated borrowing weight in beta-binomial and normal examples.
  • Interpret evidence favoring borrowing versus protective components.
  • Distinguish relative component support from an overall check of model fit.
  • Recognize common errors in Bayes-factor orientation and interpretation.

Why Mixture Odds Change

A robust mixture prior represents uncertainty about how relevant historical information is to the current trial. One component may permit substantial borrowing from historical data; a protective component may be broader or otherwise less informative. Before observing the current trial, each component has a specified prior probability. After observing the trial, those probabilities change according to how well each component predicts the observed data.

This update is particularly useful under prior-data conflict. If the current observations are more plausible under the protective component, the posterior probability of the borrowing component decreases. The amount of that change can be expressed exactly as a Bayes factor multiplying the prior component odds.

Definition: Let \(Z=1\) denote the borrowing component and \(Z=0\) the protective component, with prior probabilities \(P(Z=1)=w\) and \(P(Z=0)=1-w\), where \(0<w<1\). Let \(\pi_1(\theta)\) and \(\pi_0(\theta)\) be the component priors for parameter \(\theta\), and let \(L(y\mid\theta)\) be the likelihood for current-trial data \(y\). The component-specific marginal likelihood is \(m_j(y)=\int L(y\mid\theta)\pi_j(\theta)\,d\theta\), for \(j=0,1\). The Bayes factor favoring the borrowing component over the protective component is \(BF_{10}(y)=m_1(y)/m_0(y)\).

The marginal likelihood \(m_j(y)\) averages the likelihood over the prior distribution within component \(j\). For discrete parameters, the integral is replaced by a sum. In either case, it is the probability of the observed data under the component, or a probability density when the data are continuous. Both components must use the same data and likelihood, so their marginal likelihoods refer to the same data scale.

Deriving Conflict-Driven Reweighting

The component odds after observing \(y\) follow directly from Bayes’ rule. The joint probability of the data and membership in a component is the component’s prior probability multiplied by its marginal likelihood.

$$ P(Z=1\mid y)=\frac{w m_1(y)}{w m_1(y)+(1-w)m_0(y)},\qquad P(Z=0\mid y)=\frac{(1-w)m_0(y)}{w m_1(y)+(1-w)m_0(y)}. $$

Dividing the first expression by the second cancels the common normalizing denominator. This gives the odds result:

$$ \frac{P(Z=1\mid y)}{P(Z=0\mid y)} = \frac{w}{1-w}\frac{m_1(y)}{m_0(y)} = \frac{w}{1-w}BF_{10}(y). $$
Theorem: Posterior odds for the borrowing component versus the protective component equal prior odds multiplied by \(BF_{10}(y)\). If \(BF_{10}(y)<1\), the data reduce the odds of borrowing relative to protection; if \(BF_{10}(y)>1\), they increase those odds. A Bayes factor of exactly 1 leaves the component odds unchanged.

The derivation also shows why the Bayes factor is not itself the posterior probability of borrowing. It is an evidence multiplier, and the prior odds still matter. Given posterior odds \(O\), the corresponding posterior probability of the borrowing component is \(O/(1+O)\).

1
Compute each component’s marginal likelihood.
Integrate the current-trial likelihood against each component prior, using the same likelihood and data for both.
2
Form the Bayes factor.
Divide the borrowing component’s marginal likelihood by the protective component’s marginal likelihood to obtain \(BF_{10}(y)\).
3
Update odds and, if useful, convert to a weight.
Multiply \(w/(1-w)\) by \(BF_{10}(y)\), then convert the posterior odds \(O\) to \(O/(1+O)\).

Worked Examples

Worked Example: Beta-Binomial Evidence Against Borrowing

Suppose a hypothetical trial observes 2 responses among 10 participants. Write \(X\) for the number of responses and \(p\) for the response probability, and assume \(X\mid p\sim\operatorname{Binomial}(10,p)\). Let the borrowing component be \(p\sim\operatorname{Beta}(8,2)\), concentrated toward higher response rates, and let the protective component be \(p\sim\operatorname{Beta}(1,1)\), uniform on \([0,1]\). Assume prior borrowing weight \(w=0.60\). These component priors and the binomial sampling model define the calculation.

For a beta prior with parameters \(a,b\), the probability of \(x\) responses is \(\binom{n}{x}B(a+x,b+n-x)/B(a,b)\), where \(B\) is the beta function. Thus the two marginal likelihoods are:

$$ m_1(2)=\binom{10}{2}\frac{B(10,10)}{B(8,2)} =45\frac{1/923780}{1/72} \approx 0.003507, \qquad m_0(2)=\binom{10}{2}B(3,9)=\frac{1}{11}\approx0.09091. $$

Here \(B(10,10)=1/923780\), \(B(8,2)=1/72\), and the uniform-prior predictive probability of 2 responses in 10 is \(1/(10+1)\). The Bayes factor and posterior odds are therefore:

$$ BF_{10}=\frac{0.003507}{0.09091}\approx0.03858,\qquad \frac{P(Z=1\mid X=2)}{P(Z=0\mid X=2)} =\frac{0.60}{0.40}(0.03858)\approx0.05787. $$

Converting these odds to a posterior borrowing probability gives \(0.05787/(1+0.05787)\approx0.05470\). Thus, under this specified model, the current trial shifts component probability strongly toward protection: the borrowing weight falls from 0.60 before the trial to about 0.0547 afterward. This is relative support between these two components, not a claim that the protective component is an adequate model in absolute terms.

Worked Example: Moderate Evidence in a Normal Model

Suppose a hypothetical trial yields a normally distributed summary \(Y=0.8\) with known sampling variance \(0.10\), and \(\theta\) is the treatment-effect parameter measured in the same units as \(Y\). Assume \(Y\mid\theta\sim N(\theta,0.10)\). Let the borrowing prior be \(\theta\sim N(0,0.10)\) and the protective prior be \(\theta\sim N(0,1.06)\). The marginal distribution of \(Y\) under each component is normal with mean 0 and variance equal to the sum of the sampling and prior variances: 0.20 for borrowing and 1.16 for protection. Set \(w=0.80\).

The component marginal densities at the observed value are:

$$ m_1(0.8)=\frac{1}{\sqrt{2\pi(0.20)}}\exp\!\left(-\frac{0.8^2}{2(0.20)}\right) \approx0.1801, $$
$$ m_0(0.8)=\frac{1}{\sqrt{2\pi(1.16)}}\exp\!\left(-\frac{0.8^2}{2(1.16)}\right) \approx0.2810. $$

Both densities are evaluated at the same observed value, in the same units. Their ratio, prior odds, and posterior odds are:

$$ BF_{10}=\frac{0.180104}{0.2810}\approx0.6407,\qquad \frac{P(Z=1\mid Y=0.8)}{P(Z=0\mid Y=0.8)} =\frac{0.80}{0.20}(0.6407)\approx2.563. $$

The posterior borrowing weight is \(2.5628/(1+2.5628)\approx0.719\). Although \(Y=0.8\) is away from the shared prior mean of zero, the borrowing component still has substantial posterior probability because the prior odds favored borrowing and the Bayes factor only moderately favored protection. The final weight reflects both sources of information.

Worked Example: Strong Reweighting Under a More Extreme Observation

Now consider a second hypothetical normal trial summary, \(Y=1.2\), with known sampling variance \(0.09\). Assume \(Y\mid\theta\sim N(\theta,0.09)\), with borrowing prior \(\theta\sim N(0,0.0225)\) and protective prior \(\theta\sim N(0,1.00)\). The marginal variances are \(0.1125\) and \(1.09\), respectively. Set prior borrowing weight \(w=0.70\). The assumptions make the component predictive distributions \(N(0,0.1125)\) and \(N(0,1.09)\).

Evaluating their densities at \(Y=1.2\) gives:

$$ m_1(1.2)=\frac{1}{\sqrt{2\pi(0.1125)}}\exp\!\left(-\frac{1.2^2}{2(0.1125)}\right) \approx0.001976, $$
$$ m_0(1.2)=\frac{1}{\sqrt{2\pi(1.09)}}\exp\!\left(-\frac{1.2^2}{2(1.09)}\right) \approx0.1974. $$

Using the unrounded component densities gives \(BF_{10}\approx0.010012\). The prior odds are \(0.70/0.30\approx2.3333\), so:

$$ \text{posterior odds} =\left(\frac{0.70}{0.30}\right)(0.010012) \approx0.02336,\qquad P(Z=1\mid Y=1.2)=\frac{0.02336}{1+0.02336}\approx0.02283. $$

The posterior borrowing weight is about 0.02283, down from 0.70. The observation is much more predictive under the broad protective component, so the current trial reallocates most component probability to protection. The arithmetic uses the full-precision density ratio; rounding the displayed densities before dividing can slightly alter the reported Bayes factor.

Interpretation, Diagnostics, and Limitations

A Bayes factor answers a comparative question: which component assigned greater predictive support to the observed current-trial data? It does not say whether either component predicts the data well in an absolute sense. For example, both marginal densities can be very small while their ratio favors one component. A poor fit shared by both components may therefore go undetected by the reweighting itself.

A practical calculation should be checked for the following:

  • Orientation: \(BF_{10}=m_1/m_0\) favors borrowing when it exceeds 1. Reversing the ratio reverses the interpretation.
  • Likelihood and data: Both marginal likelihoods must use the same observed data, endpoint definition, and sampling model. Differences in analysis or data scale invalidate a direct ratio.
  • Numerical stability: In complex models, marginal likelihoods may be tiny. Log marginal likelihoods can be used, with \(\log BF_{10}=\log m_1(y)-\log m_0(y)\), to avoid underflow.
  • Predictive adequacy: Check whether the observed data are plausible under the component predictive distributions, not only which density is larger. Posterior predictive checks address aspects of fit that a two-component ratio alone cannot.

The Bayes-factor representation has a useful comparison with two other summaries. Reporting only posterior component probabilities shows the final allocation but can hide whether it arose from strong data evidence or highly uneven prior odds. Reporting only the Bayes factor isolates the data’s relative contribution but omits the prior component odds. The odds identity presents both. A posterior predictive check, by contrast, can flag discrepancies that do not translate into a strong preference between the two specified components.

The result depends on the component priors and the likelihood through their marginal likelihoods. A Bayes factor is not a model-free measure of conflict, and a broad protective prior does not automatically guarantee good predictive behavior. It is also not a treatment-effect estimate or a measure of clinical benefit: it updates the probability of the component label. The posterior distribution for \(\theta\) is obtained by combining the component-specific posteriors using the updated component weights.

Common Mistake

Pitfall: “The Bayes factor is 0.64, so the posterior probability of borrowing is 0.64.” This confuses a multiplier with a probability. The correction is to multiply the prior odds by the Bayes factor, then convert the resulting posterior odds to a probability. For prior weight 0.80 and \(BF_{10}=0.6407\), posterior odds are \(4(0.6407)=2.5628\), and the posterior borrowing probability is \(2.5628/(1+2.5628)\approx0.719\), not 0.64.

In practice, large changes in component weight should prompt a check that the marginal likelihoods were computed under the intended model and that the observed data were entered correctly. A ratio near one means little relative reweighting; it does not establish that the two components are interchangeable or that the trial data are well described. These distinctions help keep the interpretation focused: the data update component odds according to comparative predictive support, conditional on the specified mixture.

Check Your Understanding

Answer each question using the odds identity, and then compare with the solutions.

  1. If prior borrowing odds are 3 and \(BF_{10}=2\), what are the posterior odds and posterior borrowing probability?
  2. If \(m_1(y)=0.04\), \(m_0(y)=0.20\), and prior borrowing weight is 0.50, which component does the data favor, and what is the posterior borrowing weight?
  3. Why can a Bayes factor favor the protective component without showing that the protective model fits the data well?
  4. For prior borrowing weight 0.25 and \(BF_{10}=1\), what happens to the borrowing weight?

Solutions. (1) Posterior odds are \(3(2)=6\), so the borrowing probability is \(6/(1+6)=0.8571\). (2) \(BF_{10}=0.04/0.20=0.20\), so the data favor protection; prior odds are 1, posterior odds are 0.20, and the posterior borrowing weight is \(0.20/1.20=0.1667\). (3) The Bayes factor compares the two component predictive densities only; both may assign low density to the data. (4) A Bayes factor of 1 leaves odds, and hence the weight, unchanged at 0.25.

Clinical Biostats