Tutorials › Bayesian Clinical Trials › Eliciting Beta Priors From Mean and Variance

Choosing and Eliciting Priors · Tutorial 41 of 696

Eliciting Beta Priors From Mean and Variance

Convert uncertainty about a clinical event probability into a Beta prior by matching its mean and variance and checking the resulting parameters.

Intermediate 11 min read

What You'll Learn

  • Derive the mean and variance of a Beta distribution from its shape parameters
  • Convert an elicited mean and variance into Beta shape parameters
  • Check the mathematical feasibility of elicited moments before fitting a prior
  • Interpret how the implied concentration controls prior uncertainty
  • Distinguish uncertainty about an event probability from variation in patient outcomes

Why Elicit a Mean and Variance?

A clinical team may be able to describe what it believes about an event probability without being able to name a prior distribution. For example, experts might assess that the probability of a particular adverse event is centered near 20%, with a specified degree of uncertainty. A Beta prior provides a flexible distribution on probabilities from 0 to 1, and its two shape parameters can be chosen to match those two elicited moments.

The conversion is useful only when the requested moments are compatible with a proper Beta distribution. Checking feasibility is therefore part of the elicitation, not a technical afterthought. It can also expose a mismatch between an expert’s stated mean and uncertainty, a misunderstanding about what “uncertainty” refers to, or a moment that is simply too large to be represented by this family.

Definition: Let \(p\) be an unknown clinical event probability, represented as uncertain under a prior distribution. A Beta prior with shape parameters \(a>0\) and \(b>0\), written \(p\sim\operatorname{Beta}(a,b)\), has density proportional to \(p^{a-1}(1-p)^{b-1}\) for \(0<p<1\). Its prior mean is \(m=E[p]\), and its prior variance is \(v=\operatorname{Var}(p)\). Both \(a\) and \(b\) are dimensionless.

Here \(p\) represents uncertainty about the underlying probability, not the outcome for one patient. If a patient’s event indicator is Bernoulli with probability \(p\), that indicator varies from patient to patient even when \(p\) is fixed. The variance elicited for this tutorial is the prior variance of \(p\), not the Bernoulli outcome variance \(p(1-p)\), nor the sampling variance of an observed event proportion.

Beta Moments and the Conversion

For a Beta distribution, the mean and variance are

$$ E[p]=\frac{a}{a+b}, \qquad \operatorname{Var}(p)=\frac{ab}{(a+b)^2(a+b+1)}. $$

Write \(k=a+b\), the total concentration of the prior. The mean equation gives \(a=mk\) and \(b=(1-m)k\). Substituting those expressions into the variance equation gives

$$ v=\frac{m(1-m)}{k+1}. $$

Solving for \(k\), then multiplying by the mean and its complement, gives the moment-matching conversion:

$$ k=\frac{m(1-m)}{v}-1, \qquad a=m\left(\frac{m(1-m)}{v}-1\right), \qquad b=(1-m)\left(\frac{m(1-m)}{v}-1\right). $$

Thus the mean sets the relative sizes of \(a\) and \(b\), while the variance determines their sum. For a fixed mean, smaller variance means larger \(k\), and therefore a more concentrated prior. This total concentration is also the effective sample size convention used for a Beta prior; interpreting it as literal historical patient data would require an additional substantive justification.

Why the Feasibility Check Is Necessary

For a proper Beta distribution, both shape parameters must be strictly positive. If the elicited mean satisfies \(0<m<1\), then \(a>0\) and \(b>0\) exactly when \(k>0\). By the expression for \(k\), this requires \(v<m(1-m)\). A genuine Beta distribution also has positive variance, so the full condition is

$$ 0<m<1 \qquad\text{and}\qquad 0<v<m(1-m). $$

The upper bound is strict: setting \(v=m(1-m)\) gives \(k=0\), and hence \(a=b=0\), which is not a proper Beta prior. A variance larger than this bound produces negative concentration and invalid shape parameters. At the other extreme, \(v=0\) would require infinite concentration in the moment-matching formula. It describes a point mass at \(m\), not a proper Beta distribution with finite positive shape parameters.

