Tutorials › High-Dimensional Genomic Data Analysis › Posterior Shrinkage of Test Statistics

Empirical Bayes and Local FDR · Tutorial 185 of 795

Posterior Shrinkage of Test Statistics

Use each statistic’s posterior probability of being nonnull to form a probability-weighted score, and interpret that score without confusing it with a posterior mean effect estimate.

Advanced 9 min read

What You'll Learn

  • Define the posterior probability of a nonnull result in a two-group mixture.
  • Calculate a posterior-weighted test statistic from a fitted normal mixture.
  • Explain why weak signals are attenuated more than strong signals under a symmetric broad alternative.
  • Distinguish a probability-weighted score from a posterior mean effect estimate.
  • Identify model checks and limitations that matter when interpreting shrunken statistics.

Why Weight a Test Statistic by Its Posterior Probability?

In a genomic analysis, a large observed test statistic can reflect a genuine departure from the null, sampling variation, or both. A two-group model represents this uncertainty by treating each test as either null or nonnull, then using the observed statistic to update the prior probability of those states. The resulting posterior probability can be used to attenuate the statistic: a result with substantial posterior null probability is pulled more strongly toward zero than a result with little posterior null probability.

This tutorial develops that probability-weighted statistic and its interpretation. It is important to name what the calculation does: it multiplies the observed statistic by the posterior probability that it is nonnull. That construction is a useful soft-shrinkage score, but it is not, in general, the posterior mean of an underlying effect. The distinction matters when reporting or using the result.

Model and Definition

Let \(Z\) be a signed test statistic, such as a standardized statistic whose null value is zero. Let \(H=0\) indicate a null test and \(H=1\) a nonnull test. The two-group model assumes prior probabilities \(P(H=0)=\pi_0\) and \(P(H=1)=\pi_1=1-\pi_0\), with component densities \(f_0(z)\) and \(f_1(z)\). Its marginal density is \(f(z)=\pi_0f_0(z)+\pi_1f_1(z)\). Given an observed value \(z\), Bayes’ rule gives the posterior null probability, or local false discovery rate, and the posterior nonnull probability.

Definition: The posterior nonnull probability at an observed statistic \(z\) is \(r(z)=P(H=1\mid Z=z)=\frac{\pi_1f_1(z)}{\pi_0f_0(z)+\pi_1f_1(z)}=1-\operatorname{lfdr}(z)\). The posterior-weighted statistic is \(S(z)=z\,r(z)\). It retains the observed sign and scales the magnitude by the posterior probability of being nonnull.

The mixture model and its component densities must be suitable for the statistics being analyzed. In the normal example below, assume a correctly standardized null \(Z\sim N(0,1)\), a symmetric alternative density, and known mixture parameters for the calculations. In practice, parameters may be estimated; then the resulting probabilities and scores also depend on the quality and uncertainty of those estimates. The posterior probabilities are conditional on the specified model, not model-free probabilities that a scientific claim is true.

How the Posterior Weight Produces Shrinkage

The posterior nonnull probability is between zero and one. Therefore \(S(z)\) has the same sign as \(z\), unless \(z=0\), and its magnitude cannot exceed the observed magnitude. A posterior nonnull probability near zero produces strong attenuation; one near one leaves the statistic nearly unchanged. For a symmetric null and symmetric alternative, the posterior weight is the same at \(z\) and \(-z\), so the shrinkage changes magnitude but not direction.

$$ 0\le r(z)\le 1,\qquad S(z)=z\,r(z),\qquad |S(z)|=|z|r(z)\le |z|. $$

This follows directly from the posterior probability definition: its numerator is nonnegative and no larger than its denominator. Multiplying \(z\) by a number in \([0,1]\) preserves its sign and weakly reduces its absolute value. This is a simple but useful justification for calling \(S(z)\) a shrinkage score.

A useful expression uses the likelihood ratio \(L(z)=f_1(z)/f_0(z)\), when \(f_0(z)>0\):

