liveBook · Manning

P-hacking

As explained in Effective Data Analysis

P-hacking is the manipulation of analyses, data collection, or reporting choices to obtain a statistically significant p-value.

P-hacking, or data fishing, manipulates data, hypotheses, designs, tests, outlier decisions, or transformations until a statistically significant p-value appears. The resulting finding may not reflect the population. section 5.3.2

The central risk is inflated false-positive evidence: at an alpha level of 0.05, repeatedly testing increases the chance that at least one test rejects the null hypothesis and commits a Type 1 error. section 5.3.2

Common forms of p-hacking include:

  • Running large or indefinite permutations of statistical tests until one produces significance. section 5.3.2
  • Continually changing hypotheses, analytical designs, outlier-removal methods, or data transformations until the result crosses the significance threshold. section 5.3.2
  • Dropping individual observations to improve a result rather than applying a systematic rule for handling outliers. section 4.2.1

App layout and weekly visits

An analyst tests whether changing an app layout causes 10% more users to visit weekly. Trying many tests, designs, or data treatments until one supports that claim turns exploratory analysis into p-hacking. section 5.3.2

Figure 5.18 P-hacking involves testing a dataset indefinitely until something returns a significant value.
figure

The figure depicts p-hacking as testing a dataset indefinitely until a significant value appears. section 5.3.2

How Effective Data Analysis covers it

How deep it goes
Explains repeated testing and analytical flexibility, but does not detail a complete prevention workflow.
Examples
Uses an app-layout test, repeated statistical tests, outlier removal, transformations, and an indefinite-testing figure.
What it assumes
Assumes familiarity with statistical tests, p-values, null hypotheses, significance thresholds, outliers, and transformations.
What you can do after
Diagnose/debug with it by recognizing analytical choices that can manufacture statistical significance and misrepresent population findings.
How it connects
Connects p-hacking with data fishing, statistical significance, null hypotheses, Type 1 errors, outliers, and data transformations.

Also explained in

Compare how 3 books explain p-hacking →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Effective Data Analysis. The section links point to the parts of the book it draws on.