Feasibility result: A finite, proper Beta distribution can match an elicited mean \(m\) and variance \(v\) if and only if \(0<m<1\) and \(0<v<m(1-m)\). When these conditions hold, the formulas above give the unique Beta shape parameters matching both moments.

The bound follows directly from the variance relation: for any positive \(k\), \(k+1>1\), so \(v=m(1-m)/(k+1)<m(1-m)\). Conversely, if \(0<v<m(1-m)\), then \(k=m(1-m)/v-1>0\); since \(0<m<1\), both \(mk\) and \((1-m)k\) are positive. The resulting Beta prior is proper and has the requested moments.

Worked Conversions

Worked Example: Matching a Mean of 0.20 and Variance of 0.0025

Suppose experts assessing a hypothetical clinical event give a prior mean probability of \(m=0.20\) and prior variance \(v=0.0025\). First check feasibility. The maximum allowed variance for this mean is \(m(1-m)=0.20(0.80)=0.16\), and \(0<0.0025<0.16\), so a proper Beta match is possible.

Find the concentration. Substitute the elicited values:

$$ k=\frac{m(1-m)}{v}-1 =\frac{0.20(0.80)}{0.0025}-1 =\frac{0.16}{0.0025}-1 =64-1=63. $$

Find the shape parameters.

$$ a=mk=0.20(63)=12.6, \qquad b=(1-m)k=0.80(63)=50.4. $$

The prior is therefore \(p\sim\operatorname{Beta}(12.6,50.4)\). Checking the result, its mean is \(12.6/(12.6+50.4)=0.20\), and its variance is \(0.20(0.80)/(63+1)=0.16/64=0.0025\). The elicited standard deviation, if desired for communication, is \(\sqrt{0.0025}=0.05\), or 5 percentage points.

Worked Example: Converting an Elicited Standard Deviation

For a different hypothetical endpoint, suppose the elicited mean probability is \(m=0.30\) and the elicited prior standard deviation is \(0.10\). The conversion uses variance, so square the standard deviation: \(v=(0.10)^2=0.0100\). The maximum allowed variance is \(0.30(0.70)=0.21\), and \(0<0.0100<0.21\), so the moments are feasible.

The concentration and shapes are

$$ k=\frac{0.30(0.70)}{0.0100}-1 =\frac{0.21}{0.0100}-1 =21-1=20, $$
$$ a=0.30(20)=6, \qquad b=0.70(20)=14. $$

The matched prior is \(p\sim\operatorname{Beta}(6,14)\). Its mean is \(6/20=0.30\), and its variance is \(6(14)/(20^2\cdot21)=84/8400=0.0100\). This example illustrates an important unit-of-input check: entering \(0.10\) as the variance instead of squaring the elicited standard deviation would represent a different and much more uncertain prior.

Worked Example: Detecting an Infeasible Elicitation

Suppose experts state a mean event probability of \(m=0.35\) and a prior variance of \(v=0.25\). The largest variance a Beta prior can have at this mean is

$$ m(1-m)=0.35(0.65)=0.2275. $$

The requested variance, \(0.25\), exceeds \(0.2275\). Applying the conversion confirms the problem:

$$ k=\frac{0.2275}{0.25}-1=0.91-1=-0.09. $$

This would give \(a=0.35(-0.09)=-0.0315\) and \(b=0.65(-0.09)=-0.0585\), neither of which is a valid positive Beta shape parameter. The correct conclusion is not to use these values or silently truncate the variance. The elicited pair cannot be represented by a proper Beta prior. The team should revisit the stated uncertainty, clarify whether it meant a variance of \(p\), or consider whether a Beta family is appropriate.

Assumptions, Diagnostics, and Alternatives