$$ r(z)=\frac{\pi_1L(z)}{\pi_0+\pi_1L(z)}. $$

For fixed prior probabilities, this posterior weight increases as the likelihood ratio increases: differentiating with respect to \(L\) gives \(\pi_0\pi_1/(\pi_0+\pi_1L)^2>0\), provided both prior probabilities are positive. Thus evidence that is more compatible with the alternative than with the null receives less attenuation. This does not mean that every model makes the weight increase with \(|z|\); that pattern depends on the component densities.

Worked Example: A Moderate Negative Statistic

Suppose the null density is \(N(0,1)\), the alternative density is \(N(0,4)\), and \(\pi_0=0.80\), \(\pi_1=0.20\). For an observed \(z=-2\), calculate the posterior nonnull probability and posterior-weighted statistic.

For these normal densities, the density ratio is \(L(z)=f_1(z)/f_0(z)=\frac{1}{2}\exp(3z^2/8)\). Substituting \(z=-2\), \(L(-2)=\frac{1}{2}\exp(1.5)\approx2.240845\). The posterior nonnull probability is

$$ r(-2)=\frac{0.20(2.240845)}{0.80+0.20(2.240845)} =\frac{0.448169}{1.248169} \approx 0.359061. $$

Using the unrounded posterior weight, \(S(-2)=(-2)(0.359061)\approx-0.7181\). The statistic remains negative, but its magnitude is reduced from 2 to about 0.7181 because the fitted model assigns about 0.3591 posterior probability to the nonnull component at this value.

Worked Example: A Stronger Positive Statistic

Keep the same mixture model and consider \(z=3\). The likelihood ratio is \(L(3)=\frac{1}{2}\exp(3(3^2)/8)=\frac{1}{2}\exp(3.375)\approx14.6121\). Therefore,

$$ r(3)=\frac{0.20(14.6121)}{0.80+0.20(14.6121)} =\frac{2.92242}{3.72242} \approx0.7851. $$

The posterior-weighted statistic is \(S(3)=3(0.785086\ldots)\approx2.355\). The magnitude is attenuated, but less than for \(z=-2\): the model assigns greater posterior nonnull probability to \(z=3\). This is a model-based comparison of evidence, not proof that the corresponding scientific effect is real.

Worked Example: A Weak Statistic Near the Center

Again use the same mixture and observe \(z=0.5\). The likelihood ratio is \(L(0.5)=\frac{1}{2}\exp(3(0.5^2)/8)=\frac{1}{2}\exp(0.09375)\approx0.54914\). Hence

$$ r(0.5)=\frac{0.20(0.54914)}{0.80+0.20(0.54914)} =\frac{0.10983}{0.90983} \approx0.12071. $$

It follows that \(S(0.5)=0.5(0.12072)\approx0.06036\). The observed statistic is already close to the null center, and the model assigns it a relatively small posterior probability of belonging to the alternative. The resulting score is close to zero. It is a weighted statistic, not an estimated effect measured in the original biological units.

What the Calculation Does—and Does Not—Estimate

The interpretation of \(S(z)\) is deliberately limited: it is the observed statistic multiplied by its posterior nonnull probability under the fitted two-group model. It is not automatically an estimate of a gene’s log fold change, treatment effect, or latent noncentrality parameter. A test statistic and an effect estimate are different quantities, and a posterior probability of the nonnull component alone does not specify the effect’s magnitude conditional on being nonnull.

In particular, do not call \(z\,r(z)\) the posterior mean effect without additional assumptions and a derivation connecting the observed statistic to a latent effect. The posterior mean of an effect generally requires a model for that effect and its sampling distribution. Deriving such a mean is a separate calculation. The weighted statistic can still be useful for displaying or summarizing evidence, but its label and units should make clear what it represents.

