Tutorials › High-Dimensional Genomic Data Analysis › Local FDR in Normal Mixture Models

Empirical Bayes and Local FDR · Tutorial 184 of 795

Local FDR in Normal Mixture Models

Learn to calculate and interpret local FDR values from normal-mixture models, and see how the shape and symmetry of the alternative affect results at particular z-statistics.

Advanced 11 min read

What You'll Learn

  • Express the null and alternative distributions as a two-group mixture for a test statistic.
  • Calculate local FDR from the null density, alternative density, and mixture proportions.
  • Evaluate a single normal alternative and a symmetric two-component alternative.
  • Calculate how asymmetric alternative weights change local FDR at positive and negative z-statistics.
  • Check mixture calculations and recognize common interpretation errors.

Local FDR at a Specific Test Statistic

In a large genomic analysis, a test statistic is observed for each feature, but the null and alternative groups are not labeled. A two-group mixture model describes the distribution of these statistics: one component represents null features, and another represents non-null features. The local false discovery rate, or local FDR, asks a pointwise question: given a feature’s observed statistic, what is the posterior probability that it belongs to the null group?

For normal mixture models, this calculation depends on the density of the observed statistic under each group. It is therefore important to evaluate the densities at the observed value, use the mixture proportions as prior probabilities, and distinguish a density from the probability of an interval. The introductory material on local FDR establishes the posterior-null interpretation; here the focus is calculating it for normal components, including symmetric and asymmetric alternatives.

Definition: Let \(H_0\) denote the null group and \(H_1\) the alternative group. Let \(Z\) be a test statistic with prior group probabilities \(P(H_0)=\pi_0\) and \(P(H_1)=\pi_1=1-\pi_0\). If the conditional densities are \(f_0(z)\) and \(f_1(z)\), respectively, the mixture density is \(f(z)=\pi_0f_0(z)+\pi_1f_1(z)\). At a value \(z\) for which \(f(z)>0\), the local FDR is \(\operatorname{lfdr}(z)=P(H_0\mid Z=z)=\frac{\pi_0 f_0(z)}{\pi_0 f_0(z)+\pi_1 f_1(z)}\).

A normal density with mean \(\mu\) and variance \(\sigma^2\) is written \(\phi(z;\mu,\sigma^2)\). In the common standard-null model, \(f_0(z)=\phi(z;0,1)\). The alternative density may be one normal density or a mixture of normal components. For example, with \(K\) alternative components, \(f_1(z)=\sum_{k=1}^{K} w_k\phi(z;\mu_k,\tau_k^2)\), where each \(w_k\geq 0\) and \(\sum_{k=1}^{K}w_k=1\). The alternative density is the weighted sum of its component densities, not a choice of whichever component happens to fit the observed value best.

These formulas presume that the group proportions and component distributions describe the population of test statistics being modeled. In worked calculations below, their parameters are treated as specified. If they were estimated from data, the resulting local FDR would also depend on estimation uncertainty and on how well the model describes the data. A z-statistic is dimensionless, and the normal densities here are densities per unit of z.

Bayes’ Rule and the Density-Ratio Form

The posterior formula follows directly from Bayes’ rule: the probability of being null before seeing \(z\) is \(\pi_0\), and the likelihood contribution of observing \(z\) under that group is \(f_0(z)\). The same multiplication applies to the alternative group. Dividing the null contribution by the sum of both contributions gives the posterior null probability.

$$ \operatorname{lfdr}(z) =\frac{\pi_0f_0(z)}{\pi_0f_0(z)+\pi_1f_1(z)}. $$

When \(\pi_0>0\) and \(f_0(z)>0\), divide the numerator and denominator by \(\pi_0f_0(z)\). This gives a useful density-ratio expression:

$$ \operatorname{lfdr}(z) =\frac{1}{1+(\pi_1/\pi_0)\{f_1(z)/f_0(z)\}}. $$

Thus, for fixed prior proportions, a larger alternative-to-null density ratio at \(z\) means a smaller local FDR. The ratio is a comparison of densities at the observed value; it is not itself a posterior probability. The original posterior formula also handles endpoint proportions: if \(\pi_0=0\), then the local FDR is 0 wherever \(f(z)>0\); if \(\pi_1=0\), it is 1 wherever \(f(z)>0\).

For a single normal alternative \(N(\mu,\tau^2)\) and a null \(N(\mu_0,\sigma_0^2)\), the density ratio can be written explicitly:

$$ \frac{\phi(z;\mu,\tau^2)}{\phi(z;\mu_0,\sigma_0^2)} =\frac{\sigma_0}{\tau} \exp\left\{-\frac{(z-\mu)^2}{2\tau^2} +\frac{(z-\mu_0)^2}{2\sigma_0^2}\right\}. $$

For an alternative mixture, calculate its weighted density first and then compare that full density with \(f_0(z)\). The component weights describe how the alternative group is distributed; they are not substitutes for the overall prior probabilities \(\pi_0\) and \(\pi_1\).

