Tutorials › High-Dimensional Genomic Data Analysis › Estimating the Null Proportion

Empirical Bayes and Local FDR · Tutorial 178 of 795

Estimating the Null Proportion

Learn how to estimate the null fraction from the upper tail of genomic p-values, and how alternative signals and threshold choice affect bias and precision.

Advanced 11 min read

What You'll Learn

  • Define the null proportion in a two-group model for a family of p-values.
  • Derive the expectation and variance of a threshold-based estimator.
  • Explain when alternative p-values inflate the raw estimate.
  • Compare threshold estimates with upper-tail histogram estimates and the conservative choice of one.
  • Assess threshold choice in sparse and dense signal settings.
  • Recognize dependence, invalid p-values, and data-driven threshold selection as limitations.

Why Estimate the Null Proportion?

In a large genomic analysis, each tested feature has a p-value, but the analyst usually does not know which hypotheses are truly null. The null proportion summarizes the fraction of null hypotheses in the family being analyzed. It is useful in empirical Bayes models and can affect estimates of false discovery rates. Estimating it is difficult because a p-value near one may come from a null test, but it may also come from a nonnull test with little power.

The question here is how to estimate that fraction from a collection of p-values, and what assumptions make an estimator informative. In particular, the upper tail is attractive because valid null p-values are uniform, so the expected fraction of null p-values exceeding a threshold \(\lambda\) is \(1-\lambda\). This gives a simple estimator. Its limitation is equally important: alternative p-values can also exceed \(\lambda\), making the estimate too large.

Two-Group Model and Threshold Estimator

Definition: In a two-group mixture model for \(m\) tests, each p-value is generated from a null component with probability \(\pi_0\) or an alternative component with probability \(1-\pi_0\). Here \(\pi_0\) is the null proportion, and \(G\) denotes the cumulative distribution function of a p-value conditional on belonging to the alternative component. Under an exact theoretical null, the conditional null p-value is uniform on \([0,1]\).

For a p-value \(P\), write \(\overline{G}(\lambda)=P(P>\lambda\mid\text{alternative})=1-G(\lambda)\). The p-value density, when it exists, is \(f(p)=\pi_0+(1-\pi_0)g(p)\), where \(g\) is the alternative density. The density expression is not required for the threshold estimator, but makes the two components explicit.

For a chosen threshold \(0\leq\lambda<1\), count how many observed p-values exceed it. If those p-values were all null, their expected fraction would be \(1-\lambda\). Dividing the observed fraction by that null-tail probability gives the raw threshold estimate:

