🎉 75% of content is free forever — Unlock Premium from $10/mo →
CW
NEWSLIVESearch All Content
💼 Servicesℹ️ About✉️ ContactView Pricing Plansfrom $10

Multiple Testing Problem — FWER and False Discovery Rate

Hypothesis TestingAdvanced Topics🟢 Free Lesson

The Multiple Testing Problem

Hypothesis Testing

When Testing More Means Finding More Wrong

The multiple testing problem causes false discovery rates to explode when running many hypothesis tests simultaneously. Without correction, most "significant" findings in large-scale studies are false positives.

  • Genomics — Testing thousands of genes for differential expression in disease studies
  • Neuroimaging — Analyzing millions of brain voxels for activation differences
  • Quality Control — Inspecting multiple product characteristics simultaneously

The more you test, the more you must correct — or drown in false discoveries.


What You'll Learn

  • 1Compute familywise error rate for m simultaneous tests and read off the expected number of false positives
  • 2Apply the Bonferroni and Holm step-down corrections and state what each guarantees
  • 3Run the Benjamini-Hochberg procedure by hand and interpret a false discovery rate of 5 percent
  • 4Choose between FWER control and FDR control from the cost of a false claim

If you run 20 hypothesis tests at α = 0.05 when all H₀s are true, you expect 1 false positive by chance. Run 1000 tests? Expect 50 false discoveries.

That arithmetic is the whole problem in two lines. The expected number of false rejections under a complete null is simply the number of tests times the per-test level, and the probability of at least one false rejection grows toward certainty as tests accumulate. A research team that reports "we found three significant genes" from a screen of twenty thousand has learned almost nothing unless the analysis accounted for the twenty thousand opportunities to be wrong.

How False Positives Accumulate

Write for the number of true null hypotheses you incorrectly reject and for the total number of rejections. Familywise error rate is the probability that is at least one, while false discovery rate is the expected ratio of to taken with the convention that a zero denominator contributes zero. These two quantities respond to different fears: FWER asks whether any single claim is wrong, FDR asks what fraction of the claim pile is wrong.

Under independent true nulls, each rejected with probability α, the chance that none is rejected is , which gives the formula above. With α = 0.05 the numbers escalate fast:

Twenty tests at the nominal 5 percent level carry a 64 percent chance of at least one false positive, and one hundred tests carry a 99.4 percent chance. The expected count of false positives stays at exactly , so 1000 null tests still produce about 50 rejections on average even though the probability of avoiding all of them has effectively vanished.

Dependence changes the exact number but not the direction. When tests are positively correlated — neighbouring genes, adjacent voxels, repeated measures on the same subject — the independent formula overstates the inflation, sometimes by a wide margin. This is why neuroimaging researchers estimate the effective number of independent tests rather than counting voxels. Bonferroni, by contrast, remains a valid upper bound under arbitrary dependence, which is exactly why it is the safe default when the correlation structure is unknown.

The Bonferroni and Holm Corrections

Bonferroni control divides the per-test level by the number of tests:

For 20 tests at α = 0.05 this gives α* = 0.0025, so a p-value must beat 0.0025 rather than 0.05. The guarantee holds under any dependence structure, but the price is power: as grows, the threshold collapses toward zero and true effects go undetected. The Šidák correction, , is exact when tests are independent and is slightly less punitive — for 20 tests it gives 0.002561 against Bonferroni's 0.002500 — but it loses its exactness as soon as tests correlate.

Holm's step-down procedure is uniformly more powerful than plain Bonferroni while keeping the same strong FWER guarantee. Sort the p-values so that , then walk down the list comparing against . The first comparison you fail ends the procedure: everything before it is rejected, everything after it is retained. Because each step uses a slightly looser threshold than the last, Holm rejects at least as many true alternatives as Bonferroni in every situation, and never more false ones.

CorrectionThreshold for the k-th smallest pControlsDependence requirement
Bonferroniα / m for every kFWER, strongNone
Šidák1 − (1−α)^(1/m)FWERIndependence
Holmα / (m − k + 1)FWER, strongNone
Benjamini-Hochberg(k / m) × qFDRIndependence or positive dependence
Benjamini-Yekutieli(k / (m × c(m))) × qFDRArbitrary dependence

FWER Inflation

The curve climbs steeply and then saturates near one, which is why adding tests past a certain point changes nothing about your risk of a false claim — it only raises the expected count of false claims. Read the printout: five tests already carry a 22.6 percent familywise risk, twenty tests reach 64.2 percent, and one hundred tests reach 99.4 percent.

The Benjamini-Hochberg Procedure and FDR Control

Benjamini and Hochberg reframed the goal in 1995. Rather than demanding that no error ever occurs, control the expected proportion of false rejections among the claims you actually make. For a discovery procedure with rejection set and false rejections , the false discovery rate is , and the procedure below guarantees it stays at or below under independent null p-values.

The algorithm mirrors Holm with one crucial difference: instead of stopping at the first failure, scan from the largest p-value downward and take the last index satisfying , then reject every hypothesis ranked or better.

Worked through with tests at , the sorted p-values 0.0001, 0.0012, 0.0048, 0.0090, 0.0210, 0.0450, 0.0610, 0.1200, 0.4000, 0.7400 and the thresholds 0.005, 0.010, 0.015, 0.020, 0.025, 0.030, 0.035, 0.040, 0.045, 0.050, the largest satisfying index is because 0.0210 clears 0.025 while 0.0450 fails 0.030. Five hypotheses are rejected. Note that a naive uncorrected reading at 0.05 would also have rejected five, but the guarantee behind that decision is entirely different — under BH the expected share of false ones among those five is bounded, not the probability that any one is false.

Comparison of Correction Methods

python
def benjamini_hochberg(pvals, q=0.05):
    """Manual BH step-up, returns a boolean rejection mask."""
    p = np.asarray(pvals, dtype=float)
    m = p.size
    order = np.argsort(p)
    ranked = p[order]
    below = ranked <= (np.arange(1, m + 1) / m) * q
    if not below.any():
        return np.zeros(m, dtype=bool)
    kmax = np.where(below)[0].max() + 1
    reject = np.zeros(m, dtype=bool)
    reject[order[:kmax]] = True
    return reject

p = [0.0001, 0.0012, 0.0048, 0.0090, 0.0210, 0.0450, 0.0610, 0.12, 0.40, 0.74]
mask = benjamini_hochberg(p, q=0.05)
print("BH rejections:", mask.sum(), "of", len(p))

The two implementations must agree with statsmodels on any dataset, which makes this a useful unit test when you build the procedure into a pipeline. Run both on your real p-values and assert identical masks before trusting either.

FWER Versus FDR: Choosing a Target

The choice follows from the consequence of a wrong claim. In a clinical guideline or a regulatory sign-off, a single false positive can trigger harm, so strong FWER control through Holm is appropriate even at the cost of missed effects. In an exploratory screen where every candidate is followed by an expensive validation assay, the screen is a filter rather than a verdict, and FDR control at 5 percent is the standard bargain: on average one in twenty promoted candidates will not replicate, and the lab budget is sized for exactly that.

A third option exists for confirmatory work with a small number of pre-specified comparisons: test each at α = 0.05 and report everything, accepting an inflated familywise risk that you disclose honestly. This is defensible for two or three planned contrasts and indefensible for the twenty post-hoc slices a dataset will happily yield.

Common Mistakes

Running twenty subgroup tests and reading each p-value at 0.05

Fix: The familywise error is 64 percent. Pre-specify a primary comparison and correct the remainder with Holm or Benjamini-Hochberg.

Applying Bonferroni to a genome-wide screen of twenty thousand genes

Fix: The threshold falls to 2.5 times ten to the minus six and power collapses. Use Benjamini-Hochberg at q = 0.05 or a false discovery rate tailored to your validation budget.

Correcting only the tests you decided to report

Fix: The correction must cover every test that could have been run in that family, including the ones you chose not to mention.

Best Practices

  • Declare the family of tests before looking at outcomes, and record it in the analysis plan
  • Report raw p-values together with adjusted p-values so readers can apply their own threshold
  • For dependent screens, consider Benjamini-Yekutieli or a permutation-based null when positive dependence cannot be assumed

Key Takeaways

  • Running m tests at α expects m × α false positives when every null is true
  • Bonferroni divides α by m and holds under any dependence; Holm is uniformly more powerful with the same guarantee
  • Benjamini-Hochberg rejects up to the largest rank k where p(k) is at or below (k/m) times q
  • Pick FWER control when a single false claim is costly, FDR control when the output is a candidate list to be validated

Frequently Asked Questions

Why is Bonferroni valid even when the tests are correlated?

Each individual test is still run at level α/m, so the union bound on the probability of any false rejection does not require independence: the probability that at least one true null is rejected can never exceed the sum of the individual probabilities, which is m × (α/m) = α. Correlation may make the bound conservative, but it can never break it.

What if the false discovery rate procedure returns no rejections?

That is a legitimate outcome, not a bug. When no p-value satisfies , the procedure rejects nothing and the guaranteed FDR is trivially zero. Loosening q afterwards to force a discovery reintroduces the uncorrected error you were avoiding.

Should I correct for tests across different studies?

No. The correction applies within a family of tests that share one scientific claim. Two independent experiments with separate hypotheses each stand on their own, though a meta-analysis combining them should account for the fact that one of the two was chosen for being interesting.

Interview Questions

Q1: Define FWER and FDR and give a situation where each is the right target

FWER is the probability of at least one false rejection; FDR is the expected proportion of false rejections among all rejections. A regulatory trial needs FWER because one wrong claim causes harm; a gene expression screen needs FDR because the output feeds a validation pipeline that tolerates some misses.

Q2: Why is Holm preferred to plain Bonferroni?

Holm uses the same strong FWER guarantee with no dependence assumption, but its thresholds α/(m−k+1) loosen as k grows, so it rejects at least as many true alternatives as Bonferroni in every configuration and never more false ones.

Q3: How do you apply the Benjamini-Hochberg procedure?

Sort the p-values ascending, find the largest rank k with p(k) at or below (k/m) times q, and reject every hypothesis ranked k or lower. Under independence this bounds the expected false discovery proportion by q.

Q4: What changes when tests are dependent?

Bonferroni and Holm remain valid. Benjamini-Hochberg needs independence or positive regression dependence; under arbitrary dependence use Benjamini-Yekutieli, which divides the threshold by the harmonic number c(m) = sum of 1/i for i from 1 to m.

CW

ChatWhole Learn Editorial Team

Written by experienced data scientists, software engineers, and educators. All content is reviewed by industry professionals to ensure accuracy and relevance.

Last reviewed: 2026-10-14

—
☆☆☆☆☆
0 ratings

Rate & Feedback

Need Expert Statistics Help?

Get personalized tutoring, project support, or professional consulting.

Advertisement