Tutorials › Biostatistics › Bayesian Predictive Probability for Trial Monitoring

Bayesian Clinical Trial Design & Monitoring

Bayesian Predictive Probability for Trial Monitoring

A practical and mathematical guide to Bayesian predictive probability for interim clinical trial monitoring, including posterior updating, beta-binomial predictive distributions, probability of final success, early stopping for efficacy and futility, a complete worked example, and R implementation.

Advanced 15 min read

What You'll Learn

  • What Bayesian predictive probability means in a clinical trial
  • How posterior distributions are updated at an interim analysis
  • How to calculate the predictive distribution for future patients
  • How predictive probability differs from posterior probability
  • How to construct Bayesian early efficacy and futility rules
  • How to implement predictive probability monitoring in R

Introduction

Clinical trials are often monitored before the planned final sample size has been reached. At an interim analysis, investigators may ask a practical question: Given everything observed so far, what is the probability that this trial will ultimately meet its prespecified success criterion?

Bayesian predictive probability provides a direct answer to this question. Rather than asking only whether the current data look favorable, predictive probability asks what is likely to happen after the remaining patients have been observed.

Key idea: Bayesian predictive probability is the posterior probability, averaged over the possible outcomes of future patients, that the trial will satisfy a prespecified final success criterion.

This makes predictive probability particularly useful for interim monitoring, where decisions may include:

  • Stop early for futility.
  • Stop early because success is already sufficiently likely.
  • Continue enrollment because the eventual outcome remains uncertain.
  • Modify the monitoring strategy according to a prespecified adaptive design.

The Fundamental Monitoring Question

Suppose a trial will ultimately enroll \(N\) patients and the primary endpoint is binary. Let:

  • \(Y\) = total number of responders at the final analysis
  • \(c\) = minimum number of responses required for final success
  • \(n\) = number of patients already observed
  • \(y\) = number of responses observed so far
  • \(N-n\) = number of patients remaining

The final success criterion might be:

$$ Y\ge c $$

At the interim analysis, the question becomes:

$$ P(Y\ge c\mid\text{current data}) $$

This is the posterior predictive probability of final success.

Predictive Probability Is Forward-Looking

There are two different Bayesian quantities that are commonly confused.

Quantity Question
Posterior probability How probable is a parameter value given the data observed so far?
Predictive probability Given the data observed so far, how probable is a future event?

For example, an investigator might calculate:

$$ P(p>0.30\mid\text{data}) $$

This asks how probable it is that the underlying response probability exceeds 30%.

Predictive probability instead asks:

$$ P(Y_{\text{final}}\ge c\mid\text{data}) $$

This asks how probable it is that the actual trial will ultimately achieve the required number of responses.

Important distinction: A high posterior probability that the treatment effect exceeds a target does not automatically imply the same probability of final trial success. Predictive probability also incorporates the uncertainty associated with the outcomes of patients who have not yet been observed.

A Simple Binary Endpoint

Suppose each patient either responds or does not respond. Let:

$$ Y_i\sim\operatorname{Bernoulli}(p) $$

where \(p\) is the true response probability. If \(n\) patients have been observed, then:

$$ Y_{\text{obs}}\sim\operatorname{Binomial}(n,p) $$

A Bayesian analysis assigns a prior distribution to \(p\). For a conjugate beta prior:

$$ p\sim\operatorname{Beta}(a,b) $$

The beta distribution has density proportional to:

$$ \pi(p) \propto p^{a-1}(1-p)^{b-1} $$

Updating the Prior

Suppose \(y\) responses are observed among \(n\) patients. The likelihood is:

$$ L(p\mid y) \propto p^y(1-p)^{n-y} $$

Combining the prior and likelihood gives:

$$ p\mid y \sim \operatorname{Beta}(a+y,b+n-y) $$

Thus, the posterior distribution is obtained simply by adding the observed responses and nonresponses to the beta prior parameters.

Conjugacy: The beta-binomial model is especially convenient for teaching and computation because the posterior distribution remains a beta distribution.

From the Posterior to Future Outcomes

Suppose \(m=N-n\) patients remain to be observed. Conditional on \(p\), the number of future responses is:

$$ X_{\text{future}}\mid p \sim \operatorname{Binomial}(m,p) $$

But \(p\) itself is uncertain. The Bayesian predictive distribution integrates over that uncertainty:

$$ P(X_{\text{future}}=x\mid y) = \int_0^1 P(X_{\text{future}}=x\mid p) \pi(p\mid y)\,dp $$

For the beta-binomial model, this integral has a closed-form solution.

The Beta-Binomial Predictive Distribution

If:

$$ p\mid y \sim \operatorname{Beta}(a',b') $$

where:

$$ a'=a+y \qquad b'=b+n-y $$

then the number of responses among the \(m\) future patients follows a beta-binomial distribution:

$$ X_{\text{future}}\mid y \sim \operatorname{BetaBinomial}(m,a',b') $$

Its probability mass function is:

$$ P(X_{\text{future}}=x\mid y) = {m\choose x} \frac{B(x+a',m-x+b')} {B(a',b')} $$

where \(B(\cdot,\cdot)\) denotes the beta function.

Connecting Future Responses to Final Success

The final number of responses is:

$$ Y_{\text{final}} = y+X_{\text{future}} $$

If at least \(c\) total responses are required for success, then:

$$ y+X_{\text{future}}\ge c $$

which is equivalent to:

$$ X_{\text{future}}\ge c-y $$

Therefore, the predictive probability of final success is:

$$ PP = P(X_{\text{future}}\ge c-y\mid y) $$

or, explicitly:

$$ PP = \sum_{x=c-y}^{m} {m\choose x} \frac{B(x+a',m-x+b')} {B(a',b')} $$
This is the central equation: Bayesian predictive monitoring reduces to calculating the probability that the remaining patients will provide enough additional responses to cross the final success threshold.

A Complete Worked Example

Consider a single-arm Phase II study with a binary response endpoint. The treatment will ultimately be evaluated after 40 patients. The investigators define success as observing at least 12 responses among the 40 patients.

Design Parameter Value
Maximum total sample size 40
Interim sample size 20
Patients remaining 20
Final success threshold 12 responses
Success response rate at final analysis 12/40 = 30%
Prior \(\operatorname{Beta}(1,1)\)
Predictive probability for efficacy \(\ge 90\%\)
Predictive probability for futility \(\le 10\%\)

The monitoring rule is therefore:

1
Predictive probability ≤ 10%: stop early for futility.
2
Predictive probability between 10% and 90%: continue enrollment.
3
Predictive probability ≥ 90%: stop early for efficacy.

Step 1: Specify the Prior

We use a uniform prior:

$$ p\sim\operatorname{Beta}(1,1) $$

Because both beta parameters equal 1, every value of \(p\) between 0 and 1 has equal prior density.

The prior mean is:

$$ E(p) = \frac{a}{a+b} = \frac{1}{2} = 0.50 $$

The prior is therefore deliberately simple for this worked example.

Clinical planning note: A uniform prior is not automatically appropriate for a real clinical trial. The prior should be justified using historical evidence, external studies, expert knowledge, or an explicitly chosen weakly informative framework.

Step 2: Observe the Interim Data

Suppose that after the first 20 patients, the study has observed:

$$ n=20 \qquad y=8 $$

The observed response rate is therefore:

$$ \hat p = \frac{8}{20} = 0.40 $$

The interim response rate of 40% appears encouraging. But the important Bayesian monitoring question is not simply whether 40% is encouraging. It is: How likely is the trial to finish with at least 12 responses?

Step 3: Calculate the Posterior Distribution

The prior is:

$$ p\sim\operatorname{Beta}(1,1) $$

The observed data are 8 responses and 12 nonresponses. Therefore:

$$ p\mid y \sim \operatorname{Beta}(1+8,1+12) $$

so:

$$ \boxed{ p\mid y \sim \operatorname{Beta}(9,13) } $$

Step 4: Posterior Mean

The posterior mean response probability is:

$$ E(p\mid y) = \frac{9}{9+13} = \frac{9}{22} \approx0.4091 $$

Thus the posterior mean is approximately 40.9%.

This is close to the observed response rate because 20 patients provide substantial information relative to the simple Beta(1,1) prior.

Step 5: Determine How Many Responses Are Needed

The final trial requires:

$$ Y_{\text{final}}\ge12 $$

Eight responses have already been observed. Therefore, the remaining 20 patients must contribute at least:

$$ 12-8=4 $$

additional responses.

The predictive question is therefore:

$$ P(X_{\text{future}}\ge4\mid y=8) $$

Step 6: Calculate the Predictive Distribution

The posterior is:

$$ p\mid y \sim \operatorname{Beta}(9,13) $$

and there are 20 future patients. Therefore:

$$ X_{\text{future}}\mid y \sim \operatorname{BetaBinomial}(20,9,13) $$

The probability of exactly \(x\) future responses is:

$$ P(X_{\text{future}}=x\mid y) = {20\choose x} \frac{B(x+9,20-x+13)} {B(9,13)} $$

Step 7: Calculate Predictive Probability of Success

The trial succeeds if at least four of the remaining 20 patients respond. Therefore:

$$ PP = \sum_{x=4}^{20} {20\choose x} \frac{B(x+9,33-x)} {B(9,13)} $$

Evaluating this sum gives:

$$ \boxed{PP\approx0.9482} $$

or approximately:

$$ \boxed{94.8\%} $$
Interpretation: Given the observed data and the specified prior, there is approximately a 94.8% posterior predictive probability that the trial will ultimately achieve at least 12 responses among 40 patients.

Step 8: Apply the Monitoring Rule

The prespecified efficacy boundary is:

$$ PP_{\text{efficacy}}\ge0.90 $$

The calculated predictive probability is:

$$ PP=0.9482 $$

Because:

$$ 0.9482>0.90 $$

the trial crosses the prespecified early efficacy monitoring boundary.

Under this illustrative monitoring rule, the trial would therefore:

✓
Stop early for efficacy because the posterior predictive probability of final success exceeds 90%.

Why This Is Different from Saying "The Response Rate Is 40%"

A frequentist interim summary might simply report:

$$ \hat p=\frac{8}{20}=40\% $$

That number describes what has happened. Predictive probability asks what is likely to happen next.

The distinction is:

Analysis Question Worked Example
Observed response rate What has happened so far? 40%
Posterior probability How probable is a parameter region? \(P(p>0.30\mid\text{data})\)
Predictive probability How probable is final success? 94.8%

Posterior Probability vs. Predictive Probability

For the worked example, one could calculate:

$$ P(p>0.30\mid y=8) $$

Under the Beta(9,13) posterior, this probability is approximately:

$$ \boxed{P(p>0.30\mid y=8)\approx0.852} $$

or about 85.2%.

The predictive probability of final success, however, is approximately 94.8%.

Why are they different? The posterior probability concerns the underlying response probability \(p\). Predictive probability concerns the future observed trial outcome. The latter incorporates the uncertainty about both \(p\) and the outcomes of the remaining patients.

The Predictive Distribution Automatically Incorporates Parameter Uncertainty

A common mistake is to plug the posterior mean into an ordinary binomial distribution.

For example, the posterior mean is approximately:

$$ E(p\mid y)\approx0.4091 $$

One might incorrectly calculate future responses using:

$$ X_{\text{future}} \sim \operatorname{Binomial}(20,0.4091) $$

That is not the Bayesian posterior predictive distribution.

The correct predictive distribution integrates over the entire posterior distribution of \(p\).

$$ P(X_{\text{future}}=x\mid y) = \int P(X_{\text{future}}=x\mid p) \pi(p\mid y)\,dp $$

The beta-binomial distribution is the result of this integration.

Why the Beta-Binomial Is More Variable Than a Plug-In Binomial

The ordinary binomial model assumes that \(p\) is fixed. The Bayesian predictive distribution recognizes that \(p\) is uncertain.

This produces an important variance decomposition:

$$ \operatorname{Var}(X_{\text{future}}\mid y) = E[\operatorname{Var}(X_{\text{future}}\mid p,y)\mid y] + \operatorname{Var}[E(X_{\text{future}}\mid p,y)\mid y] $$

The second term represents additional uncertainty caused by uncertainty about the underlying response probability.

This is one reason why posterior predictive calculations are more appropriate than simply treating the posterior mean as though it were known.

Futility Monitoring

Predictive probability can also be used to stop a trial for futility. Suppose the investigators define:

$$ PP_{\text{futility}}\le0.10 $$

as the criterion for stopping.

The interpretation is: Given the data observed so far, there is no more than a 10% chance that the trial will ultimately satisfy its success criterion.

Important: Bayesian futility is fundamentally different from proving that the treatment does not work. It indicates that, under the specified model and prior, final success has become sufficiently unlikely to justify stopping according to the prespecified decision rule.

An Interim Analysis with Only Four Responses

Consider the same trial after 20 patients, but suppose only four responses have been observed.

$$ n=20 \qquad y=4 $$

The posterior becomes:

$$ p\mid y \sim \operatorname{Beta}(5,17) $$

Eight additional responses are required among the remaining 20 patients:

$$ 12-4=8 $$

The posterior predictive probability of obtaining at least eight additional responses is approximately:

$$ \boxed{PP\approx0.1291} $$

or approximately 12.9%.

This does not cross the 10% futility threshold in our illustrative design, but it is substantially less encouraging than the previous example.

An Intermediate Interim Result

Now suppose there are seven responses among the first 20 patients.

$$ n=20 \qquad y=7 $$

The posterior is:

$$ p\mid y \sim \operatorname{Beta}(8,14) $$

Five additional responses are required among the remaining 20 patients.

The predictive probability of obtaining those five or more responses is:

$$ \boxed{PP\approx0.8233} $$

or approximately 82.3%.

This falls between the 10% futility and 90% efficacy boundaries. Therefore, the trial continues.

Three Possible Interim Outcomes

Responses After 20 Predictive Probability Decision
4 12.9% Continue
7 82.3% Continue
8 94.8% Stop for efficacy

This illustrates the continuous nature of Bayesian monitoring. The decision is not based solely on the observed response rate. It is based on how the current evidence changes the probability of achieving the final objective.

What Happens If the Trial Has Already Met the Final Criterion?

Suppose the trial has already observed at least 12 responses before reaching 40 patients. Then the final success criterion:

$$ Y_{\text{final}}\ge12 $$

is already guaranteed if the final analysis uses cumulative responses without a subsequent loss of evaluability.

The predictive probability of final success is therefore:

$$ PP=1 $$

In practice, however, the exact monitoring rule must account for endpoint maturity, follow-up requirements, and whether additional observations can change the analysis population.

Predictive Probability as an Integral

The most general Bayesian expression is:

$$ PP = P(\text{final success}\mid D) $$

where \(D\) represents all interim data. Using the law of total probability:

$$ PP = \int P(\text{final success}\mid p,D) \pi(p\mid D)\,dp $$

For the binary endpoint:

$$ PP = \int_0^1 P\left( X_{\text{future}}\ge c-y \mid p \right) \pi(p\mid D)\,dp $$