Worked Calculations

Worked Example: A Single Shifted Normal Alternative

Suppose \(Z\) has null distribution \(N(0,1)\), alternative distribution \(N(2,1)\), and prior proportions \(\pi_0=0.90\) and \(\pi_1=0.10\). For an observed \(z=2\), calculate the local FDR.

The standard normal density at 2 is \(\phi(2;0,1)=0.053991\). Under the alternative, the observed value is at its mean, so \(\phi(2;2,1)=0.398942\). The null and alternative contributions to the mixture density are therefore \(0.90(0.053991)=0.048592\) and \(0.10(0.398942)=0.039894\), respectively.

Substitution into the posterior formula gives \(\operatorname{lfdr}(2)=0.048592/(0.048592+0.039894)=0.5491\). Under this specified model, a feature with statistic \(z=2\) has posterior probability about 0.549 of belonging to the null group. This value is not a probability that the null hypothesis is true for an entire experiment.

As a check, the alternative-to-null density ratio is \(0.398942/0.053991\approx 7.389\), and the prior alternative-to-null odds are \(0.10/0.90\). The ratio form gives \(1/[1+(0.10/0.90)(7.389)]\approx 0.5491\), agreeing with the direct calculation.

Worked Example: A Symmetric Two-Component Alternative

Now suppose the null remains \(N(0,1)\), while the alternative is an equal mixture of \(N(-2,1)\) and \(N(2,1)\). Let \(\pi_0=0.90\), \(\pi_1=0.10\), and observe \(z=2\). This alternative is symmetric about zero because its two components have equal weights and opposite means.

At \(z=2\), the component densities are \(\phi(2;-2,1)=\phi(4;0,1)=0.00013383\) and \(\phi(2;2,1)=\phi(0;0,1)=0.398942\). Hence the complete alternative density is \(f_1(2)=0.5(0.00013383)+0.5(0.398942)=0.199538\). The null density is \(f_0(2)=0.053991\).

The weighted contributions are \(\pi_0f_0(2)=0.90(0.053991)=0.048592\) and \(\pi_1f_1(2)=0.10(0.199538)=0.019954\). Thus \(\operatorname{lfdr}(2)=0.048592/(0.048592+0.019954)\approx 0.7089\). Even though \(z=2\) is the mean of one alternative component, the other component also contributes to the alternative density, with its weight included. The local FDR is about 0.7089 under this mixture model.

A useful check is \(f_1(2)/f_0(2)=0.199538/0.053991\approx 3.696\). Combining this with the prior odds \(\pi_1/\pi_0=1/9\) gives \(1/[1+(1/9)(3.696)]\approx0.7089\).

Worked Example: An Asymmetric Alternative at a Negative Statistic

Consider a standard normal null and an asymmetric alternative with density \(f_1(z)=0.75\phi(z;2,1)+0.25\phi(z;-2,1)\). Keep \(\pi_0=0.90\) and \(\pi_1=0.10\). For an observed \(z=-2\), calculate the local FDR and check how the component weights matter.

At \(z=-2\), the component with mean 2 contributes \(\phi(-2;2,1)=\phi(4;0,1)=0.00013383\), while the component with mean \(-2\) contributes \(\phi(-2;-2,1)=\phi(0;0,1)=0.398942\). Therefore \(f_1(-2)=0.75(0.00013383)+0.25(0.398942)=0.09984\), to four significant figures. The null density is \(f_0(-2)=\phi(-2;0,1)=0.053991\).

The weighted null contribution is \(0.90(0.053991)=0.048592\), and the weighted alternative contribution is \(0.10(0.09984)=0.009984\). Consequently, \(\operatorname{lfdr}(-2)=0.048592/(0.048592+0.009984)\approx0.8296\). The posterior null probability is about 0.8296 at this statistic. Although \(-2\) matches one alternative component’s mean, that component has only weight 0.25 within the alternative group; the alternative density also includes the other component and its weight.

Calculation Procedure and Checks

The following sequence keeps the two kinds of mixture weights distinct and makes arithmetic errors easier to find.

1
Specify the model.
Write down \(\pi_0,\pi_1\), the null density, and every alternative component with its weight. Check that \(\pi_0+\pi_1=1\) and that alternative component weights sum to 1.
2
Evaluate component densities at the observed value.
Substitute the same \(z\) into the null density and each alternative normal density. For a component \(N(\mu,\tau^2)\), the standardized difference is \((z-\mu)/\tau\).
3
Build the alternative density and weighted contributions.
Sum the alternative component densities using their within-alternative weights to obtain \(f_1(z)\). Then multiply \(f_0(z)\) and \(f_1(z)\) by the group proportions \(\pi_0\) and \(\pi_1\).
4
Normalize and interpret.
Divide the weighted null contribution by the sum of the weighted contributions. State the result as the posterior null probability at the specified \(z\), conditional on the model.

