Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Multiple Hypothesis Corrections

KTH JupyterHub Open In Colab Binder

Introduction

In high-throughput biology, analysis often involves testing a large number of hypotheses simultaneously. This is common in fields like genomics, transcriptomics, and proteomics, where experiments might involve thousands of genes or proteins being tested for associations with a condition or trait. When many tests are conducted, even a small chance of error for each test accumulates into a substantial number of false discoveries. Crucially, a single pp value can no longer be interpreted in isolation—its meaning depends on the size of the full hypothesis set and on how many results are declared significant.

To understand this, imagine testing 1,000 hypotheses with a significance threshold (α\alpha) of 0.05. If the null hypothesis is true for all these tests, we would still expect about 5% of them, or 50 tests, to be significant simply by chance. A realistic report therefore needs to communicate both numbers: how many hypotheses were tested and how many were called significant. Only then can we judge whether the significant subset looks plausible or if it is essentially the handful of false positives that we inevitably expect among thousands of null tests.

Multiple hypothesis corrections control an error rate defined over the whole list of significant findings. The two most common ones are the Family-Wise Error Rate (FWER), the probability that the list contains at least one false positive, and the False Discovery Rate (FDR), the expected proportion of false positives in the list.

Bonferroni Correction

The Bonferroni correction is one of the simplest and most conservative methods for controlling the FWER. It works as follows:

  1. Given a significance level α\alpha, divide it by the number of hypotheses mm being tested to obtain the adjusted significance level:

    αadjusted=αm\alpha_{\text{adjusted}} = \frac{\alpha}{m}
  2. Call a hypothesis significant if its pp value is less than αadjusted\alpha_{\text{adjusted}}.

This keeps the probability of making at least one false positive across all the tests below α\alpha. The price is that with a large number of hypotheses the adjusted threshold becomes so small that many true effects are missed, i.e. the procedure loses statistical power.

Calculating the Upper Bound of the False Discovery Rate with the Benjamini-Hochberg Procedure

The Benjamini-Hochberg (BH) procedure is a popular method for controlling the False Discovery Rate (FDR), which is the expected proportion of nulls among the pp values below threshold, i.e. the fraction of false positives among the pp values we call significant. Unlike the Bonferroni correction, which limits the probability of making even a single false positive, the BH procedure accepts a controlled fraction of false positives in exchange for detecting more of the true effects.

The procedure works as follows:

  1. Rank all the pp values such that p(1)≤p(2)≤⋯≤p(m)p_{(1)} \le p_{(2)} \le \dots \le p_{(m)}, where mm is the total number of hypotheses.

  2. Choose a desired FDR level, denoted as q∗q^*.

  3. For each pp value p(i)p_{(i)}, calculate the threshold value

    Threshold=im×q∗\text{Threshold} = \frac{i}{m} \times q^*

    where ii is the rank of the pp value.

  4. Find the largest ii for which p(i)≤im×q∗p_{(i)} \le \frac{i}{m} \times q^*. Reject the null hypotheses of all tests with pp values less than or equal to p(i)p_{(i)}, i.e. declare those features significant. (If no such ii exists, nothing is declared significant.)

The BH procedure guarantees an FDR of at most q∗q^* when the tests are independent, and more generally under positive regression dependence; under arbitrary dependence the threshold has to be divided by ∑k=1m1/k≈ln⁡m+0.577\sum_{k=1}^{m} 1/k \approx \ln m + 0.577. More precisely, BH controls the FDR at π0q∗\pi_0 q^* rather than at q∗q^*, where π0\pi_0 is the unknown proportion of true null hypotheses, so it is conservative when many of the hypotheses are truly alternative. That is exactly the slack the procedure described next recovers.

Calculating qq values with Storey’s Method

Storey introduced an alternative to the Benjamini-Hochberg procedure for controlling the FDR, known as the qq value approach. The qq value is the FDR analogue of the pp value: just as the pp value of a feature is the smallest significance level at which that feature would be called significant, its qq value is the smallest false discovery rate at which it would be called significant, q^(pi)=min⁡t≥piFDR^(t)\hat{q}(p_i) = \min_{t \ge p_i} \hat{\rm FDR}(t). Note that this is a minimum over all thresholds at least as large as pip_i, and not simply the estimated FDR evaluated at pip_i; since FDR^(t)\hat{\rm FDR}(t) is not monotone in tt, the two can differ.

