Tutorials › Bayesian Clinical Trials › Gamma Precision Priors in Normal Models

Robustness to Prior-Data Conflict · Tutorial 421 of 696

Gamma Precision Priors in Normal Models

Learn when a Gamma precision prior gives a conjugate conditional update, how to derive it, and how to interpret its uncertainty without mistaking it for a marginal posterior.

Advanced 11 min read

What You'll Learn

  • Specify a normal commensurate model and the assumptions required for its conditional update.
  • Derive the conditional Gamma posterior for the commensurability precision.
  • Distinguish conditional conjugacy from the generally non-Gamma marginal posterior.
  • Calculate conditional updates and examine how precision uncertainty affects borrowing.
  • Recognize diagnostics, limitations, and alternatives to a Gamma precision prior.

Why put a distribution on commensurability precision?

A commensurate prior lets current-trial information borrow from a historical estimate while allowing the current effect to differ from the historical one. The commensurability precision, denoted by \(\tau\), controls the prior distribution of that difference: a large \(\tau\) concentrates the current effect near the historical estimate, while a small \(\tau\) permits a wider difference. Fixing \(\tau\) fixes this degree of borrowing in advance. A Gamma prior instead represents uncertainty about it, so the data and the model jointly determine how much weight is placed on different precision values.

This flexibility does not mean that every posterior update for \(\tau\) is a Gamma distribution. Conjugacy applies to a particular conditional distribution: \(\tau\) given the latent current effect and the historical target. Once the latent effect is integrated out, the likelihood for \(\tau\) is generally not Gamma-conjugate. Keeping those two statements distinct is essential for deriving and implementing the model correctly.

Model and assumptions

Definition: Let \(m_H\) be a fixed historical estimate used as the commensurate target, and let \(y_C\) be a current-trial estimate of an unknown current effect \(\theta_C\). Assume \(y_C\mid\theta_C\sim N(\theta_C,V_C)\), \(\theta_C\mid\tau\sim N(m_H,1/\tau)\), and \(\tau\sim\operatorname{Gamma}(a,b)\), where \(a>0\), \(b>0\), and Gamma uses the shape-rate convention. Thus the prior density for \(\tau\) is proportional to \(\tau^{a-1}\exp(-b\tau)\), and its mean is \(a/b\).

Here \(V_C\) is a known sampling variance and \(\tau\) has units equal to the inverse square of the effect’s units. For example, if effects are measured in score points, \(\tau\) is measured in inverse squared score points. The model treats \(m_H\) as fixed and assumes a normal sampling distribution with known variance, a normal commensurate prior conditional on \(\tau\), and a Gamma prior independent of the current sampling error. These assumptions should be scientifically and statistically defensible; the conjugate algebra does not establish that they are appropriate.

The historical target may itself be an estimate with uncertainty. In this particular model, that uncertainty is not separately represented: \(m_H\) is treated as fixed. A model that assigns a distribution to the historical effect needs additional assumptions and may have different conditional updates. The calculations below concern one current effect and one fixed historical target.

The conditional Gamma update

Conditional on a value of \(\theta_C\), the only likelihood contribution involving \(\tau\) comes from the normal prior for \(\theta_C\). Its density as a function of \(\tau\) is proportional to \(\tau^{1/2}\exp\{-\tau(\theta_C-m_H)^2/2\}\). Multiplying by the Gamma prior kernel gives the conditional posterior.

$$ \begin{aligned} p(\tau\mid\theta_C,m_H,y_C) &\propto p(\theta_C\mid\tau,m_H)\,p(\tau)\\ &\propto \tau^{1/2} \exp\!\left\{-\frac{\tau}{2}(\theta_C-m_H)^2\right\} \tau^{a-1}\exp(-b\tau)\\ &\propto \tau^{a+1/2-1} \exp\!\left\{-\tau\left(b+\frac{(\theta_C-m_H)^2}{2}\right)\right\}. \end{aligned} $$
Theorem: Under the stated model, the full conditional distribution is \(\tau\mid\theta_C,m_H,y_C\sim\operatorname{Gamma}\!\left(a+\tfrac12,\ b+\tfrac12(\theta_C-m_H)^2\right)\), using shape-rate parameterization. The current estimate \(y_C\) does not appear separately once \(\theta_C\) is conditioned on.

The update has a direct interpretation. One observed scalar difference, \(\theta_C-m_H\), adds \(1/2\) to the shape and adds half its squared magnitude to the rate. A large difference increases the rate and therefore tends to lower the conditional mean precision. If the effects have units \(U\), the squared difference has units \(U^2\), matching the rate’s units; the Gamma rate is measured in \(U^2\), while \(\tau\) is measured in \(U^{-2}\).

Worked conditional updates

Worked Example: Updating Precision After a Small Difference

