Benjamini-Hochberg Adjusted P-Value Calculator
Multiple testing
- Ranked p-value: this test sits at rank 3 of 120, so the Benjamini-Hochberg ladder gives it a personal threshold instead of the flat alpha.
- Critical value: 3 x 0.05 / 120 = 0.0013; the raw p of 0.0012 is rejected at this rung.
- Adjusted p-value: 0.0012 x 120 / 3 = 0.0480 (capped at 1).
- Benjamini-Hochberg result: adjusted p 0.0480 against an FDR target of 0.05.
Run twenty statistical tests at the 5 percent level and, even if nothing real is going on, you expect one false alarm. Run twenty thousand - a genomics screen, a funnel of A/B tests, a proteomics panel - and false alarms arrive by the hundreds, indistinguishable from the discoveries. The Benjamini-Hochberg procedure, published in 1995, changed the question: instead of demanding that the chance of any false positive stay small (the family-wise error rate), it controls the false discovery rate - the expected proportion of your rejections that are false. For exploratory science at scale, that is the bargain that keeps power alive.
Mechanically, BH sorts the p-values and walks up a ladder: the i-th smallest p-value is compared not with alpha but with i x alpha / m. This calculator handles one rung of that ladder. Give it a raw p-value, its rank among all tests, the total number of tests and your FDR target, and it returns the rung's critical value and the adjusted p-value (q-value) - the smallest FDR level at which this test would be rejected. It is the arithmetic every multiple-testing workflow does thousands of times, exposed one test at a time so you can audit it.
The procedure's origin story matters for using it well. Benjamini and Hochberg were addressing clinical and scientific practice in which researchers ran many tests and reported the winners at face value; their 1995 paper offered a principled middle path between the anarchy of unadjusted reporting and the austerity of Bonferroni. The FDR idea proved so fertile that it reorganised entire fields - genomics adopted it wholesale within a decade - and its inventors' later work extended it to dependence structures and adaptive variants. This page implements the original 1995 arithmetic, one rung at a time, because that is still the version against which everything else is audited.
The procedure's origin story matters for using it well. Benjamini and Hochberg were addressing clinical and scientific practice in which researchers ran many tests and reported the winners at face value; their 1995 paper offered a principled middle path between the anarchy of unadjusted reporting and the austerity of Bonferroni. The FDR idea proved so fertile that it reorganised entire fields - genomics adopted it wholesale within a decade - and its inventors' later work extended it to dependence structures and adaptive variants. This page implements the original 1995 arithmetic, one rung at a time, because that is still the version against which everything else is audited.
The procedure's origin story matters for using it well. Benjamini and Hochberg were addressing clinical and scientific practice in which researchers ran many tests and reported the winners at face value; their 1995 paper offered a principled middle path between the anarchy of unadjusted reporting and the austerity of Bonferroni. The FDR idea proved so fertile that it reorganised entire fields - genomics adopted it wholesale within a decade - and its inventors' later work extended it to dependence structures and adaptive variants. This page implements the original 1995 arithmetic, one rung at a time, because that is still the version against which everything else is audited.
Worked examples
p = 0.0012 at rank 3 of 120 tests
(0.0012 · 3 · 120 · 0.05)
| BH adjusted p-value | 0.0480 |
| BH critical value | 0.0013 |
| Rank share of tests | 2.50 % |
| FDR target (alpha) | 0.05 |
p = 0.004 at rank 2 of 50
(0.004 · 2 · 50 · 0.05)
| BH adjusted p-value | 0.1000 |
| BH critical value | 0.0020 |
| Rank share of tests | 4.00 % |
| FDR target (alpha) | 0.05 |
A tempting 0.032 deep in a 200-test family
(0.032 · 15 · 200 · 0.05)
| BH adjusted p-value | 0.4267 |
| BH critical value | 0.0038 |
| Rank share of tests | 7.50 % |
| FDR target (alpha) | 0.05 |
FDR vs family-wise error
Bonferroni and its cousins protect a strong promise: probability at most alpha of even one false rejection anywhere. That promise is expensive - with 120 tests, Bonferroni demands p below 0.00042 - and for a discovery screen it throws away real findings to guard against a single mistake. FDR makes a weaker, more useful promise: of the results you flag, at most alpha are expected to be false.
Neither promise is 'correct' in the abstract. Confirmatory trials with a handful of endpoints belong under family-wise control, because each claim will be acted on individually. Screens, where flagged results go on to validation, belong under FDR. The first worked example shows the practical difference: a raw p of 0.0012 fails Bonferroni at m = 120 but clears its BH rung comfortably, with an adjusted p of 0.0480.
- Critical value for rank i: i x alpha / m.
- Adjusted p (before monotonicity enforcement): p x m / i, capped at 1.
The BH ladder
The full procedure is a step-up search: sort all p-values ascending, find the largest rank k whose p-value beats its rung, then reject ranks 1 through k - including any earlier p-value that individually missed its own rung. That last clause surprises people, and it is why the single-rung view on this page is an audit tool rather than the whole algorithm: a test can be rejected by BH because a larger p-value further up the ladder cleared its bar.
The adjusted p-values printed by software add one more step this page deliberately shows in its raw form: monotonicity enforcement. Raw values p x m / i can decrease as rank increases, which is impossible for a rejection threshold, so packages take cumulative minima from the largest rank downward. If you are reconciling this page's output with R's p.adjust, that enforcement - not an arithmetic error - explains any difference for non-monotone cases.
| Setting | Typical control | Why |
|---|---|---|
| Genome-wide screen (m in the millions) | FDR (BH) | FWER would erase nearly all signal |
| A/B test programme (dozens of metrics) | FDR (BH) | Flagged wins get validated in production |
| Confirmatory trial (2-5 endpoints) | FWER (Bonferroni/Holm) | Each endpoint supports a label claim |
Worked examples
The opening example sets 0.0480 as the headline adjusted p-value, with supporting values BH critical value 0.0013; Rank share of tests 2.50 %; FDR target (alpha) 0.05.
Set it against the critical value in the same line: the raw p-value beat its rung, which is why the adjusted value lands just under the 0.05 target rather than far above it.
The opening example sets 0.1000 as the headline adjusted p-value, with supporting values BH critical value 0.0020; Rank share of tests 4.00 %; FDR target (alpha) 0.05.
Set it against the critical value in the same line: the raw p-value beat its rung, which is why the adjusted value lands just under the 0.05 target rather than far above it.
The opening example sets 0.4267 as the headline adjusted p-value, with supporting values BH critical value 0.0038; Rank share of tests 7.50 %; FDR target (alpha) 0.05.
Set it against the critical value in the same line: the raw p-value beat its rung, which is why the adjusted value lands just under the 0.05 target rather than far above it.
Adjusted p-values (q-values)
Read the adjusted p-value as a personal FDR threshold: 'this result enters the rejection set whenever the target FDR is at least this large.' The second worked example adjusts 0.004 at rank 2 of 50 to exactly 0.1000 - rejected at FDR 0.10, not at 0.05. The third adjusts 0.032 at rank 15 of 200 to 0.4267, a result that was never close, however respectable the raw 0.032 looked in isolation.
Storey's q-value refines the same idea by estimating the proportion of true nulls, gaining power when most hypotheses are false. BH is the conservative special case that assumes that proportion is 1. When a screen has strong signal everywhere, Storey's version is worth the extra machinery; when in doubt, BH's guarantee needs fewer assumptions about the p-value distribution.
BH in genomics and A/B testing
In a genome-wide association study, m runs to millions and the BH ladder is climbed by software, but the per-rung view on this page is what a reviewer uses to interrogate a claimed hit: a SNP with p = 1e-6 sounds decisive until you ask its rank - if it is the 500th smallest of two million, its rung is 500 x 0.05 / 2,000,000, and the claim collapses. Rank is the context that raw p-values hide, and BH is the discipline of never quoting one without the other.
Online experimentation platforms run the same discipline at smaller scale: dozens of metrics per experiment, hundreds of experiments, and a permanent temptation to ship the metric that moved. Platforms that adopted FDR control report a characteristic pattern - fewer 'wins' shipped, and a higher fraction of shipped wins replicating. That replication rate is the FDR bargain made visible, and it is why the procedure keeps winning arguments against both unadjusted reporting and blanket Bonferroni.
Scope limit: BH controls the expected proportion of false discoveries among rejections, averaged over repetitions. It does not promise that this particular rejection set is at most 5 percent false - a distinction that matters when a single screen's output will be quoted for years.
BH in genomics and A/B testing
In a genome-wide association study, m runs to millions and the BH ladder is climbed by software, but the per-rung view on this page is what a reviewer uses to interrogate a claimed hit: a SNP with p = 1e-6 sounds decisive until you ask its rank - if it is the 500th smallest of two million, its rung is 500 x 0.05 / 2,000,000, and the claim collapses. Rank is the context that raw p-values hide, and BH is the discipline of never quoting one without the other.
Online experimentation platforms run the same discipline at smaller scale: dozens of metrics per experiment, hundreds of experiments, and a permanent temptation to ship the metric that moved. Platforms that adopted FDR control report a characteristic pattern - fewer 'wins' shipped, and a higher fraction of shipped wins replicating. That replication rate is the FDR bargain made visible, and it is why the procedure keeps winning arguments against both unadjusted reporting and blanket Bonferroni.
Scope limit: BH controls the expected proportion of false discoveries among rejections, averaged over repetitions. It does not promise that this particular rejection set is at most 5 percent false - a distinction that matters when a single screen's output will be quoted for years.
BH in genomics and A/B testing
In a genome-wide association study, m runs to millions and the BH ladder is climbed by software, but the per-rung view on this page is what a reviewer uses to interrogate a claimed hit: a SNP with p = 1e-6 sounds decisive until you ask its rank - if it is the 500th smallest of two million, its rung is 500 x 0.05 / 2,000,000, and the claim collapses. Rank is the context that raw p-values hide, and BH is the discipline of never quoting one without the other.
FAQs
What adjusted p-value does the first example produce?
0.0480, from a raw p of 0.0012 at rank 3 among 120 tests: 0.0012 x 120 / 3 = 0.048. It is rejected at an FDR target of 0.05 - but would have failed Bonferroni, which demands 0.00042.
What is the critical value for a rung?
Rank times alpha over total tests. Rank 3 of 120 at alpha 0.05 gives 0.00125 (shown rounded as 0.0013); the raw p of 0.0012 slips under it.
Why can BH reject a test whose p-value missed its own rung?
Because BH is a step-up procedure: if the largest qualifying rank is k, everything ranked 1 to k is rejected, including stragglers. The rung comparison alone is necessary context, not the whole decision.
What FDR target do the examples use?
0.05 throughout - the conventional default. High-throughput fields sometimes use 0.01 for stringency or 0.10 for exploratory passes; the target is a design choice to declare in advance.
Does BH work when tests are correlated?
BH remains valid under independence and under positive regression dependence (PRDS), which covers most applied settings. For arbitrary dependence, the Benjamini-Yekutieli variant divides by a harmonic factor and is more conservative.
How many tests does the largest example screen?
200, with the featured test at rank 15. Its raw p of 0.032 adjusts to 0.4267 - a clear demonstration that an unadjusted 'significant' p-value means little inside a large family.