Both Storey’s method and the Benjamini-Hochberg procedure view the observed pp values as a mixture of two groups: pp values from true null hypotheses (H0H_0), which are uniformly distributed between 0 and 1, and pp values from true alternative hypotheses (H1H_1), which tend to be small. The Benjamini-Hochberg procedure in effect assumes that all hypotheses are null when it counts the expected false positives, while Storey’s method estimates the fraction π0\pi_0 of the pp values that stem from true null hypotheses.

Storey’s procedure counts the features considered significant as the pp values below a threshold tt. The number of nulls below this threshold is estimated as π0mt\pi_0 m t, where π0\pi_0 is the estimated fraction of null hypotheses, mm is the total number of hypotheses, and tt is the chosen threshold. This is possible because we expect π0m\pi_0 m nulls, uniformly distributed between 0 and 1, and a fraction tt of them to fall below the threshold.

The proportion of null statistics π0\pi_0 is estimated by a procedure of its own. If all hypotheses were null, we would expect approximately m(1−λ)m(1 - \lambda) pp values above a threshold λ\lambda. Alternative pp values rarely end up above λ\lambda, so the number of pp values above λ\lambda, divided by m(1−λ)m(1 - \lambda), estimates π0\pi_0. As λ\lambda approaches 1, this estimate contains fewer alternative pp values but the estimate also becomes more variable, so a smoothing function (spline) is applied to stabilize the estimate by evaluating it at λ=1\lambda = 1.

Here is how Storey’s qq value procedure works, as described by Storey & Tibshirani:

  1. Order the pp values: Let p(1)≤p(2)≤⋯≤p(m)p_{(1)} \le p_{(2)} \le \dots \le p_{(m)} be the ordered pp values. Lower pp values indicate stronger evidence against the null hypothesis.

  2. Estimate π0\pi_0 for a range of λ\lambda values:

    • For a range of λ\lambda values, such as λ=0,0.05,0.10,…,0.95\lambda = 0, 0.05, 0.10, \dots, 0.95, calculate the proportion of pp values greater than λ\lambda:

    π^0(λ)=∣{pi>λ}∣m(1−λ)\hat{\pi}_0(\lambda) = \frac{|\{ p_i > \lambda \}|}{m (1 - \lambda)}

    where ∣{pi>λ}∣|\{ p_i > \lambda \}| represents the count of pp values greater than λ\lambda, and mm is the total number of hypotheses.

  3. Fit a natural cubic spline to estimate π0\pi_0:

    • Let f^\hat{f} be a natural cubic spline with three degrees of freedom, fitted to π^0(λ)\hat{\pi}_0(\lambda) as a function of λ\lambda. The final estimate of π0\pi_0 is given by evaluating the spline at λ=1\lambda = 1:

    π^0=f^(1)\hat{\pi}_0 = \hat{f}(1)

    A spline is a smooth curve made of polynomial pieces. With only three degrees of freedom the spline does not pass through every π^0(λ)\hat{\pi}_0(\lambda); it smooths out their random fluctuations, which are largest for λ\lambda close to 1.

  4. Estimate the FDR for each pp value:

    • Estimate the FDR for a threshold t=p(i)t=p_{(i)} at each ordered pp value, as the estimated number of significant null statistics, π^0mp(i)\hat{\pi}_0 m p_{(i)}, divided by the number of pp values below or at the threshold, ii.

    FDR^(t=p(i))=π^0mp(i)i\hat{\rm FDR}(t=p_{(i)}) = \frac{\hat{\pi}_0 m p_{(i)}}{i}
  5. Ensure monotonicity:

    • Assign q^(m)=FDR^(t=p(m))=π^0p(m)\hat{q}_{(m)} = \hat{\rm FDR}(t=p_{(m)}) = \hat{\pi}_0 p_{(m)}

    • For i=m−1,m−2,…,1i = m - 1, m - 2, \dots, 1, update the qq values to ensure they are monotonically increasing:

    q^(i)=min⁡(FDR^(t=p(i)),q^(i+1))\hat{q}_{(i)} = \min(\hat{\rm FDR}(t=p_{(i)}), \hat{q}_{(i+1)})

    This way a larger pp value never receives a smaller qq value.