For a symmetric normal mixture with \(f_0=N(0,1)\) and \(f_1=N(0,\tau^2)\), where \(\tau^2>1\), the likelihood ratio is \(L(z)=\tau^{-1}\exp\{(1-\tau^{-2})z^2/2\}\). It increases with \(|z|\), so the posterior nonnull weight rises as the statistic moves farther from zero. The observed sign is preserved, and the attenuation factor is the same for positive and negative statistics of equal magnitude. This behavior relies on the assumed symmetric, broader alternative; it need not hold with asymmetric or differently shaped component densities.

Comparison, Diagnostics, and Limitations

The posterior-weighted statistic differs from several familiar summaries. The raw statistic \(z\) preserves the observed evidence without shrinkage. A hard-thresholding rule instead keeps or discards a statistic according to a cutoff, creating an abrupt change at that cutoff. Posterior weighting is continuous: values with intermediate posterior nonnull probability receive intermediate attenuation. A p-value measures tail probability under a specified null model; it is not the posterior probability of the alternative and cannot be substituted for \(r(z)\). Likewise, a tail-area false discovery rate summarizes a selected set, whereas \(r(z)\) is a pointwise posterior probability under the mixture.

Before interpreting shrunken scores, check that the inputs and model support the calculation. The null should be centered and scaled appropriately for the test statistics; the alternative density and prior proportion should be plausible for the family of tests; and the assumed sign and shape structure should be appropriate. If a symmetric model is used, compare the behavior of positive and negative statistics at similar magnitudes. If the estimated mixture assigns implausibly high posterior nonnull probabilities to central statistics, or makes nearly all weights close to zero or one without a scientific or modeling explanation, investigate the component fit and parameter estimates rather than treating the scores as automatically calibrated.

The calculation also has limits. An estimated \(\pi_0\) or component density introduces estimation uncertainty that the plug-in value \(S(z)\) does not show. Dependence among genomic tests may matter for fitting and uncertainty assessment even though the pointwise Bayes formula is defined from marginal component densities. Model misspecification can yield misleading posterior weights, and a shrunken statistic does not correct a misspecified null. Finally, multiplying by \(r(z)\) does not itself set a decision threshold, control a family-wise error rate, or guarantee a false discovery rate.

Common Mistake

Common pitfall: “The posterior nonnull probability is 0.36, so the gene has a 36% chance of having a nonzero biological effect, and multiplying its \(z\)-statistic by 0.36 gives the posterior mean effect.” This overstates what the model establishes. The probability is conditional on the specified two-group model and observed statistic, and \(0.36z\) is a posterior-probability-weighted statistic. It is not generally a posterior mean effect or a probability that a particular biological claim is true.

A more accurate report names the model-based quantity and the scale: “Under the fitted mixture, the posterior nonnull probability at \(z=-2\) is approximately 0.3591, giving a posterior-weighted statistic of approximately \(-0.7181\).” If an effect estimate is needed, report an estimator defined for that effect and explain its model and uncertainty separately.

Check Your Understanding

Answer each question using the definitions and mixture calculations above.

  1. If \(r(z)=0.25\) and the observed statistic is \(z=-4\), what is \(S(z)\), and what does its sign mean?
  2. For fixed prior probabilities, does a larger density ratio \(f_1(z)/f_0(z)\) increase or decrease the posterior nonnull probability? Give the reason.
  3. In the stated symmetric normal mixture, should \(z=2\) and \(z=-2\) have the same posterior nonnull probability? What relationship should their weighted statistics have?
  4. Why is a p-value of 0.05 not interchangeable with a posterior nonnull probability of 0.95?

Solutions. (1) \(S(-4)=(-4)(0.25)=-1\); the negative sign is preserved, and the magnitude is reduced from 4 to 1. (2) It increases, because \(r=\pi_1L/(\pi_0+\pi_1L)\) has derivative \(\pi_0\pi_1/(\pi_0+\pi_1L)^2>0\) with respect to \(L\). (3) Yes: symmetry gives equal weights, so \(S(-2)=-S(2)\). (4) A p-value is a tail probability calculated under the null; a posterior nonnull probability conditions on the observed statistic and the two-group model, including its prior proportions and alternative density. They answer different probability questions.

Clinical Biostats