TapCub is live — analytics, insights and live chat, free on one platform
Glossary

P-hacking: what it is, examples and how to avoid it

P-hacking means trying many analyses and reporting the one that turns significant. Common forms in A/B tests and dashboards, a simulation showing peeking raises false positives from 5% to 25%, warning signs and how to prevent it.

Emma Collins Reviewed by Su He Also called p hacking Last updated Nov 5, 2026 Glossary

Quick answer

P-hacking is the practice of running many analyses, such as peeking, adding metrics or segments, changing windows or excluding data, and reporting only those that reach statistical significance, which inflates the false positive rate far above the nominal level.

What is p-hacking?

P-hacking is analyzing data in many different ways and reporting the version that crosses the significance threshold (usually p < 0.05), without accounting for all the attempts. Each choice may look reasonable on its own: one more day of data, one more segment, dropping a few outliers. Together they make "significant" results far more likely than 5% even when nothing real is going on.

It is also called data dredging, data fishing or significance chasing. It is usually not fraud; it is the natural result of looking for a story in noisy data under pressure to find one.

Common forms of p-hacking

FormWhat it looks like in product and marketing analytics
Peeking (optional stopping)Checking a test every day and stopping the first time p < 0.05
Many metricsTracking 20 metrics and reporting the one that moved
Many segments"No overall effect, but it worked on mobile users in Germany"
Flexible windowsTrying 7, 14 and 30 days and keeping the best
Selective exclusionsRemoving "outliers" or "bad days" after seeing the result
Switching testsTrying a t-test, then a Mann–Whitney test, then a log transform
HARKingHypothesizing after the results are known, then presenting it as the plan

How much it inflates false positives

We simulated an A/A test: two identical variants, both converting at 5%, 500 visitors per variant per day for 20 days, repeated 4,000 times (sample simulation).

Analysis approachFalse positive rate
One test at the planned end (day 20)4.7%
Check every day, stop at the first p < 0.0524.6%

Peeking alone multiplies false wins by about five. Testing many outcomes does the same arithmetic in another dimension: with 20 independent metrics and no real effect, the chance that at least one is significant at 5% is 1 − 0.95²⁰ = 64%; with 10 segments it is 40%.

Those false wins then get shipped, and the expected lift never shows up in the following quarter.

Signs of p-hacking

  • Many results with p just under 0.05 (0.041, 0.048) and very few just above.
  • The "key metric" in the write-up is not the one named before the test.
  • Effects found only in a narrow, oddly specific segment.
  • Sample sizes that are not round or pre-planned ("we ran it for 11 days").
  • Results that do not replicate when the same change is tested again.

How to avoid it

  1. Decide before you look. Write down the primary metric, the segments, the sample size or duration, and the analysis method. This is pre-registration in a sentence or two.
  2. Use a fixed horizon, or a method built for peeking. If you must monitor continuously, use a sequential test or alpha-spending approach designed for repeated looks.
  3. Correct for multiple comparisons. Adjust thresholds when you test many metrics or segments, for example with a Bonferroni correction or a false discovery rate method.
  4. Separate exploration from confirmation. Exploring dashboards is fine; label what you find as a hypothesis and confirm it on new data or a new test.
  5. Report everything. Say how many metrics and segments you looked at, and report p-values together with the size of the difference and its interval.
  6. Plan for enough power. Underpowered tests tempt people to keep going until something shows up; size tests with a minimum detectable effect.

P-hacking in everyday analytics

Most p-hacking in companies happens outside formal experiments: comparing this week to last week across ten channels, slicing a dip by every dimension until one looks guilty, or re-running a cohort report with different windows. A few habits help:

  • Keep a short list of the metrics that matter and look at them first.
  • When a slice looks dramatic, check its size; a 300-visitor segment swings by chance.
  • Confirm a finding over a second period before acting.
  • Pair every primary metric with guardrail metrics that you did not choose after the fact.

In TapCub you can save a dashboard or report view before a launch, so the comparison you planned is the one you read afterwards; annotations on the chart record when the change shipped.

See also: What is sequential testing? Peeking, methods and an example.

Sources

Was this explanation clear?

We use your answers to fix and expand this page.

Emma Collins

Product Analyst

Focuses on event analysis, conversion funnels, and retention, using clear metric definitions and structured analysis to explain product performance.

FAQ

Questions people ask

Short answers to the follow-up questions that come up most.

Still have a question?

Chat with the team behind TapCub — we usually reply within a few hours on business days.

What is an example of p-hacking?

Checking an A/B test every day and stopping as soon as p drops below 0.05. In our simulation of identical variants, that raised the false positive rate from 4.7% to 24.6%.

Is p-hacking always intentional?

No. It usually comes from many small, reasonable-looking choices made after seeing the data.

How do you prevent p-hacking?

Pre-specify the primary metric, segments and sample size; use a fixed horizon or sequential methods; correct for multiple comparisons; and confirm exploratory findings on new data.

Is exploring data p-hacking?

Not if you treat what you find as a hypothesis and confirm it separately. It becomes p-hacking when exploratory findings are presented as planned tests.

See this number on your own site

Add one script tag for web and apps, and the first reports fill in within minutes.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics