P-Hacking &
Transparency
Understand how data manipulation inflates false discoveries, why multiple testing requires corrections, and how transparent research practices protect scientific integrity.
What Is a P-Value?
A p-value measures the probability of observing data at least as extreme as what was collected, assuming the null hypothesis is true. Formally:
If \( p \leq \alpha \) (commonly \( \alpha = 0.05 \)), we reject \( H_0 \). But this threshold does not measure the probability that \( H_0 \) is false: it measures the probability of seeing such extreme data if \( H_0 \) were true.
The False Positive Problem
At \( \alpha = 0.05 \), there is a 5% chance of rejecting \( H_0 \) when it is actually true. This is a Type I error (false positive). One test alone is manageable: but what happens when we run many tests?
What Is P-Hacking?
P-hacking (also called data dredging) is the practice of manipulating data analysis until a statistically significant result (\( p \leq 0.05 \)) emerges. This can be done intentionally or unconsciously.
The Multiple Testing Problem
When you perform \( m \) independent tests, the probability of at least one false positive is called the family-wise error rate (FWER):
The Bonferroni Correction
The simplest fix for multiple testing: divide your significance threshold by the number of tests. This controls the family-wise error rate.
Bonferroni vs. FDR Correction
Two main approaches exist for multiple testing. They control different error rates and suit different research goals.
| Bonferroni (FWER) | Benjamini-Hochberg (FDR) | |
|---|---|---|
| Controls | Probability of any false positive | Expected proportion of false positives |
| Formula | \( \alpha / m \) | Rank-based adjusted thresholds |
| Strictness | Very strict | More lenient |
| Best for | Small number of tests, high stakes | Genomics, screening many hypotheses |
| Risk | Many false negatives | Some false positives allowed |
Why P-Hacking Is Dangerous
P-hacking inflates the false discovery rate, meaning published "significant" findings are often not reproducible. This has real consequences in medicine, policy, and public trust.
How to Detect P-Hacking
Transparency Practices
Transparent research practices protect against p-hacking and build trust in scientific findings. Here are the key pillars:
How to Pre-Register a Study
Example: Jelly Beans & Acne
A researcher tests whether each of 20 jelly bean colors is linked to acne. Each test uses \( \alpha = 0.05 \). One color (green) yields \( p = 0.03 \). The headline reads: "Green jelly beans linked to acne!"
Example: Clinical Trial Subgroups
A drug trial for headache relief finds no overall effect (\( p = 0.32 \)). But the researchers then split by age, gender, and headache severity, yielding 12 subgroups. In women aged 40-50, they find \( p = 0.04 \).
Example: Optional Stopping
A researcher plans to collect \( n = 100 \) samples but checks the \( p \)-value after every 10. At \( n = 40 \), they find \( p = 0.04 \) and stop. Is this valid?
Common Mistakes
Summary Table
| Concept | What It Means | How to Address It |
|---|---|---|
| P-hacking | Manipulating analysis to get \( p < 0.05 \) | Pre-registration |
| Multiple testing | More tests = more false positives | Bonferroni / FDR |
| Optional stopping | Peeking at \( p \)-value inflates Type I error | Fixed sample size |
| Selective reporting | Only showing "significant" results | Report all outcomes |
| Publication bias | Journals prefer \( p < 0.05 \) | Registered reports |
Question 1 of 5
A researcher runs 40 independent tests at \( \alpha = 0.05 \). Using Bonferroni correction, what is the adjusted significance threshold?
Question 2 of 5
What is the family-wise error rate (FWER) when running 10 independent tests at \( \alpha = 0.05 \) with no correction?
Question 3 of 5
Which of the following is the best description of p-hacking?
Question 4 of 5
A study pre-registered one primary hypothesis and found \( p = 0.03 \). During analysis, they also discovered an unexpected subgroup effect with \( p = 0.01 \). How should the subgroup finding be reported?
Question 5 of 5
A clinical trial checks the \( p \)-value after every 20 patients and stops at \( n = 60 \) when \( p = 0.048 \). Which problem does this illustrate?