This formulation is important because it generalizes beyond the beta-binomial model.

Posterior Predictive Probability in General Models

The beta-binomial model is analytically convenient, but Bayesian predictive probability is not limited to binary endpoints. It can be used with:

  • Continuous endpoints
  • Count endpoints
  • Time-to-event endpoints
  • Repeated measures
  • Longitudinal models
  • Hierarchical models
  • Survival models
  • Bayesian logistic regression
  • Bayesian proportional hazards models
  • Bayesian response-adaptive designs

In more complex models, predictive probability is commonly calculated using posterior simulation rather than an analytic beta-binomial formula.

Monte Carlo Calculation

Suppose posterior draws are available:

$$ p^{(1)},p^{(2)},\ldots,p^{(M)} $$

For each posterior draw, simulate the future trial outcome. For draw \(j\):

$$ X^{(j)}_{\text{future}} \sim \operatorname{Binomial}(m,p^{(j)}) $$

Then calculate:

$$ \widehat{PP} = \frac{1}{M} \sum_{j=1}^{M} I\left[ y+X^{(j)}_{\text{future}}\ge c \right] $$

where \(I[\cdot]\) equals 1 when the final success criterion is satisfied and 0 otherwise.

This is the basic Monte Carlo approach to posterior predictive probability.

Why Predictive Probability Is Attractive for Monitoring

Predictive probability has several intuitive advantages.

  • It directly addresses the probability of eventual trial success.
  • It naturally incorporates uncertainty about the treatment effect.
  • It uses both observed and future information.
  • It can support both efficacy and futility decisions.
  • It can be applied to complex Bayesian models.
  • It provides a probability on a directly interpretable 0-to-1 scale.

Predictive Probability Is Not the Same as Conditional Power

Bayesian predictive probability is sometimes compared with conditional power. They are related but conceptually different.

Conditional power is generally defined within a frequentist framework as the probability of achieving a specified final rejection criterion conditional on the interim data, under a specified assumption about the unknown future effect.

Predictive probability instead averages over the posterior uncertainty about the unknown parameter.

Feature Conditional Power Bayesian Predictive Probability
Framework Typically frequentist Bayesian
Unknown treatment effect Specified or estimated for calculation Integrated over posterior distribution
Prior distribution Not required Required
Future outcomes Projected under specified effect Integrated over posterior uncertainty
Interpretation Probability of final success under a specified future-effect assumption Posterior probability of final success given current data
Key distinction: Conditional power conditions on an assumed future treatment effect. Bayesian predictive probability averages over uncertainty about that effect using the posterior distribution.

Predictive Probability Is Also Different from Posterior Probability of Efficacy

Suppose the clinical target is:

$$ p>0.30 $$

A Bayesian posterior analysis might calculate:

$$ P(p>0.30\mid D) $$

A predictive analysis might instead calculate:

$$ P(Y_{\text{final}}\ge12\mid D) $$

The first concerns the parameter. The second concerns the eventual trial outcome.

These quantities can be quite different, particularly when a substantial number of patients remain to be observed.

Choosing Predictive Probability Boundaries

A Bayesian monitoring rule typically specifies boundaries such as:

$$ PP\ge\gamma_E \quad\Rightarrow\quad \text{stop for efficacy} $$

and:

$$ PP\le\gamma_F \quad\Rightarrow\quad \text{stop for futility} $$

where:

  • \(\gamma_E\) = efficacy predictive-probability threshold
  • \(\gamma_F\) = futility predictive-probability threshold

For the worked example:

$$ \gamma_E=0.90 $$ and:
$$ \gamma_F=0.10 $$

These values are illustrative rather than universal.

Do not treat 90% and 10% as default regulatory thresholds. The choice of Bayesian decision thresholds should be justified through simulation and evaluation of the resulting operating characteristics.

Frequentist Operating Characteristics Still Matter

A Bayesian design can be specified using posterior and predictive probabilities, but that does not mean frequentist operating characteristics should be ignored.

For a confirmatory or highly consequential trial, investigators may evaluate the probability of incorrect decisions under repeated sampling.

For example:

  • Probability of early stopping for efficacy under an ineffective treatment
  • Probability of early stopping for futility under an effective treatment
  • Overall probability of final success
  • Overall type I error
  • Power
  • Expected sample size
  • Probability of stopping at each interim analysis

These quantities are generally estimated by simulation.

Bayesian Decision Rules Need Operating-Characteristic Evaluation

Suppose a trial has three interim analyses. At each analysis, predictive probability is calculated. The trial may stop when:

$$ PP\ge0.90 $$

or:

$$ PP\le0.10 $$

Because the rule is applied repeatedly, its long-run operating characteristics depend on the entire sequence of monitoring decisions.

Therefore, the design should be simulated across plausible values of the true treatment effect.

Simulation-Based Design Evaluation

A typical simulation proceeds as follows:

1
Specify the prior distribution.
2
Specify the enrollment and interim analysis schedule.
3
Specify the final success criterion.
4
Specify predictive-probability stopping thresholds.
5
Generate trial data under a chosen true treatment effect.
6
Perform the Bayesian interim analysis.
7
Apply the prespecified stopping rule.
8
Continue or stop the simulated trial.
9
Repeat thousands of times.
10
Summarize the resulting operating characteristics.

Prior Sensitivity

Bayesian predictive probability depends on the prior distribution. Therefore, prior sensitivity should be evaluated.

Suppose three priors are considered:

Prior Interpretation
\(\operatorname{Beta}(1,1)\) Uniform prior
\(\operatorname{Beta}(2,6)\) Prior centered near 25%
\(\operatorname{Beta}(1,9)\) Prior centered near 10%

With only a small amount of interim information, these priors may produce meaningfully different predictive probabilities.

As the sample size increases, the likelihood generally contributes more information and the influence of a weak prior decreases.

Prior sensitivity is part of design validation. If the monitoring decision changes dramatically under plausible alternative priors, the choice of prior should receive particular scrutiny.

Prior Predictive Checks

Before the trial begins, investigators can examine what the prior implies about the response rate. For a Beta(\(a,b\)) prior:

$$ E(p)=\frac{a}{a+b} $$

and:

$$ \operatorname{Var}(p) = \frac{ab} {(a+b)^2(a+b+1)} $$

A prior should generate clinically plausible response rates.

This is often more informative than simply describing a prior as "noninformative."

Information Borrowing

In some Bayesian clinical trials, historical data may be incorporated into the prior. For example:

$$ p\sim\operatorname{Beta}(a_H,b_H) $$

where the parameters represent information derived from historical studies.

The posterior then becomes:

$$ p\mid y \sim \operatorname{Beta}(a_H+y,b_H+n-y) $$

This can make the predictive probability more responsive to historical information, particularly early in the trial.

Caution: Historical information should not be treated as automatically exchangeable with current trial data. Differences in patient population, treatment setting, endpoint definitions, assessment schedules, and standard of care can make naive borrowing inappropriate.

Multiple Interim Analyses

Bayesian predictive monitoring can be performed repeatedly. For example, a 100-patient trial might have interim analyses after:

  • 25 patients
  • 50 patients
  • 75 patients
  • 100 patients

At each interim analysis, the predictive probability can be recalculated.

Analysis Patients Observed Decision Variable
Interim 1 25 \(PP_1\)
Interim 2 50 \(PP_2\)
Interim 3 75 \(PP_3\)
Final 100 Final posterior criterion

The important point is that the stopping rules should be established before observing the interim results.

Predictive Probability Can Be Used for Futility Without Proving Harm

Suppose the predictive probability of eventual success is only 3%. That does not necessarily mean:

$$ P(\text{treatment is ineffective}\mid D)=97\% $$

Those are different statements.

A low predictive probability says that final success is unlikely. It does not necessarily quantify the posterior probability of a particular alternative or null hypothesis.

A More General Success Criterion

The final success criterion does not have to be "at least \(c\) responses." For example, suppose success is defined by:

$$ p>p_{\text{target}} $$

Then predictive probability can be defined as the probability that the final analysis will satisfy the decision criterion.

For more complicated endpoints, the final decision might depend on:

  • A treatment effect exceeding a clinically meaningful difference
  • A posterior probability exceeding a threshold
  • A hazard ratio below a target
  • A response rate exceeding a benchmark
  • A credible interval satisfying a prespecified condition
  • A composite endpoint

Predictive Probability for Continuous Outcomes

Suppose the primary endpoint is continuous. Let the final success criterion be:

$$ \Delta_{\text{final}}>0 $$

The Bayesian model produces a posterior distribution for \(\Delta\). Future observations can then be simulated from the posterior predictive distribution.

The predictive probability becomes:

$$ PP = P(\Delta_{\text{final}}>0\mid D) $$

The same conceptual framework therefore applies even when a beta-binomial closed form is unavailable.

Predictive Probability for Time-to-Event Endpoints

For survival studies, predictive monitoring can incorporate both currently observed events and future events. For example, a trial might ultimately require:

$$ HR<0.75 $$

or a specified number of events.

A posterior survival model can be used to simulate future event times and censoring patterns. The predictive probability is then the proportion of simulated completed trials satisfying the final success criterion.

Predictive Probability in Hierarchical Models

Bayesian predictive monitoring becomes particularly powerful in hierarchical models. Suppose several centers or subgroups have:

$$ p_j\sim\operatorname{Beta}(\alpha,\beta) $$

and the study contains a common population-level distribution. The posterior distribution can borrow information across groups. Future observations are then generated from the posterior predictive distribution of the hierarchical model.

The conceptual monitoring rule remains unchanged:

$$ PP = P(\text{final success}\mid\text{current data}) $$

R Implementation: Beta-Binomial Example

The worked example can be implemented using base R. First specify the design:

a <- 1
b <- 1

n_interim <- 20
y_interim <- 8

N_final <- 40
success_threshold <- 12

n_future <- N_final - n_interim

p_eff <- 0.90
p_fut <- 0.10

Calculate the Posterior Parameters

a_post <- a + y_interim
b_post <- b + n_interim - y_interim

a_post
b_post