If we set π^0=1\hat{\pi}_0=1, Storey’s procedure calls exactly the same features significant at an FDR level q∗q^* as the Benjamini-Hochberg procedure. As long as π^0≤1\hat{\pi}_0 \le 1, Storey’s method is therefore never more conservative than Benjamini-Hochberg, and it gains the most power when many hypotheses are truly alternative, i.e. when π0\pi_0 is well below one.

Illustration: true and false positives in a pp value histogram

Below we simulate pp values for 1,000 hypotheses, half of which are nulls (no effect) and half alternative hypotheses (a true effect).

Notebook Cell
Source
<Figure size 1400x600 with 1 Axes>

The pp values of the nulls are uniformly distributed between 0 and 1, which gives the flat part of the histogram. This follows from the way a pp value is constructed: if the test statistic TT has a continuous cumulative distribution FF under the null, then p=1−F(T)p = 1 - F(T), and applying a distribution function to its own random variable always yields a uniform variable, so Pr⁡(p≤u)=u\Pr(p \le u) = u for every uu in [0,1][0,1] whatever the shape of FF. The pp values of the alternative hypotheses are concentrated near zero, as data generated with a true effect are unlikely under the null hypothesis.

True and false positives

The vertical red line marks a significance threshold: hypotheses with pp values at or below it are called significant, those above it not significant. The dashed blue line marks the expected height of the histogram for the null pp values alone. Together, the two lines divide the hypotheses into four groups:

The FDR, the expected proportion of false positives among all hypotheses called significant, is then approximately

FDR≈FPTP + FP\text{FDR} \approx \frac{\text{FP}}{\text{TP + FP}}

Moving the threshold trades sensitivity, the fraction of the true effects that we detect, against precision, 1−FDR1-\text{FDR}, the fraction of our findings that are real.

What you should know after reading this chapter

You should be able to:

  1. Explain why testing thousands of hypotheses at a fixed α\alpha produces many false positives, and calculate how many to expect when all mm hypotheses are null.

  2. Define the family-wise error rate (FWER) and the false discovery rate (FDR), FDR≈FP/(TP+FP)\text{FDR} \approx \text{FP}/(\text{TP}+\text{FP}), and contrast what controlling each of them promises about a list of significant findings.

  3. Calculate the Bonferroni threshold αadjusted=α/m\alpha_{\text{adjusted}} = \alpha/m, and explain why it loses statistical power when mm is large.

  4. Calculate which hypotheses the Benjamini-Hochberg procedure declares significant for a short list of pp values and an FDR level q∗q^*, and explain why it is conservative when π0\pi_0 is well below one.

  5. Explain why pp values are uniformly distributed under H0H_0 and concentrated near zero under H1H_1, and identify the true positives, false positives, true negatives and false negatives in a pp value histogram with a threshold.

  6. Calculate π^0(λ)=∣{pi>λ}∣m(1−λ)\hat{\pi}_0(\lambda) = \frac{|\{ p_i > \lambda \}|}{m (1 - \lambda)} for a given λ\lambda, and explain the trade-off in choosing λ\lambda: a large λ\lambda leaves fewer alternative pp values above it, but gives a more variable estimate.

  7. Define the qq value as the smallest FDR at which a feature is called significant, and calculate qq values for a short sorted list of pp values from FDR^(t)=π^0mt∣{pi≤t}∣\hat{\rm FDR}(t) = \frac{\hat{\pi}_0 m t}{|\{p_i \le t\}|}, including the step that makes them monotone.

References
  1. Storey, J. D. (2002). A Direct Approach to False Discovery Rates. Journal of the Royal Statistical Society Series B: Statistical Methodology, 64(3), 479–498. 10.1111/1467-9868.00346