$$ \widehat{\pi}_0(\lambda)=\frac{\#\{i:p_i>\lambda\}}{m(1-\lambda)}. $$

Because a proportion cannot exceed one, a commonly reported version is \(\min\{1,\widehat{\pi}_0(\lambda)\}\). This truncation is a practical constraint, not a change to the raw estimator’s expectation formula. In particular, expectations derived for the raw estimator do not automatically describe the truncated version.

The simple calculation relies on marginally uniform null p-values. For the variance formula below, assume in addition that the \(m\) p-values are independent draws from the same mixture. Independence is not needed for the expectation calculation if each test has the stated marginal mixture, but dependence changes the variance. In applications, p-values that are merely super-uniform under the null can make the upper-tail null probability larger than \(1-\lambda\); the exact-uniform identity used by this estimator then need not hold.

Bias and Sampling Variability

Let \(I_i\) equal one if \(p_i>\lambda\), and zero otherwise. Under the mixture model, its success probability is \(q(\lambda)=\pi_0(1-\lambda)+(1-\pi_0)\overline{G}(\lambda)\). The first term is the null contribution to the upper tail, and the second is the alternative contribution. Since the raw estimator is \(\sum_{i=1}^m I_i/[m(1-\lambda)]\), its expectation follows directly.

$$ E\{\widehat{\pi}_0(\lambda)\} =\frac{q(\lambda)}{1-\lambda} =\pi_0+(1-\pi_0)\frac{\overline{G}(\lambda)}{1-\lambda}. $$

Thus the raw estimator’s bias is \((1-\pi_0)\overline{G}(\lambda)/(1-\lambda)\). It is upward biased when \((1-\pi_0)\overline{G}(\lambda)>0\), and unbiased when that product is zero. The latter includes the boundary case \(\pi_0=1\), even if the alternative tail probability is positive. If almost all alternative p-values fall below \(\lambda\), then \(\overline{G}(\lambda)\) is small and the contamination bias is small. The model alone does not guarantee this.

Under the additional independent, identically distributed mixture assumption, the indicators \(I_i\) are independent Bernoulli variables with success probability \(q(\lambda)\). Their sum has variance \(m q(\lambda)\{1-q(\lambda)\}\), giving:

$$ \operatorname{Var}\{\widehat{\pi}_0(\lambda)\} =\frac{q(\lambda)\{1-q(\lambda)\}}{m(1-\lambda)^2}. $$

This formula shows the threshold trade-off. Increasing \(\lambda\) can reduce alternative contamination, but it also reduces the null-tail probability in the denominator and leaves fewer p-values in the count. Consequently, the estimator can become more variable near one. The two effects must be considered together.

Worked Example: Deriving the Expected Bias

Suppose a hypothetical family has \(m=1{,}000\) tests, null proportion \(\pi_0=0.80\), and threshold \(\lambda=0.50\). Assume the alternative-component probability of exceeding this threshold is \(\overline{G}(0.50)=0.040\). These are stipulated population mixture values, not estimates from a realized count.

For a null p-value, the probability of exceeding 0.50 is \(1-0.50=0.50\). Therefore the overall upper-tail probability is \(q=0.80(0.50)+0.20(0.040)=0.408\).

The expected raw estimate is the overall tail probability divided by the null tail probability: \[ E\{\widehat{\pi}_0(0.50)\}=\frac{0.408}{0.50}=0.816. \] The expectation-bias formula gives the same result: \[ (1-\pi_0)\frac{\overline{G}(0.50)}{1-0.50} =0.20\frac{0.040}{0.50}=0.016, \] so \(E\{\widehat{\pi}_0(0.50)\}=0.80+0.016=0.816\). This is a statement about the estimator’s expectation under the stipulated model; it does not say that a particular observed estimate must exceed 0.80 by exactly 0.016.

Choosing a Threshold in Sparse and Dense Settings

A sparse-signal setting has a large \(\pi_0\); a dense-signal setting has a smaller \(\pi_0\). Sparsity by itself does not guarantee an accurate threshold estimate. The amount of alternative probability above the chosen threshold matters as well. When alternatives tend to produce small p-values, a high threshold may have little alternative contamination. When alternative p-values often remain in the upper tail, the estimate can be inflated even if the threshold seems high.

Worked Example: Sparse Signals and the Bias–Variance Trade-Off

Consider a hypothetical model with \(m=2{,}000\) tests and \(\pi_0=0.90\). Suppose the alternative tail probabilities are \(\overline{G}(0.50)=0.020\) and \(\overline{G}(0.90)=0.001\). Compare the expected raw estimates and their standard deviations under the independent mixture model.

At \(\lambda=0.50\), the overall tail probability is \(q=0.90(0.50)+0.10(0.020)=0.452\). The expected estimate is \(0.452/0.50=0.904\), with bias \(0.004\). Its standard deviation is \[ \sqrt{\frac{0.452(1-0.452)}{2{,}000(0.50)^2}} =\sqrt{0.0004954}=0.0223. \]

At \(\lambda=0.90\), \(q=0.90(0.10)+0.10(0.001)=0.0901\). The expected estimate is \(0.0901/0.10=0.901\), with bias \(0.001\). Its standard deviation is \[ \sqrt{\frac{0.0901(1-0.0901)}{2{,}000(0.10)^2}} =\sqrt{0.004099}=0.0640. \]

The higher threshold reduces the bias in this example, but the standard deviation is almost three times as large. These are model-based expectations and standard deviations, not guarantees about any one realized data set. They illustrate why choosing the largest possible threshold is not automatically best.

A common practical approach computes estimates over several candidate thresholds and looks for a region where they are reasonably stable. A flat region can be reassuring, but it does not prove that the estimates are unbiased: alternative p-values may contribute similarly across that region. Conversely, a sharply changing sequence signals sensitivity to the threshold and should prompt caution. Thresholds chosen after inspecting the same data also make simple uncertainty calculations harder to interpret.

Another upper-tail approach estimates the p-value density near one, where the null density is one. For a narrow interval \((1-h,1]\), the observed fraction in that interval divided by \(h\) estimates the mixture density averaged over that interval. If the alternative density is negligible there, this quantity can approximate \(\pi_0\). If alternatives contribute in that interval, the density estimate is inflated. Narrow intervals have fewer observations and greater sampling variability; wider intervals are more stable but can include more alternative mass. This is related to the threshold idea but uses a local interval rather than the full tail above \(\lambda\).

Worked Example: Dense Signals Can Inflate a High-Threshold Estimate

Suppose a hypothetical mixture has \(\pi_0=0.40\), \(\lambda=0.90\), and alternative tail probability \(\overline{G}(0.90)=0.080\). The alternative distribution therefore leaves some nonnull p-values in the top tenth of the p-value range.

The overall probability of a p-value exceeding 0.90 is \[ q=0.40(0.10)+0.60(0.080)=0.040+0.048=0.088. \] The expected raw estimate is \(0.088/0.10=0.88\). Equivalently, the bias is \(0.60(0.080)/0.10=0.48\), and \(0.40+0.48=0.88\). Even this high threshold does not isolate null tests: almost half of the expected upper-tail count comes from the alternative component. If the estimate is truncated at one, no truncation occurs here, and it still substantially exceeds the true null proportion.

The calculation is about population probabilities, not a realized sample fraction. In an observed data set, the count above 0.90 fluctuates around its expectation, so its realized estimate need not equal 0.88.

Comparison, Diagnostics, and Limitations

ApproachWhat it usesMain strengthMain limitation
Set \(\widehat{\pi}_0=1\)No estimate of the upper tailSimple and conservative for many procedures requiring a null fractionCan lose efficiency when the true null proportion is well below one
Threshold estimatorFraction of p-values above \(\lambda\)Direct calculation with a clear mixture interpretationAlternative upper-tail mass inflates it; high thresholds increase variability
Upper-tail interval or density estimateFraction in an interval near oneTargets the region where the null density is knownDepends on alternative mass near one and on interval width

The choice \(\widehat{\pi}_0=1\) avoids estimating the null proportion and is often used as a conservative input to procedures that permit it. It is not an estimate tailored to the observed p-value distribution. Threshold and upper-tail density methods use the data, but rely on alternatives contributing little to the selected upper-tail region if they are to estimate \(\pi_0\) accurately. More elaborate mixture fitting is a different strategy; it requires additional distributional assumptions and is not a substitute for checking whether the upper-tail premise is plausible.

Several checks help reveal trouble. Plot or tabulate estimates over a prespecified range of thresholds; large movement indicates threshold sensitivity. Inspect the upper-tail p-values and the number of observations supporting each estimate; a very small tail count is inherently unstable. Check that the null p-values are calibrated for the analysis, and consider the dependence structure: correlated tests may make realized tail counts more variable than the independent formula suggests. Neither a stable estimate nor a large number of tests removes systematic inflation from alternative p-values in the upper tail.

A frequent mistake is to argue, “Only null p-values exceed a high threshold, so the fraction above it estimates \(\pi_0(1-\lambda)\).” The conclusion assumes what needs to be checked. Under the mixture model, the tail probability is \(\pi_0(1-\lambda)+(1-\pi_0)\overline{G}(\lambda)\); the second term vanishes only if the alternative tail probability is zero or there are no alternatives. A high threshold may make that term small, but does not make it exactly zero by definition.

Key takeaway: Threshold estimators infer the null proportion by comparing the observed p-value upper tail with the tail expected from uniform null p-values. Their bias is governed by alternative mass in that tail, while their variability increases as the threshold approaches one. Report the threshold and assess sensitivity rather than treating a single estimate as assumption-free.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. Under the two-group model, write the overall probability that a p-value exceeds \(\lambda\).
  2. For \(\pi_0=0.75\), \(\lambda=0.60\), and \(\overline{G}(0.60)=0.020\), calculate the expected raw estimate and its bias.
  3. Can the raw estimator be unbiased when the alternative tail probability is positive? State the condition.
  4. Why can raising \(\lambda\) reduce bias but increase variability?
  5. Name one limitation of using a p-value density estimate near one.

Solutions. (1) The tail probability is \(\pi_0(1-\lambda)+(1-\pi_0)\overline{G}(\lambda)\). (2) The tail probability is \(0.75(0.40)+0.25(0.020)=0.305\), so the expected raw estimate is \(0.305/0.40=0.7625\); its bias is \(0.25(0.020)/0.40=0.0125\). (3) Yes. The raw estimator is unbiased when \((1-\pi_0)\overline{G}(\lambda)=0\), including \(\pi_0=1\). (4) A higher threshold can leave less alternative mass above it, but the denominator \(1-\lambda\) shrinks and fewer observations contribute to the count. (5) Alternatives may also contribute near one, inflating the estimate; using a narrow interval also leaves fewer observations and increases variability.

Clinical Biostats