Bell Statistics

What is a p-value?

A p-value is the probability of seeing a result at least as extreme as the one you got, if the effect you are testing for does not exist. It measures how surprising your data would be under that assumption. It is not the probability that your result is wrong.

Notation
p
Also called
p value, probability value, significance probability
Allon Korem

Written by Allon Korem

Chief Executive Officer

Last updated

In plain English

Every significance test starts by assuming the thing you are hoping for is not true. That assumption is the null hypothesis: the new checkout converts exactly as well as the old one, the campaign moved nothing, the two groups are the same. The test then asks a single question — if that assumption held, how often would random noise alone produce a difference as large as the one in front of me? The answer to that question is the p-value.

So a p-value of 0.03 says: if the new checkout were genuinely no better, you would still see a gap this big or bigger about three times in a hundred repeats of the experiment. That is unusual enough that most people stop believing the assumption. A p-value of 0.40 says the opposite — a gap this size turns up four times in ten by chance alone, so the data give you no reason to abandon the idea that nothing happened.

The direction of that logic is the part people lose. The p-value is computed *assuming there is no effect*. It cannot then turn around and tell you the probability there is no effect, any more than "most burglars wear gloves" tells you that most people wearing gloves are burglars. Answering the question you actually care about — how likely is it that this change works? — requires something the p-value does not contain: how plausible the effect was before you ran the test. Roughly one in three published misinterpretations of a p-value is a version of this inversion, and it is why a p just under 0.05 supports a surprising claim far more weakly than most readers assume.

Two other things are missing from it, and both matter more in practice than the interpretation debate. A p-value says nothing about how *big* the effect is — with a hundred thousand users per arm, a 0.1% lift that no one would fund clears p < 0.001 comfortably. And it says nothing about how *reliably* you could have found a real effect, which is statistical power. A large p from an underpowered test is not evidence of no effect; it is evidence that the test could never have told you either way.

This is why a confidence interval belongs next to every p-value you report. The p answers a yes-or-no question about a hypothesis nobody believed anyway; the interval answers the question the business is asking, which is how much. The two are computed from the same numbers and never disagree — a 95% interval excludes zero exactly when p < 0.05 — but only one of them tells you whether the result is worth shipping. We make the longer version of this argument in how to report A/B test results.

The formula

There is no single formula for a p-value, because it is a probability read off whichever distribution the test statistic follows — t, z, chi-square, F. The pattern is always the same: standardise the observed difference into a test statistic, then measure the tail area beyond it.

General definition
p = P( T ≥ t_observed | H₀ true )

T is the test statistic under the null; t_observed is the value your data produced. Everything else is bookkeeping about which distribution T follows.

Two-sided p-value
p = 2 · P( T ≥ |t_observed| )

The default, and the honest one: it counts a difference in either direction as surprising. Halving it after seeing which way the result went is how a 5% error rate quietly becomes 10%.

Two-proportion z-test
z = (p̂₁ − p̂₂) / √( p̂(1 − p̂)(1/n₁ + 1/n₂) )

The workhorse for conversion rates. The p-value is the normal tail area beyond z — see the A/B test sample size calculator.

Welch two-sample t-test
t = (x̄₁ − x̄₂) / √( s₁²/n₁ + s₂²/n₂ )

For revenue, session length and other measured outcomes. The p-value is the t tail area on the Welch-Satterthwaite degrees of freedom.

Worked example

You test a new checkout flow. The control converts 2,150 of 50,000 sessions; the variant converts 2,310 of 50,000. That is 4.30% against 4.62% — a relative lift of 7.4%. You want to know whether that gap is bigger than noise would produce on its own.

Control
2,150 / 50,000 = 4.30%
Variant
2,310 / 50,000 = 4.62%
Pooled rate (p̂)
4.46%
Standard error of the difference
0.00131
Test statistic (z)
0.0032 / 0.00131 = 2.44

p = 0.0147, two-sided. The 95% confidence interval on the absolute difference runs from 0.06 to 0.58 percentage points.