Some diagnostics are available even for a single calculation. The two weighted contributions must be nonnegative, and the local FDR must lie between 0 and 1. Their sum must equal the mixture density \(f(z)\). A symmetric alternative with equal component variances and equal weights at opposite means has an even density, so its \(f_1(z)\), and hence its local FDR under a symmetric null, are the same at \(z\) and \(-z\). An asymmetric alternative need not have this property.

What Symmetry Changes—and What It Does Not

Symmetry describes the shape of the alternative density; it does not imply that the alternative density equals the null density at the center. For the equal mixture of \(N(-2,1)\) and \(N(2,1)\), at \(z=0\) each alternative component has density \(\phi(0;2,1)=\phi(2;0,1)=0.053991\). Thus \(f_1(0)=0.053991\), whereas the null density is \(f_0(0)=\phi(0;0,1)=0.398942\). With \(\pi_0=0.90\) and \(\pi_1=0.10\), the local FDR is \(0.90(0.398942)/[0.90(0.398942)+0.10(0.053991)]\approx0.9852\). Near zero, this model assigns very little alternative density relative to null density, so the posterior null probability is high.

For asymmetric alternatives, sign and component weights can matter substantially. At a negative statistic, a component centered at a negative value may provide a large density contribution, but its influence is moderated by its weight within \(f_1\). At the opposite sign, the density can differ, even when the component means have equal magnitude. These changes enter through \(f_1(z)\); the Bayes formula itself does not change.

Common Mistakes and Limitations

  • Using a component instead of the full alternative density. The alternative density in a mixture is the weighted sum across all its components. Calculate every component’s density at \(z\), multiply by its within-alternative weight, and then add.
  • Confusing the two sets of weights. The \(\pi\) values are the overall proportions of null and alternative features. The \(w_k\) values describe the composition of the alternative group. Both are needed.
  • Treating a density as a point probability. For a continuous statistic, \(f_0(z)\) and \(f_1(z)\) are densities, not probabilities that \(Z\) equals exactly \(z\). Bayes’ rule uses their relative density contributions to define the posterior group probability at \(z\).
  • Assuming symmetry makes the null and alternative equally plausible at zero. Symmetry only implies matching alternative density values at \(z\) and \(-z\). It does not make \(f_1(0)=f_0(0)\).
  • Reading a fitted-model result as certainty. A calculated local FDR is conditional on the specified proportions and densities. If the null model, alternative shape, or fitted parameters are inappropriate, the number may not be well calibrated for the data.

A single normal alternative is simple to evaluate and can represent a directional shift, but may fail to represent effects in both directions. A symmetric mixture can represent signals on either side of zero, while an asymmetric mixture allows unequal prevalence or strength across directions. A more flexible estimated alternative density can accommodate shapes not captured by a few normal components, but its local density estimates may be less stable, particularly where observations are sparse. None of these choices removes the need to assess whether the null and alternative models are plausible for the test statistics under study.

Check Your Understanding

Answer each question using the stated model. Complete solutions follow the questions.

  1. For a standard normal null, a single \(N(1,1)\) alternative, \(\pi_0=0.80\), and observed \(z=1\), calculate the local FDR.
  2. In the equal mixture of \(N(-2,1)\) and \(N(2,1)\), what are \(f_1(0)\), \(f_0(0)\), and the local FDR at zero when \(\pi_0=0.90\)?
  3. For the asymmetric alternative \(0.75N(2,1)+0.25N(-2,1)\), explain why \(z=-2\) does not make the alternative density equal to \(\phi(0;0,1)\).
  4. If \(\pi_0=0\) and the mixture density is positive at the observed statistic, what is the local FDR? Why is the density-ratio form unsuitable in this case?

Solutions. (1) At \(z=1\), \(f_0(1)=\phi(1;0,1)=0.241971\) and \(f_1(1)=\phi(1;1,1)=0.398942\). The weighted contributions are \(0.80(0.241971)=0.193577\) and \(0.20(0.398942)=0.079788\). Therefore the local FDR is \(0.193577/(0.193577+0.079788)\approx0.7082\). (2) Both alternative components have density \(\phi(2;0,1)=0.053991\) at zero, so \(f_1(0)=0.053991\); the null density is \(f_0(0)=0.398942\). Thus the local FDR is \(0.90(0.398942)/[0.90(0.398942)+0.10(0.053991)]\approx0.9852\). (3) At \(-2\), the component centered at \(-2\) contributes \(\phi(0;0,1)\), but it is weighted by 0.25; the component centered at 2 also contributes, weighted by 0.75. Their sum, \(0.75\phi(4;0,1)+0.25\phi(0;0,1)\approx0.09984\), is not \(\phi(0;0,1)\). (4) The posterior null probability is 0 wherever the mixture density is positive, because the null prior proportion is zero. The density-ratio form divides by \(\pi_0\), so it is undefined when \(\pi_0=0\); use the original posterior formula instead.

Clinical Biostats