Moment matching has a small set of mathematical requirements, but its clinical interpretation depends on the elicitation being clearly defined. The probability \(p\) should refer to a specified event, population, treatment arm, and time horizon. If the event probability is intended to be common across patients, a single \(p\) and a Beta prior can express uncertainty about that common probability. If the target instead varies across subgroups or patients, one Beta distribution for one probability may not capture the intended structure.

Before accepting a calculated prior, check the following:

  • Confirm the scale. Record probabilities on the 0-to-1 scale, and convert percentages consistently. For example, 20% is \(0.20\).
  • Distinguish variance from standard deviation. If experts state a standard deviation, square it before using the formulas.
  • Check the range and boundary cases. Verify \(0<m<1\) and \(0<v<m(1-m)\) before calculating shapes. Means of exactly 0 or 1, or a variance of exactly zero, do not yield a finite proper Beta match.
  • Recalculate the moments. After rounding \(a\) and \(b\), compute \(a/(a+b)\) and \(ab/[(a+b)^2(a+b+1)]\). Confirm that they still agree adequately with the elicited values.
  • Review implausible inputs with the experts. A feasible pair is mathematically valid, but feasibility alone does not establish that the elicitation is clinically meaningful.

Moment matching is one way to specify a Beta prior, not a guarantee that the Beta family captures every feature of expert belief. It uses only two summaries and does not ensure that the resulting distribution expresses all relevant tail concerns or other aspects of the elicited judgment. A common alternative is to elicit a mean and a concentration, or effective sample size, and use \(a=mk\), \(b=(1-m)k\); this changes which quantity is elicited directly, not the underlying two-parameter Beta model. If experts find probability statements more natural than moments, other elicitation strategies may be considered, but their conversion requires different information.

Common Mistakes

Common mistake: “The requested variance is positive, so it must be possible to fit a Beta prior.” Correction: Positivity alone is not enough. A proper Beta match requires \(v<m(1-m)\) as well as \(0<m<1\). Also, a stated standard deviation must be squared before it is used as \(v\).

Another frequent error is interpreting \(v\) as the variability of individual clinical outcomes. If \(Y\) is a Bernoulli event indicator with probability \(p\), then the outcome variance conditional on \(p\) is \(p(1-p)\). The prior variance \(\operatorname{Var}(p)\), by contrast, describes uncertainty about the probability itself. They answer different questions and generally are not equal.

Check Your Understanding

For each question, decide whether the moments are feasible and, when they are, calculate the corresponding Beta shapes. Solutions are included below.

  1. A hypothetical event probability has elicited mean \(m=0.40\) and variance \(v=0.012\). Find \(k\), \(a\), and \(b\).
  2. A prior mean is \(m=0.25\), and experts report a prior standard deviation of \(0.15\). Find the Beta shapes or explain why no match exists.
  3. Can a proper Beta prior have mean \(m=0.60\) and variance \(v=0.25\)? Explain using the feasibility bound.
  4. In one sentence, distinguish the prior variance of \(p\) from the variance of a Bernoulli event indicator conditional on \(p\).

Solutions. (1) The bound is \(m(1-m)=0.40(0.60)=0.24\), so \(0<0.012<0.24\). Then \(k=0.24/0.012-1=20-1=19\), \(a=0.40(19)=7.6\), and \(b=0.60(19)=11.4\). (2) Square the standard deviation to obtain \(v=0.15^2=0.0225\). The bound is \(0.25(0.75)=0.1875\), so the moments are feasible. Then \(k=0.1875/0.0225-1=8.3333-1=7.3333\), \(a=0.25(7.3333)\approx1.8333\), and \(b=0.75(7.3333)=5.5000\). (3) No. The bound is \(0.60(0.40)=0.24\), and \(0.25>0.24\). (4) The prior variance describes uncertainty about the unknown probability \(p\), whereas the conditional Bernoulli variance \(p(1-p)\) describes variation in individual outcomes when \(p\) is fixed.

Clinical Biostats