The p-value says a gap this large would turn up by chance about once in sixty-eight identical experiments where the flows were truly equivalent. That is enough to stop believing they are equivalent. What it does not say is how much better the new flow is — and the interval does: somewhere between 0.06 and 0.58 percentage points, which at the bottom end is a 1.4% relative lift and at the top end a 13.5% one. If your business case needed 5%, the p-value looks like a win and the interval says you still do not know. That gap between "significant" and "decision-ready" is the single most common way a green result leads to a bad shipping decision.

Common misconceptions

A p-value of 0.03 means there is a 3% chance the result is due to chance.
It means that *if* the result were due to chance, data this extreme would appear 3% of the time. The probability that chance produced your result depends on how likely a real effect was to begin with, which the p-value never sees. When most tested ideas do nothing — and in mature products most of them do — a p just under 0.05 can still leave a one-in-four chance that nothing is there.
p > 0.05 means there is no difference between the two groups.
It means you did not find one, which is a statement about your test rather than about the world. An underpowered experiment produces large p-values whether or not an effect exists — that is what low statistical power means. To claim two things are actually equivalent you need a test built for it, such as an equivalence test.
p = 0.049 is meaningfully different from p = 0.051.
It is not. The 0.05 line is a convention Fisher offered as a rule of thumb, not a property of nature, and the difference between those two numbers is well inside the noise of a single experiment rerun. Treating one as proof and the other as failure is what produces the pressure to peek, slice and re-slice until a result crosses the line.
A smaller p-value means a bigger or more important effect.
It means a more surprising one, and surprise scales with sample size. A trivial effect measured on ten million users produces a vanishingly small p; a transformative one measured on two hundred may not clear 0.05 at all. Effect magnitude is what effect size and the confidence interval report, and neither is recoverable from p alone.

Frequently asked questions

What counts as a good p-value?
There is no such thing in the abstract — it depends on what the decision costs. The 0.05 convention comes from Fisher in 1925 and was explicitly offered as a convenience, not a law. Fields where a false positive is expensive, such as particle physics and drug approval, use far stricter thresholds. For product experiments the more useful question is usually not which side of 0.05 you landed on, but whether the confidence interval excludes the smallest effect worth shipping.
Can I stop a test as soon as the p-value drops below 0.05?
Not with an ordinary test, no. Checking repeatedly and stopping at the first significant reading inflates the false-positive rate badly — with daily checks over a fortnight, the chance of a spurious win rises from 5% to roughly 25%. Either fix the sample size in advance and look once, or use a method designed for continuous monitoring, such as a sequential or group-sequential test with spending boundaries.
Should I use a one-tailed or a two-tailed p-value?
Two-tailed, in almost every product and marketing context. A one-tailed test doubles your sensitivity in one direction by giving up the ability to detect harm in the other, which is rarely a trade anyone would accept if it were stated out loud — and a change that makes things significantly worse is information you very much want. Choosing one-tailed after seeing which way the data went is not a choice at all; it is a doubling of your error rate.
I tested twelve metrics and one came back significant. Is it real?
Probably not on its own. Testing twelve independent metrics at the 5% level gives roughly a 46% chance that at least one clears the bar with nothing happening at all. That is the multiple comparisons problem, and the fix is either to nominate a single primary metric before the test starts or to adjust the threshold with a correction such as Holm or Benjamini-Hochberg.

Related terms

  • Confidence interval

    The range your data can actually support, and why it answers the business question a p-value cannot.

  • Multiple comparisons

    Test enough things and something will look significant — the arithmetic, and the four fixes.

  • Null hypothesis

    The assumption every test argues against, and the reason you can never prove two things are the same.

  • Significance level

    The false-positive rate you agree to in advance — a budget, and one most teams overspend.

  • Statistical significance

    A verdict about evidence, not about importance — and the difference is where most bad decisions live.

  • Type I error

    The false positive — and the one whose cost lands months later, on a roadmap built around noise.

Calculate it

  • A/B test sample size

    Size a two-proportion experiment before you launch, then read the lift and its interval once it lands.

  • Two-sample t-test

    Compare the average of two independent groups — plan the sample size, then test the result.

  • Chi-square test

    Test a contingency table of counts for association — any number of rows and columns.

Knowing the term is the easy part

Applying it to a live measurement problem is the part that goes wrong. If you are designing an experiment, reading a result you do not trust, or trying to work out what your marketing actually caused, that is the work we do.