The result is:

a_post
# 9

b_post
# 13

Therefore:

$$ p\mid D \sim \operatorname{Beta}(9,13) $$

Calculate the Predictive Probability Directly

Base R does not provide a beta-binomial distribution function in the standard distribution package, so we can calculate the predictive probability directly using the beta function.

required_future <-
  success_threshold - y_interim

x <- required_future:n_future

predictive_probs <-
  choose(n_future, x) *
  beta(x + a_post,
       n_future - x + b_post) /
  beta(a_post, b_post)

PP <- sum(predictive_probs)

PP

The result is approximately:

PP
# 0.9482

Thus:

$$ \boxed{PP\approx94.8\%} $$

Implementing a General Predictive Probability Function

predictive_probability <- function(
    y,
    n,
    N,
    threshold,
    a = 1,
    b = 1
) {

  a_post <- a + y
  b_post <- b + n - y

  n_future <- N - n

  required <- threshold - y

  if (required <= 0) {
    return(1)
  }

  if (required > n_future) {
    return(0)
  }

  x <- required:n_future

  probs <- choose(n_future, x) *
    beta(
      x + a_post,
      n_future - x + b_post
    ) /
    beta(a_post, b_post)

  sum(probs)
}

The worked example can then be calculated with:

predictive_probability(
  y = 8,
  n = 20,
  N = 40,
  threshold = 12
)

which gives approximately:

# 0.9482

Apply the Monitoring Decision Rule in R

PP <- predictive_probability(
  y = 8,
  n = 20,
  N = 40,
  threshold = 12
)

decision <- ifelse(
  PP <= p_fut,
  "Stop for futility",
  ifelse(
    PP >= p_eff,
    "Stop for efficacy",
    "Continue"
  )
)

PP
decision

For the worked example, the output is approximately:

PP
# 0.9482

decision
# "Stop for efficacy"

Evaluate Predictive Probability Across Interim Response Counts

A useful design-development exercise is to calculate the predictive probability for every possible number of responses at the interim analysis.

results <- data.frame(
  responses = 0:n_interim
)

results$predictive_probability <-
  sapply(
    results$responses,
    function(y) {
      predictive_probability(
        y = y,
        n = n_interim,
        N = N_final,
        threshold = success_threshold
      )
    }
  )

results

This produces a complete mapping from the observed interim response count to the corresponding predictive probability.

The Monitoring Decision Can Be Expressed as Response Boundaries

Once the predictive-probability thresholds are fixed, the Bayesian decision rule may correspond to specific response-count boundaries. For example:

Interim Responses Predictive Probability Illustrative Decision
Very low Low Futility
Intermediate Intermediate Continue
High High Efficacy

This is an important practical point. A Bayesian monitoring rule may look probabilistic mathematically, but for a simple binomial endpoint the resulting decision can often be translated into integer response-count boundaries at each interim analysis.

Why Predictive Probability Changes During the Trial

Early in the trial, many outcomes remain possible. Therefore, predictive probability can be highly uncertain. As more patients are observed, fewer future outcomes remain capable of changing the final decision.

Consequently, predictive probability often becomes more extreme as information accumulates.

1
Early: substantial uncertainty about eventual success.
2
Middle: predictive probability separates increasingly toward efficacy or futility.
3
Late: relatively little future information remains.

Predictive Probability and Sample Size Reassessment

Bayesian predictive probability can also be used in adaptive sample-size designs. For example, an interim analysis might determine that:

  • The trial is very unlikely to succeed.
  • The trial is highly likely to succeed.
  • The trial remains uncertain and may benefit from additional information.

A prespecified rule might allow the sample size to increase in the uncertain region.

This creates a framework for:

$$ \text{Stop} \quad\text{or}\quad \text{Continue} \quad\text{or}\quad \text{Increase sample size} $$

Such adaptations require careful simulation because changing the maximum sample size changes the predictive probability calculation itself.

Predictive Probability and Adaptive Enrichment

In more advanced trials, predictive probability can be calculated separately for patient subgroups. For example:

$$ PP_{\text{overall}} $$

might be compared with:

$$ PP_{\text{subgroup}} $$

to determine whether a particular population appears more likely to meet the clinical success criterion.

Such designs require hierarchical modeling and prespecified decision rules to avoid ad hoc subgroup selection.

Simulation of a Bayesian Monitoring Design

The following R code illustrates the basic structure of a simulation.

simulate_trial <- function(
    p_true,
    N = 40,
    interim_n = 20,
    threshold = 12,
    a = 1,
    b = 1,
    futility = 0.10,
    efficacy = 0.90
) {

  y <- rbinom(
    1,
    interim_n,
    p_true
  )

  PP <- predictive_probability(
    y = y,
    n = interim_n,
    N = N,
    threshold = threshold,
    a = a,
    b = b
  )

  if (PP <= futility) {
    return("Futility")
  }

  if (PP >= efficacy) {
    return("Efficacy")
  }

  y_future <- rbinom(
    1,
    N - interim_n,
    p_true
  )

  y_final <- y + y_future

  if (y_final >= threshold) {
    "Final success"
  } else {
    "Final failure"
  }
}

