Adjusted P-Value Calculator for Excel
Calculate Bonferroni, Holm-Bonferroni, or Benjamini-Hochberg adjusted p-values for multiple hypothesis testing
Comprehensive Guide: How to Calculate Adjusted P-Values in Excel
When conducting multiple hypothesis tests, the probability of making at least one Type I error (false positive) increases with the number of tests. This is known as the multiple comparisons problem. To control the family-wise error rate (FWER) or false discovery rate (FDR), researchers use p-value adjustment methods.
This guide explains how to calculate adjusted p-values in Excel using different methods, when to use each method, and how to interpret the results.
Why Adjust P-Values?
Without adjustment, if you perform 20 independent tests at α = 0.05, the probability of at least one false positive is:
1 – (1 – 0.05)20 ≈ 0.64 (64%)
P-value adjustment methods help control this inflated error rate.
Common P-Value Adjustment Methods
Bonferroni Correction
Most conservative method that controls FWER strictly. Adjusted p-value = raw p-value × number of tests.
Use when: You need absolute control over Type I errors and can tolerate reduced power.
Holm-Bonferroni
Step-down procedure that is less conservative than Bonferroni but still controls FWER.
Use when: You want more power than Bonferroni while maintaining FWER control.
Benjamini-Hochberg (FDR)
Controls false discovery rate rather than FWER. Less conservative, more powerful.
Use when: You can tolerate some false positives (e.g., genomics, high-throughput data).
Step-by-Step: Calculating Adjusted P-Values in Excel
Method 1: Bonferroni Correction (Simplest)
- List your raw p-values in column A (A2:A10).
- Count the tests: In B2, enter
=COUNT(A2:A10). - Apply Bonferroni: In C2, enter
=A2*$B$2, then drag down. - Compare to α: P-values ≤ 0.05 after adjustment are significant.
| Raw P-Value | Number of Tests | Bonferroni Adjusted | Significant? |
|---|---|---|---|
| 0.045 | 5 | 0.225 | No |
| 0.001 | 5 | 0.005 | Yes |
| 0.032 | 5 | 0.160 | No |
Method 2: Holm-Bonferroni (Step-Down)
- Sort p-values in ascending order (A2:A6).
- Add rank in B2:
=RANK(A2, $A$2:$A$6). - Calculate adjusted p in C2:
=A2*(6-B2+1)(for 5 tests), drag down. - Find critical values: In D2, enter
=$E$2/(6-B2+1)(where E2 = 0.05). - Compare: A p-value is significant if it ≤ its corresponding critical value.
Method 3: Benjamini-Hochberg (FDR)
- Sort p-values in ascending order (A2:A6).
- Add rank in B2:
=RANK(A2, $A$2:$A$6). - Calculate adjusted p in C2:
=A2*5/B2(for 5 tests), drag down. - Find largest k where p(k) ≤ (k/m) × α (m = total tests).
- Reject all hypotheses for p ≤ p(k).
Comparison of Adjustment Methods
| Method | Controls | Conservativeness | Power | Best For |
|---|---|---|---|---|
| Bonferroni | FWER | Very High | Low | Few tests, critical Type I control |
| Holm-Bonferroni | FWER | High | Moderate | Balanced approach |
| Benjamini-Hochberg | FDR | Low | High | Large-scale testing (e.g., genomics) |
| Hochberg | FWER | Moderate | Moderate-High | Alternative to Holm |
When to Use Each Method
- Bonferroni: Use when you have <10 tests and need strict control (e.g., clinical trials).
- Holm-Bonferroni: Default choice for most cases with 10-100 tests.
- Benjamini-Hochberg: Ideal for exploratory research with 100+ tests (e.g., microarray data).
- Hochberg: Slightly more powerful than Holm; use when tests are independent.
Common Mistakes to Avoid
- Not adjusting at all: Leads to inflated Type I errors.
- Using Bonferroni for >20 tests: Too conservative; use Holm or FDR instead.
- Mixing dependent and independent tests: Adjustment methods assume independence unless specified.
- Ignoring effect sizes: Focus on effect sizes alongside p-values for meaningful interpretation.
Advanced Topics
Dependent Tests
If your tests are correlated (e.g., repeated measures), use:
- Benjamini-Yekutieli: Adjusts for dependencies in FDR control.
- Permutation tests: Non-parametric alternative for complex dependencies.
Excel Functions for Adjustments
For automated calculations, use these custom Excel functions (via VBA):
Function BONFERRONI(p As Range, m As Integer) As Variant
Dim result() As Double
ReDim result(1 To p.Rows.Count, 1 To 1)
For i = 1 To p.Rows.Count
result(i, 1) = p.Cells(i, 1).Value * m
Next i
BONFERRONI = result
End Function
Authoritative Resources
- NIH Guide on Multiple Testing Correction (National Institutes of Health)
- Benjamini & Hochberg (1995) Original FDR Paper (UC Berkeley)
- FDA Guidance on Multiple Endpoints (U.S. Food & Drug Administration)
Frequently Asked Questions
Q: Can I use adjusted p-values for confidence intervals?
A: Yes, but the adjustment applies to the interval width, not the point estimate. For Bonferroni, multiply the margin of error by the number of tests.
Q: What if my adjusted p-value is >1?
A: Cap it at 1. This indicates the raw p-value was already non-significant even before adjustment.
Q: How do I report adjusted p-values?
A: Example: “The results remained significant after Bonferroni correction (adjusted p = 0.003).” Always specify the method used.