Reproducibility and P-Hacking
A biologist runs an experiment comparing gene expression in stressed versus unstressed plants. The result is a p-value of 0.058. The biologist quietly decides to drop two "outlier" samples. A noisy replicate is excluded, and a different normalization method is tried. The new p-value is 0.041. The paper gets published. Nothing fraudulent happened — no one fabricated data. Yet the reported result is far less trustworthy than the single p < 0.05 suggests. This is because it emerged from one path through a garden of many possible analyses. This scenario is repeated across thousands of laboratories. It is a central reason why a large fraction of published findings fail to replicate. This affects biology, psychology, and medicine, when other labs repeat the same experiment. The problem is not usually outright cheating. It is p-hacking: the mostly unconscious exploitation of many small, defensible-seeming choices. These choices arise in data collection and analysis. They include which samples to exclude, which covariates to add. They also include when to stop collecting data, and which outcome measures to report. In aggregate, these choices let a researcher find a "significant" result almost whenever one is wanted. The Multiple-Testing Problem shows that testing many hypotheses inflates the false-positive rate. P-hacking is exactly the within-study, often invisible version of that problem. Many hidden hypotheses are tested, but only one path is reported. Reproducibility is the currency biology trades in. It means an independent researcher, given the same data and methods, gets the same result. Ideally, an independent experiment gives the same conclusion too. When it fails at scale, resources are wasted. This was revealed by large replication projects in cancer biology and psychology during the 2010s. Clinical translation stalls, and public trust erodes. This article explains the mechanism by which flexible analysis inflates false-positive rates. This happens even when every individual step looks statistically legitimate. It reviews the empirical evidence that this occurs routinely and at scale. It also introduces preregistration as the principal structural remedy. Preregistration means publicly committing to a hypothesis and analysis plan before seeing the data. The ideas here connect directly to Bayesian Inference in Biology: An Introduction. There, prior plausibility helps discount implausible "discoveries." They also connect to Simulation and Resampling Methods. These let researchers quantify exactly how much flexibility inflates error rates.
- P-hacking is the (often unintentional) exploitation of flexible analysis choices to push a p-value below 0.05.
- Researcher degrees of freedom — exclusion rules, covariates, subgroups, stopping rules, outcome choice — create many hidden tests.
- Each hidden test raises the true false-positive rate far above the nominal α = 0.05, even if only one result is ever reported.
- Simulations (Simmons, Nelson & Simonsohn, 2011) show four common flexible choices can push false-positive rates above 60%.
- Large-scale replication projects (Open Science Collaboration 2015; Begley & Ellis 2012) found the majority of tested findings did not replicate.
- Preregistration — locking in hypotheses and analysis plans before data collection — is the main structural fix, alongside registered reports and multiplicity correction.
Every unreported analytical choice you could have made, but didn't, is a hidden statistical test — and the more hidden tests behind a single reported p-value, the less that p-value means.
The core idea
A p-value answers a narrow question: assuming the null hypothesis is true, how surprising is data at least this extreme? The entire logic of hypothesis testing rests on the assumption that the test was specified — the hypothesis, the sample size, the exclusion criteria, the outcome variable, the statistical model — before the data were seen. When any of these are instead chosen or adjusted after looking at the data, in whatever way makes the result look best, the nominal p-value no longer reflects the true probability of a false positive. This is p-hacking, and it does not require dishonesty: a researcher genuinely believing each individual choice was "the right way to analyze the data" can still, collectively, be running an unacknowledged multiple-testing problem against themselves. The technical term for the raw material of p-hacking is researcher degrees of freedom — the large number of seemingly minor, defensible decisions available at every stage of a study. Should an "outlier" more than 2 SD from the mean be excluded, or 3 SD, or not at all? Should sex, age, or batch be included as a covariate? Should the primary outcome be measured at day 7 or day 14, or both? Should the experiment stop at n = 20 per group, or continue until something looks significant? Any single one of these choices is often statistically legitimate in isolation. The trouble is combinatorial: if there are 20 plausible analysis pipelines and a researcher (consciously or not) gravitates toward the one that crosses the significance threshold, the effective probability of finding some "significant" result under the null hypothesis is vastly higher than 5%, even though only one pipeline — and one p-value — is ever reported to readers. It is essential to distinguish p-hacking from two things it is not. It is not the same as fraud (fabricating or falsifying data), which is rarer and easier to detect. It is also not the same as legitimate, principled exploratory data analysis — looking broadly at data to generate new hypotheses is a valuable scientific activity, but only if it is honestly labeled as exploratory or hypothesis-generating rather than presented as a single confirmatory test of a pre-specified hypothesis. The harm of p-hacking comes specifically from undisclosed flexibility masquerading as confirmatory inference — reporting a result as if it were the single outcome of a single pre-planned test, when in fact it was selected, after the fact, from many candidate analyses.
Mechanism — how flexibility inflates false positives
Step 1: The null hypothesis is actually true (or the true effect is null/negligible). In biology this happens constantly — most candidate genes are not really associated with a given disease, most compounds screened do not really affect the pathway of interest, most subgroup differences are noise. Under a true null, a correctly specified single test rejects the null (p < 0.05) only 5% of the time, by construction.
Step 2: The researcher has several "reasonable" ways to test the same broad question. Suppose there are two candidate outcome measures, two plausible covariate sets, and a choice of whether to exclude two ambiguous samples. That is 2 × 2 × 2 = 8 distinct, individually-defensible analysis pipelines applied to the same underlying dataset.
Step 3: The analyses are not independent, but they are not identical either. Because each pipeline uses overlapping data and similar statistical machinery, each has roughly (not exactly) a 5% chance of crossing p < 0.05 under the null, and these chances are positively correlated across pipelines. The key quantitative fact is that even modest correlation is not enough to prevent inflation: the family-wise probability that at least one of the 8 pipelines yields p < 0.05, purely by chance, climbs well above 5% — often into the 20–60% range depending on how correlated the pipelines are.
Step 4: The researcher reports only the pipeline that "worked." Crucially, no single step in this process need be dishonest. Excluding an outlier can be entirely justified on its own terms; adding a covariate can be entirely justified on its own terms. The problem is selection after the fact, combined with silence about the alternatives that were tried. The published paper shows one test, one p-value, and no trace of the seven roads not taken.
Step 5: The reported p-value is systematically too small relative to what it is claimed to represent. A reader interprets "p = 0.032" as "a 3.2% chance of a false positive under this exact pre-specified test." The true chance of some false positive somewhere in the search the researcher (often unconsciously) conducted may be many times higher. The gap between nominal α and actual false-positive rate is the entire mechanism of p-hacking. A closely related practice is optional stopping: continuing to collect data and re-running the test after each new batch, stopping as soon as p < 0.05 is reached. Because a random walk of p-values will cross any threshold eventually with high probability if you keep checking, repeated "peeking" at accumulating data, without a pre-specified stopping rule, is itself a powerful hidden multiple-comparisons problem — often the single most potent form of p-hacking because it can be repeated many times within one experiment.
The second part of the mechanism concerns what happens across many independent studies of the same true-null effect, which is really the same logic scaled up to the level of a whole field, and connects p-hacking back to the The Multiple-Testing Problem at the level of the literature rather than the single paper. Suppose 100 laboratories worldwide each test, independently, whether a candidate biomarker predicts disease — and suppose, in truth, it does not. By chance alone, about five of those 100 studies will find p < 0.05 in the "right" direction. Because of publication bias — the tendency of journals, reviewers, and researchers themselves to preferentially write up and accept "significant," novel-looking findings, and to file away "null" results in a drawer — those five false positives are disproportionately likely to become the visible published literature, while the 95 null results vanish. This is sometimes called the file-drawer problem. A field can end up with a published literature dominated by chance flukes, not because any individual researcher cheated, but because the filter connecting experiments to publications is itself biased toward "significant" results, and p-hacking supplies extra fuel by helping marginal, near-null findings cross the publication threshold that would otherwise have kept them in the file drawer.
The evidence
Simmons, Nelson & Simonsohn (2011), "False-Positive Psychology." This paper is the canonical demonstration of p-hacking's power, and though published in a psychology journal, its logic applies directly to any experimental biology with flexible analysis pipelines (behavioral assays, cell-culture experiments, small-animal studies). The authors identified four common, individually-defensible researcher degrees of freedom: (1) trying two or more outcome variables and reporting only the significant one; (2) deciding whether to collect more data after an initial peek; (3) controlling for gender or other covariates only when it helps; (4) reporting only a subset of experimental conditions. Using computer simulation of data drawn from a true null (no real effect whatsoever), they showed that exploiting just these four degrees of freedom pushed the false-positive rate from the nominal 5% up past 60% — meaning a researcher using this flexibility, testing a completely fake effect, would find a "statistically significant" result more often than not. In a companion empirical demonstration, they used exactly this kind of flexibility to "prove," using real collected data, that listening to a particular song about aging changed people's actual chronological age — an outcome known to be impossible — illustrating that p < 0.05 obtained through flexible analysis carries almost no evidentiary weight.
Begley & Ellis (2012), Nature. Researchers at the biotechnology company Amgen attempted to replicate 53 landmark preclinical cancer biology studies — papers that had shaped drug-development strategy across the field. Working sometimes with the original authors and their exact reagents and protocols, Amgen's team could confirm the original results in only 6 of 53 studies (about 11%). The failures were not attributed to fraud but to a combination of small sample sizes, selective reporting of favorable replicates, inadequate blinding, and the kind of flexible, unreported analytical choices that define p-hacking. The paper's stark headline number — roughly 89% of high-profile findings failing to replicate — helped trigger the "reproducibility crisis" conversation across all of experimental biology, not only cancer research.
The Open Science Collaboration (2015), Science, "Estimating the reproducibility of psychological science." A coordinated effort of over 270 researchers repeated 100 published psychology experiments using the original materials and much larger, pre-registered replication protocols. While 97% of the original studies had reported a statistically significant result, only 36% of the direct replications did, and the average replicated effect size was roughly half the originally published size. Because the replication protocols were pre-registered — locking in hypotheses, sample sizes, and analysis plans before data collection — this project is also the clearest large-scale demonstration that preregistration itself changes outcomes: the very act of removing researcher degrees of freedom from the replication attempt is part of why so many original "discoveries" failed to reappear.
John, Loewenstein & Prelec (2012), "Measuring the prevalence of questionable research practices." Using an anonymous survey with an incentive structure designed to encourage honest self-report even of unethical behavior, the authors found that a majority of practicing research psychologists admitted to at least one questionable research practice, such as deciding whether to collect more data after checking if results were significant (reported by more than half of respondents), or selectively reporting studies that "worked." This evidence matters because it shows p-hacking is not a rare pathology of a few bad actors but a widespread, often normalized set of habits — precisely because each individual practice can feel statistically innocuous in the moment it is used. Together these three lines of evidence — controlled simulation showing the mathematics of inflation, biotechnology-industry replication attempts showing catastrophic real-world failure rates, and survey evidence showing the underlying practices are common — triangulate on the same conclusion: flexible, undisclosed analysis reliably manufactures false positives at a scale large enough to distort entire fields.
Worked examples
Example 1 — quantifying the inflation from three independent binary choices. Suppose a lab has three genuinely independent researcher degrees of freedom, each of which, under the true null, has an approximately 5% chance of independently producing p < 0.05 (this independence assumption is a simplification — in reality choices are correlated — but it isolates the arithmetic cleanly):
- Include or exclude 2 flagged outlier samples (2 choices)
- Use raw values or log-transform the outcome (2 choices)
- Test the treatment effect with or without a batch covariate (2 choices)
That gives 2 × 2 × 2 = 8 independent-seeming pipelines. If each has probability 0.05 of a false positive and they were fully independent, the probability that at least one pipeline shows p < 0.05 is:
So even under full independence, the chance of stumbling on "significance" somewhere among 8 plausible pipelines is about 33.7%, nearly seven times the nominal 5%. In practice, correlated pipelines (they share most of the same data) reduce this somewhat compared to fully independent tests, but Simmons et al.'s simulations, which modeled realistic correlation among just four researcher degrees of freedom, still found inflation to roughly 61% — demonstrating that correlation attenuates but does not remotely eliminate the effect. This is the same combinatorial logic as The Multiple-Testing Problem, applied not across genes or SNPs but across a single researcher's private menu of analysis choices.
Example 2 — a preregistration decision in a CRISPR knockout screen. A lab wants to test whether knocking out gene X changes cell proliferation rate in a cancer cell line, relative to a scrambled-guide control. They plan n = 6 biological replicates per group, measured by an automated cell counter at 72 hours, analyzed with a two-sample t-test at α = 0.05. Path A — preregistered, confirmatory. Before running the experiment, the lab publicly time-stamps (e.g., via the Open Science Framework) the hypothesis ("knockout reduces proliferation"), the exact outcome variable (cell count at 72 h), the sample size (n = 6/group, fixed in advance), the exclusion rule (none, unless a well shows visible contamination under a pre-specified blinded check), and the single statistical test (two-sided t-test, α = 0.05). They run the experiment once. Suppose they obtain t = 2.61, df = 10, giving p = 0.026. Because every choice was fixed in advance, this p-value can be interpreted at face value: under the null of no true effect, results this extreme would occur about 2.6% of the time. Path B — same data, p-hacked. Instead, suppose after seeing a "promising but not quite significant" result at n = 6 (p = 0.083), the lab adds four more replicates (now n = 10), checks again (p = 0.061), tries measuring at 96 hours instead of 72 (p = 0.049), and reports only this last analysis, with no mention of the earlier failed attempts. The final reported "p = 0.049 (n = 10, 96 h)" looks like ordinary science but is the product of at least three sequential hidden tests plus optional stopping. Using logic parallel to Example 1, the true probability that some combination along this search path crosses p < 0.05, even under a genuinely null effect of the knockout, is very plausibly above 20–30%, not 5%. The two paths can start from the identical raw wells of cells; only the reporting discipline differs, and only Path A licenses the textbook interpretation of the p-value.
Common misconceptions & traps
| Misconception | Why it's wrong |
|---|---|
| "P-hacking always means fraud or lying." | Most p-hacking is unconscious — researchers genuinely believe each choice was the "correct" analysis; the problem is undisclosed selection among choices, not deception. |
| "If p < 0.05, the finding is real." | A p-value's meaning depends entirely on the analysis being pre-specified; after flexible post-hoc selection, p < 0.05 can occur most of the time even under a true null. |
| "Excluding outliers is always cheating." | Legitimate, pre-specified exclusion rules (e.g., a defined QC threshold) are fine; the problem is choosing the rule after seeing whether it helps the result. |
| "A large replication failure proves the original was fraudulent." | Most failed replications reflect p-hacking, small samples, publication bias, or genuine context-dependence — not deliberate fabrication. |
| "Preregistration is only for clinical trials." | Preregistration is equally applicable, and increasingly used, in bench experiments, animal studies, and observational genomics. |
| "Exploratory analysis is illegitimate." | Exploration is valuable science — the error is presenting exploratory, post-hoc findings as if they were confirmatory tests of a pre-specified hypothesis. |
The scientist behind it
The modern reproducibility movement in experimental biology and psychology does not trace to one solitary discoverer in the way Mendelian genetics traces to Mendel; it is better understood as a diagnosis made collectively and then formalized by a handful of methodologists. Among the most influential is John P. A. Ioannidis, a physician-scientist and meta-researcher whose 2005 paper "Why Most Published Research Findings Are False" used a mathematical model of statistical power, bias, and the number of teams testing a hypothesis to argue that, across many fields of biomedicine, the majority of published "positive" findings were likely to be false positives — a claim later borne out empirically by the Begley & Ellis and Open Science Collaboration replication efforts. Ioannidis's model formalized exactly the mechanism this article describes: as the number of hypotheses tested rises, as the flexibility of analysis rises, and as publication bias toward positive results rises, the post-study probability that a "significant" finding is true falls, sometimes drastically. His subsequent empirical audits of specific literatures — nutrition epidemiology, gene-association studies, neuroimaging — repeatedly found the same pattern: small studies, flexible analyses, and strong publication-bias filters together generate a literature far noisier than its p-values suggest. Alongside Ioannidis, the psychologists Joseph Simmons, Leif Nelson, and Uri Simonsohn supplied the quantitative demonstration described above, and Brian Nosek, co-founder of the Center for Open Science, led the large coordinated replication projects and championed preregistration and "registered reports" — a publishing format in which a journal reviews and accepts a study's hypotheses and methods before the results are known, structurally removing the incentive to p-hack because publication no longer depends on the outcome.
Origins · 1 minJohn P. A. Ioannidis and how this was discovered
Where this matters today
In preclinical drug development, pharmaceutical and biotechnology companies now routinely budget for internal replication of academic findings before committing to costly clinical programs, directly because of the Begley & Ellis-style failure rates; some funders and companies now require preregistered protocols from academic collaborators before investing. In clinical trials, preregistration is legally mandated in many jurisdictions (e.g., ClinicalTrials.gov registration is required before enrollment for trials seeking FDA approval), specifically to prevent post-hoc switching of primary outcomes — a well-documented historical form of p-hacking in medicine, in which a trial that failed on its planned primary endpoint was published emphasizing a secondary endpoint that happened to reach significance. In genomics and high-throughput biology, where thousands of genes or variants are tested simultaneously, preregistration of the analysis pipeline (which normalization method, which multiple-testing correction, which covariates) prevents the same p-hacking logic from operating at the level of pipeline choice rather than single-hypothesis choice, complementing the statistical corrections taught in The Multiple-Testing Problem. In ecology and conservation biology, where field data collection is expensive and sample sizes are often small, journals increasingly offer "registered report" tracks so that null results — a species does not respond to a management intervention, a pollutant does not affect reproduction — get published and inform policy, rather than vanishing into the file drawer. In funding and hiring, granting agencies (e.g., the U.S. National Institutes of Health) have introduced rigor-and-reproducibility criteria into review, and some university and journal policies now require data and code sharing so that others can audit the analytical path actually taken — a direct, practical countermeasure to the invisibility that makes p-hacking possible in the first place. Understanding this mechanism also motivates the shift toward Bayesian Inference in Biology: An Introduction, where prior evidence directly downweights implausible claims regardless of a single p-value, and toward Simulation and Resampling Methods, which let researchers pre-register and stress-test an entire analysis pipeline's error rate before ever touching real data.
Ask the tutor: If I already ran an exploratory analysis and found something interesting, how should I honestly report it without it counting as p-hacking?
Is p-hacking the same thing as scientific fraud?
No. Fraud involves deliberately fabricating or falsifying data, and is comparatively rare and often detectable through forensic statistical analysis or failed reproduction of raw data. P-hacking, by contrast, typically involves entirely real data and individually defensible analytical choices — excluding a plausible outlier, adding a sensible covariate, trying an alternative transformation — made without full awareness that, in combination and after selection based on the result, they inflate the false-positive rate far above the nominal level. Most researchers who p-hack believe they are doing careful, responsible analysis. This is precisely what makes the problem hard to fix: it cannot be solved by policing dishonesty alone, because the behavior does not require dishonest intent, only undisclosed flexibility exercised after seeing the data.
If I have to make analytical decisions, like excluding a contaminated sample, how do I avoid p-hacking?
The key discipline is deciding the rule before seeing whether applying it changes your result. If you specify, in advance, "any well with fewer than 50% viable cells by microscopy will be excluded regardless of its statistical outcome," and you apply that rule uniformly, this is legitimate quality control, not p-hacking. The moment the exclusion decision depends on whether it makes the p-value smaller, it becomes p-hacking, even though the rule ("exclude contaminated samples") sounds identical in both cases. Preregistering your exclusion criteria, covariates, primary outcome, and sample size — ideally with a time-stamped public record — is the most reliable way to guarantee this ordering and to let readers verify it after the fact.
Doesn't requiring everything to be preregistered kill exploratory science?
No, but it requires labeling exploratory analysis honestly. Preregistration governs confirmatory claims — statements of the form "we tested hypothesis H and found evidence for/against it at a specified error rate." Exploratory analysis, where a researcher looks broadly across many variables to generate new hypotheses, remains completely legitimate and valuable; the failure mode is presenting an exploratory finding using the language and p-values of confirmatory testing, which implicitly claims a false-positive guarantee that was never actually earned. Many modern papers now explicitly separate a "confirmatory, preregistered" results section from an "exploratory, hypothesis-generating" section, letting both modes of science coexist without one masquerading as the other.
How does p-hacking relate to the multiple-testing problem in genomics?
They are the same underlying mathematics applied at different scales. In a genome-wide association study testing hundreds of thousands of SNPs, the multiple-testing problem is explicit and visible: everyone agrees a correction (e.g., Bonferroni or false discovery rate control) is needed because thousands of tests are openly performed. P-hacking is the invisible version of the same problem within a single study — instead of testing thousands of genes, the researcher tests a handful of covariate sets, exclusion rules, or outcome definitions, but because these alternative analyses are never disclosed, no one applies a correction for them, and the reader has no way to know a correction was even warranted.
What is a "registered report" and how does it differ from ordinary preregistration?
Ordinary preregistration means a researcher time-stamps their hypotheses and analysis plan on a public registry (such as the Open Science Framework) before collecting data, but the journal decision to publish still happens after results are known. A registered report goes further: the journal reviews and provisionally accepts the study based only on its introduction, hypotheses, and methods, before the results exist, and commits to publishing the completed study regardless of whether the results are positive or null. This structurally removes the incentive to p-hack, because publication no longer depends on achieving a significant result, and it directly attacks the file-drawer problem by guaranteeing null results reach print.
Can p-hacking make a true effect look bigger, or only manufacture effects that don't exist?
Both. When the true effect is exactly zero, p-hacking can manufacture an apparent effect purely from noise, as in the Simmons et al. demonstration. When a true, non-zero effect does exist, p-hacking (combined with publication bias favoring larger, "cleaner" results) tends to inflate the estimated effect size, because the flexible analysis path that reaches significance is disproportionately likely to be the one that happened to produce a larger-than-typical estimate in that particular sample. This is part of why the Open Science Collaboration found replicated effect sizes averaging roughly half the size of the original published estimates — the originals were partly selected for having caught an unusually large, noise-inflated result.
What is optional stopping, and why is it considered a particularly severe form of p-hacking?
Optional stopping means checking the p-value repeatedly as data accumulate and halting data collection as soon as p crosses below 0.05, rather than fixing the sample size in advance. Because a p-value computed under a true null fluctuates like a random walk as more data arrive, repeated checking gives many independent-ish opportunities to cross the threshold by chance, and with enough peeks the probability of eventually crossing 0.05 at some point approaches 1, even though no true effect exists. It is considered especially severe because it can be repeated many times within a single experiment without ever trying a different covariate or outcome — sample size alone, checked often enough, is sufficient to manufacture a false positive.