Repeat the Simulation

set.seed(123)

sim_results <- replicate(
  10000,
  simulate_trial(
    p_true = 0.30
  )
)

table(sim_results)

prop.table(
  table(sim_results)
)

Repeating this process under different true response rates allows investigators to estimate the operating characteristics of the Bayesian monitoring design.

Operating Characteristics to Examine

A serious design evaluation should generally examine more than the predictive probability threshold itself. Important quantities include:

  • Probability of stopping for efficacy
  • Probability of stopping for futility
  • Probability of reaching the final analysis
  • Probability of final success
  • Expected sample size
  • Maximum sample size
  • Probability of each possible interim decision
  • Trial duration
  • Sensitivity to the prior

Evaluating the Design Under the Null

Suppose the clinically uninteresting response rate is:

$$ p_0=0.10 $$

Simulating thousands of trials under \(p=0.10\) allows investigators to estimate how frequently the Bayesian rule incorrectly declares efficacy.

This quantity is analogous to a frequentist type I error, although the Bayesian decision rule itself is defined using posterior or predictive probabilities.

Evaluating the Design Under the Alternative

Now suppose the clinically meaningful response rate is:

$$ p_1=0.30 $$

The simulation estimates how frequently the Bayesian monitoring design leads to eventual success.

This provides a frequentist operating characteristic corresponding to the Bayesian decision rule.

Important: Bayesian inference and frequentist operating characteristics are not mutually exclusive. A Bayesian design can use posterior probabilities for its decisions while still being evaluated through repeated-sampling simulation.

Common Mistake: Confusing Predictive Probability with Observed Probability

Suppose eight of 20 patients respond. It is incorrect to state:

$$ P(\text{final success})=8/20=40\% $$

The 40% is the observed interim response rate. It is not a probability of final success.

The Bayesian predictive probability in our example is approximately:

$$ PP=94.8\% $$

because the calculation incorporates the possible outcomes of the remaining 20 patients.

Common Mistake: Using the Posterior Mean as the True Response Rate

Another common mistake is:

$$ p=E(p\mid D) $$

followed by an ordinary binomial calculation.

This ignores posterior uncertainty. The correct calculation is:

$$ PP = \int P(\text{success}\mid p,D) \pi(p\mid D)\,dp $$

Common Mistake: Ignoring the Prior

A Bayesian predictive probability cannot be interpreted independently of its prior. Two analysts using identical interim data but different priors may obtain different predictive probabilities.

Therefore, the statistical analysis plan should document:

  • The prior distribution
  • The rationale for the prior
  • Any historical data used
  • The prior sensitivity analyses
  • The predictive probability calculation
  • The monitoring thresholds

Common Mistake: Treating 90% as a Universal Bayesian Threshold

There is no universal rule that Bayesian efficacy monitoring must use:

$$ PP\ge0.90 $$

Likewise, there is no universal requirement that futility use:

$$ PP\le0.10 $$

These are design parameters. Their appropriateness depends on the consequences of false efficacy and false futility decisions, the prior, the number and timing of interim analyses, and the clinical context.

Common Mistake: Forgetting That Monitoring Is Sequential

If predictive probability is evaluated repeatedly, the overall behavior of the trial depends on all the interim analyses.

For example, a trial monitored at 20, 30, 40, and 50 patients has more opportunities to stop early than a trial monitored only once.

The complete monitoring schedule therefore belongs in the design simulation.

Common Mistake: Changing the Prior After Seeing the Data

The prior should be specified independently of the observed trial outcomes. Changing the prior after seeing interim results because it produces a more favorable or unfavorable predictive probability undermines the prespecified operating characteristics.

Prespecification matters: The prior, endpoint, monitoring schedule, predictive probability definition, and decision thresholds should be established before the interim data are examined.

Common Mistake: Ignoring Missing Data

The simple beta-binomial example assumes that each patient contributes a well-defined binary outcome. Real clinical trials may include:

  • Missing assessments
  • Loss to follow-up
  • Early treatment discontinuation
  • Delayed responses
  • Unevaluable patients

The Bayesian model must specify how these observations are handled.

For more complex missing-data mechanisms, predictive probability may need to integrate over missing outcomes as well as the treatment-effect parameter.

Predictive Probability with Missing Outcomes

Suppose some interim patients have not yet reached their response assessment time. Rather than simply discarding those patients, a Bayesian model can potentially represent the uncertainty about their eventual outcomes.

The predictive calculation can then incorporate:

$$ P(\text{final success}\mid \text{observed data}, \text{pending data}) $$

This can be particularly useful in trials where response assessment is delayed.

Bayesian Predictive Probability and Data Maturity

Enrollment and information availability are not always the same thing. A trial may have enrolled 50 patients while only 35 have mature primary endpoint assessments.

A monitoring plan should therefore specify whether interim analyses are based on:

  • Number enrolled
  • Number evaluable
  • Number with mature endpoint data
  • Number of events
  • A calendar-based information fraction

The predictive model should reflect the actual information structure of the trial.

Bayesian Predictive Probability and Randomization