Suppose the effect is measured in points, \(m_H=2.0\) points, and the prior on precision is \(\operatorname{Gamma}(2,1)\), with rate \(1\) point-squared. For a particular conditional update, suppose the current latent effect is \(\theta_C=2.8\) points. Find the conditional distribution of \(\tau\) and its mean.

The difference is \(2.8-2.0=0.8\) points, so its squared value is \(0.64\) point-squared. The conditional shape is \(2+0.5=2.5\), and the conditional rate is \(1+0.64/2=1.32\) point-squared. Therefore \(\tau\mid\theta_C=2.8,m_H\sim\operatorname{Gamma}(2.5,1.32)\).

For a shape-rate Gamma distribution, the mean is shape divided by rate. Thus the conditional mean is \(2.5/1.32=1.894\) inverse point-squared. This is a conditional posterior mean, given the latent effect value of 2.8 points; it is not the posterior mean after averaging over uncertainty in \(\theta_C\).

Worked Example: A Larger Difference Lowers Conditional Precision

Keep the same historical target and prior, but suppose a conditional update uses \(\theta_C=5.0\) points. Calculate the updated distribution and compare its mean with the previous example.

The difference is \(5.0-2.0=3.0\) points, and half its square is \(3^2/2=4.5\) point-squared. The shape remains \(2.5\), while the rate becomes \(1+4.5=5.5\) point-squared. Hence \(\tau\mid\theta_C=5.0,m_H\sim\operatorname{Gamma}(2.5,5.5)\), with mean \(2.5/5.5=0.4545\) inverse point-squared.

The conditional mean is lower than \(1.894\) in the first example because this latent effect is farther from the historical target. The update expresses a tendency toward lower commensurability precision for a larger discrepancy. It does not, by itself, prove that the historical and current effects are clinically incompatible; that judgment requires context and examination of the full posterior.

Why the marginal posterior is not the same update

In an analysis, \(\theta_C\) is unknown. Its conditional distribution given \(\tau\) and the data is normal, because the sampling model and commensurate prior are both normal. Completing the square gives

$$ \theta_C\mid\tau,y_C,m_H\sim N\!\left( \frac{y_C/V_C+\tau m_H}{1/V_C+\tau}, \frac{1}{1/V_C+\tau} \right). $$

This conditional distribution can be combined with the Gamma full conditional in an iterative sampler: draw \(\theta_C\) given the current \(\tau\), then draw \(\tau\) given the new \(\theta_C\). The draws must be allowed to reach their joint posterior distribution before they are summarized. The Gamma update alone is not a complete posterior analysis.

To see why integrating out \(\theta_C\) changes the form, the normal sampling model convolved with the normal commensurate prior gives \(y_C\mid\tau,m_H\sim N(m_H,V_C+1/\tau)\). Consequently, the marginal posterior kernel for \(\tau\) is

$$ p(\tau\mid y_C,m_H)\propto \tau^{a-1}\exp(-b\tau) (V_C+1/\tau)^{-1/2} \exp\!\left\{-\frac{(y_C-m_H)^2}{2(V_C+1/\tau)}\right\}, \qquad \tau>0. $$

This kernel is generally not a Gamma density: both the variance factor and the exponential involving \(V_C+1/\tau\) depend on \(\tau\) in forms that cannot be absorbed into a Gamma shape and rate. The derivation also gives a useful check: if \(y_C\) is far from \(m_H\), values of \(\tau\) that imply very little prior variance can receive less marginal support. But the resulting posterior can still have substantial uncertainty, and its shape depends on the prior and the sampling variance.

Worked Example: How Precision Values Change the Conditional Effect Distribution

Suppose \(y_C=3.2\) points, \(V_C=1.0\) point-squared, and \(m_H=2.0\) points. Compare the conditional mean and variance of \(\theta_C\) at three illustrative precision values, \(\tau=0.5,\ 2,\ 8\) inverse point-squared.

At \(\tau=0.5\), the posterior precision for \(\theta_C\) is \(1/V_C+\tau=1+0.5=1.5\). Its conditional mean is \((3.2/1+0.5\times2.0)/1.5=4.2/1.5=2.800\) points, and its variance is \(1/1.5=0.6667\) point-squared.

At \(\tau=2\), the posterior precision is \(3\), the mean is \((3.2+2\times2.0)/3=7.2/3=2.400\) points, and the variance is \(1/3=0.3333\) point-squared. At \(\tau=8\), the posterior precision is \(9\), the mean is \((3.2+8\times2.0)/9=19.2/9=2.133\) points, and the variance is \(1/9=0.1111\) point-squared.

These are conditional calculations, not probabilities that each precision value is correct. They show why uncertainty in \(\tau\) matters: different plausible precision values yield different conditional distributions for the current effect. To summarize borrowing uncertainty, the analysis must use the posterior distribution of \(\tau\) together with the conditional uncertainty in \(\theta_C\), rather than selecting one illustrative value and treating it as known.

Prior uncertainty, checks, and alternatives

A Gamma prior is flexible in shape but still imposes a particular distribution on positive precision values. Its parameters should be checked on the scale of the scientific effect, not chosen solely for convenient arithmetic.

Worked Example: Reading Prior Mass on the Precision Scale

Let \(\tau\sim\operatorname{Gamma}(2,1)\), with rate \(1\) point-squared. Its mean is \(2\) inverse point-squared. For an integer-shape Gamma distribution with shape 2 and rate 1, the survival probability is \(P(\tau>t)=e^{-t}(1+t)\). Calculate the prior probability that \(\tau<1\) and that \(\tau>4\), where the cutoffs are in inverse point-squared.

First, \(P(\tau<1)=1-P(\tau>1)=1-e^{-1}(1+1)=1-0.7358=0.2642\). Second, \(P(\tau>4)=e^{-4}(1+4)=0.09158\). Thus the prior assigns about 26.42% probability below 1 and 9.158% above 4, in the stated precision units. These probabilities describe prior mass, not posterior borrowing or clinical equivalence; the cutoffs should be related to meaningful differences in effect.

Several checks can reveal a poorly specified or incorrectly implemented model:

  • Check parameterization. A Gamma rate and a Gamma scale are reciprocals. Entering \(b\) as a scale when the model uses a rate changes the prior and every update.
  • Check the units. The term \((\theta_C-m_H)^2/2\) must have the same units as the Gamma rate. A missing scale conversion can make prior precision values nonsensical.
  • Check conditional versus marginal calculations. A Gamma draw for \(\tau\) conditional on \(\theta_C\) does not imply a Gamma marginal posterior for \(\tau\). Compare sampler output with the marginal kernel or a numerical integration in a simple one-dimensional case.
  • Check computational mixing. When the current estimate and historical target conflict, posterior dependence between \(\theta_C\) and \(\tau\) can make alternating conditional draws move slowly. Examine trace plots, effective sample sizes, and results from multiple dispersed starting values.
  • Check prior sensitivity. Compare scientifically plausible shape-rate choices and inspect prior and posterior distributions on the scale of interpretable effect differences. A proper prior can still exert substantial influence.

A fixed precision is simpler and can be useful when a defensible degree of commensurability is specified in advance, but it does not represent uncertainty about that degree. A spike-and-slab commensurability prior offers a discrete mixture of designated precision regimes, whereas a Gamma prior spreads mass continuously over positive precision. Neither choice is automatically robust: a Gamma prior can put too little mass on weak commensurability or concentrate too heavily at high precision. The choice should reflect the intended borrowing assumptions and be accompanied by sensitivity analysis.

Common pitfall: “The conditional posterior for \(\tau\) is Gamma, so the posterior for \(\tau\) is Gamma.” This is incorrect because the conditional update holds \(\theta_C\) fixed. Once \(\theta_C\) is integrated out, \(y_C\mid\tau\) has variance \(V_C+1/\tau\), producing a generally non-Gamma marginal posterior. Use the conditional Gamma update as part of a valid joint computation, or work directly with the marginal posterior kernel.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. Under the stated model, what are the shape and rate of \(\tau\mid\theta_C,m_H,y_C\)?
  2. If the prior is \(\operatorname{Gamma}(3,2)\) and \(\theta_C-m_H=2\) effect units, find the conditional posterior distribution and its mean.
  3. Why does the current estimate \(y_C\) not appear explicitly in the conditional Gamma update?
  4. What is the marginal sampling distribution of \(y_C\) given \(\tau\), and why does it generally prevent a Gamma marginal posterior?

Solutions. (1) The shape is \(a+1/2\), and the rate is \(b+(\theta_C-m_H)^2/2\). (2) The shape is \(3.5\), and the rate is \(2+2^2/2=4\) squared effect units, so the conditional distribution is \(\operatorname{Gamma}(3.5,4)\). Its mean is \(3.5/4=0.875\) inverse squared effect units. (3) Once \(\theta_C\) is conditioned on, the likelihood contribution involving \(\tau\) is \(p(\theta_C\mid\tau,m_H)\); the current data inform \(\tau\) through the posterior uncertainty in \(\theta_C\), not as an additional factor in that full conditional. (4) Integrating the normal sampling model over the normal commensurate prior gives \(y_C\mid\tau,m_H\sim N(m_H,V_C+1/\tau)\). The variance and the associated normal density depend nonlinearly on \(\tau\), so their product with the Gamma prior is generally not a Gamma kernel.

Clinical Biostats