The same framework can be extended to randomized trials. Suppose:

$$ \Delta=p_T-p_C $$

is the treatment-control response difference. The posterior distribution of \(\Delta\) can be used to generate future outcomes in both treatment groups.

The predictive probability might then be:

$$ PP = P(\Delta_{\text{final}}>\delta \mid D) $$

where \(\delta\) is the clinically meaningful treatment difference.

For more complicated randomized designs, posterior simulation is generally more practical than closed-form calculations.

Bayesian Predictive Probability and Clinical Relevance

The final success criterion should be clinically meaningful. For example, a trial should not define success simply because:

$$ PP>0.90 $$

The predictive probability threshold is only part of the decision rule. The underlying target should reflect the clinical question.

For example:

$$ p>p_{\text{clinically meaningful}} $$

or:

$$ \Delta>\delta_{\text{MCID}} $$

may define the scientifically meaningful objective.

A Practical Bayesian Monitoring Workflow

1
Define the primary endpoint.
2
Define the clinically meaningful success criterion.
3
Specify the prior distribution.
4
Specify the interim analysis schedule.
5
Specify the final analysis criterion.
6
Calculate the posterior distribution at each interim.
7
Generate the posterior predictive distribution for future outcomes.
8
Calculate the predictive probability of final success.
9
Apply prespecified efficacy and futility thresholds.
10
Evaluate frequentist operating characteristics by simulation.
11
Perform prior sensitivity analyses.
12
Document the complete monitoring algorithm in the protocol and SAP.

What Should Be Specified in the Protocol?

A Bayesian predictive monitoring design should be sufficiently detailed that another statistician could reproduce the decision. At minimum, specify:

  • Primary endpoint
  • Statistical model
  • Prior distribution
  • Rationale for the prior
  • Historical information incorporated into the prior
  • Interim analysis timing
  • Final sample size
  • Final success criterion
  • Definition of predictive probability
  • Efficacy predictive-probability threshold
  • Futility predictive-probability threshold
  • Handling of missing data
  • Handling of unevaluable patients
  • Posterior computation method
  • Predictive simulation method, if applicable
  • Prior sensitivity analyses
  • Operating-characteristic simulations

Worked Example Summary

Component Value
Endpoint Binary response
Prior \(\operatorname{Beta}(1,1)\)
Maximum sample size 40
Interim sample size 20
Future sample size 20
Final success criterion \(\ge12\) total responses
Target final response rate 30%
Observed interim responses 8
Observed interim response rate 40%
Posterior \(\operatorname{Beta}(9,13)\)
Responses required among remaining patients 4
Predictive probability Approximately 94.8%
Efficacy threshold 90%
Illustrative decision Stop for efficacy

The Most Important Concept

The most important conceptual point is that Bayesian predictive probability looks forward, not merely backward.

An interim response rate describes what has already happened. A posterior distribution describes what is believed about the unknown parameter after observing those data. A posterior predictive distribution describes what may happen in the future, conditional on the current information.

Predictive probability then asks whether those future outcomes are likely to produce the final clinical-trial success criterion.

$$ \boxed{ PP = P(\text{final success}\mid\text{current data}) } $$

For a simple beta-binomial model, this can be calculated exactly. For complex clinical trials, the same concept can be implemented using posterior simulation and Monte Carlo methods.

Bottom line: Bayesian predictive probability provides a forward-looking framework for interim clinical trial monitoring. It combines the posterior distribution of the treatment effect with the distribution of future patient outcomes to calculate the probability that the trial will ultimately satisfy its prespecified success criterion. This makes it possible to define transparent rules for early efficacy and futility stopping, while naturally incorporating parameter uncertainty. In a simple binary-endpoint trial with a beta prior, the predictive distribution is beta-binomial and can be calculated exactly. In more complex trials, posterior predictive simulation provides the general framework. The prior, monitoring schedule, predictive-probability thresholds, and final decision criterion should all be prespecified and evaluated through prior sensitivity analyses and simulation of operating characteristics.

References

Berry, D.A. (2006). Bayesian clinical trials. Nature Reviews Drug Discovery, 5, 27–36.
Berry, S.M., Carlin, B.P., Lee, J.J. & Muller, P. (2010). Bayesian Adaptive Methods for Clinical Trials. CRC Press.
Gelman, A., Carlin, J.B., Stern, H.S., Dunson, D.B., Vehtari, A. & Rubin, D.B. (2013). Bayesian Data Analysis, 3rd ed. CRC Press.
Spiegelhalter, D.J., Abrams, K.R. & Myles, J.P. (2004). Bayesian Approaches to Clinical Trials and Health-Care Evaluation. Wiley.
Thall, P.F., Simon, R. & Estey, E.H. (1995). Bayes' statistical approach to Phase II clinical trials in small populations. Journal of Clinical Oncology, 13, 2116–2124.
Thall, P.F. & Simon, R. (1994). Recent developments in the design of phase II clinical trials. Current Opinion in Oncology, 6, 371–376.
Lee, J.J. & Liu, D.D. (2008). A predictive probability approach to interim monitoring of clinical trials. Clinical Trials, 5, 491–498.