p-values and Significance

Suppose a coin is flipped 100 times and lands heads 58 times. Is this coin unfair? Or is 58 heads a plausible outcome of a fair coin? The p-value answers a precise version of this question. It measures how surprising the observed data would be if a specific null hypothesis were exactly true. This single number has become the most widely reported quantity in empirical science. It is also the most widely misunderstood. It appears in millions of papers across medicine, psychology, economics, and physics. Understanding precisely what a p-value does and does not claim is essential. This applies to anyone who reads, produces, or evaluates quantitative research. The idea sits inside the broader Hypothesis Testing Framework. We posit a null hypothesis H0H_0, and choose a test statistic sensitive to departures from H0H_0. Then we ask how extreme the observed statistic is relative to what H0H_0 predicts. The p-value formalizes "how extreme" as a probability computed under H0H_0. The significance level formalizes a pre-agreed threshold for declaring a result "statistically significant." Crucially, both are properties of a decision procedure applied before seeing the data. This holds even though the p-value is a number computed after seeing it. The big picture is that p-values give a calibrated, hypothesis-conditional measure of surprise. They are not a verdict on truth. A small p-value says the data are unlikely under H0H_0. It does not say H0H_0 is unlikely given the data. Nor does it quantify the size or importance of an effect. Conflating these readings is the single most common statistical error in applied research. It has driven entire fields into replication crises. This article gives the rigorous definition of the p-value. It proves its fundamental distributional property (uniformity under H0H_0 for continuous test statistics). It builds the connection to significance levels and Type I error. It works through the classical machinery with fully asymmetric numerical examples. It closes by cataloguing the standard misinterpretations. Correctly not believing false claims about p-values is as important as computing them correctly. This sets up the specific procedures built on exactly this foundation: Standard Tests: t, Chi-Squared, and F and Likelihood Ratio Tests.

Key takeaways
  • A p-value is P(test statistic at least as extreme as observed∣H0 true)P(\text{test statistic at least as extreme as observed} \mid H_0 \text{ true}), a probability computed assuming the null.
  • Under H0H_0, if the test statistic has a continuous distribution, the p-value is exactly Uniform(0,1)\mathrm{Uniform}(0,1) — this is a theorem, not a convention.
  • Significance level α\alpha is a pre-chosen threshold; rejecting H0H_0 whenever p≤αp \le \alpha controls the Type I error rate at exactly α\alpha (for continuous statistics).
  • A p-value is not P(H0∣data)P(H_0 \mid \text{data}), not the probability H0H_0 is true, and not a measure of effect size.
  • Small p-values can arise from trivial effects with huge sample sizes; large p-values do not prove H0H_0.
  • Key idea: the p-value is a probability about hypothetical repeated data under a fixed null, never a probability about the hypothesis itself.

Where this lives today

P-values remain the standard evidentiary currency of clinical trials, where regulatory agencies require pre-registered significance thresholds (often α=0.05\alpha=0.05, sometimes stricter for multiple endpoints) before a drug can claim efficacy. In particle physics, the discovery of the Higgs boson in 2012 was reported using a p-value corresponding to a "5-sigma" threshold (α≈3×10−7\alpha \approx 3\times 10^{-7}), reflecting the much stricter conventions physicists use partly because of the enormous number of implicit comparisons in a collider search. In genomics and neuroimaging, the multiple-testing problem — computing p-values for thousands or millions of loci or voxels simultaneously — has driven the development of false-discovery-rate methods (Benjamini–Hochberg) as a companion to, and partial replacement for, per-test significance. In machine learning and A/B testing at technology companies, p-value-based stopping rules for online experiments must be corrected for sequential peeking, connecting directly to the martingale theory behind sequential hypothesis testing. Cryptographic randomness testing (e.g. the NIST statistical test suite) applies p-value machinery to test whether a bit generator's output is distinguishable from a true uniform random source, directly using the Uniform(0,1) theorem proved above. All of these applications build on exactly the machinery formalized here, and are made computationally concrete via Standard Tests: t, Chi-Squared, and F and generalized via Likelihood Ratio Tests.

Ask the tutor: How does the p-value framework generalize into the likelihood-ratio test statistic used for composite hypotheses with nuisance parameters?

Definitionp-value and significance level

Let X=(X1,…,Xn)X = (X_1, \dots, X_n) be data with distribution depending on a parameter θ∈Θ\theta \in \Theta. Consider testing

H0:θ∈Θ0vs.H1:θ∈Θ1=Θ∖Θ0,H_0: \theta \in \Theta_0 \quad \text{vs.} \quad H_1: \theta \in \Theta_1 = \Theta \setminus \Theta_0,

using a test statistic T=T(X)T = T(X) such that larger values of TT constitute stronger evidence against H0H_0 (this "large = extreme" orientation is chosen per-test; some statistics use small or two-sided extremity instead, with the definition adjusted accordingly). The p-value of an observed data set xx with observed statistic tobs=T(x)t_{\mathrm{obs}} = T(x) is

p(x)=sup⁡θ∈Θ0Pθ(T(X)≥tobs).p(x) = \sup_{\theta \in \Theta_0} P_\theta\big(T(X) \ge t_{\mathrm{obs}}\big).

When Θ0\Theta_0 is a single point {θ0}\{\theta_0\} (a simple null), this reduces to

p(x)=Pθ0(T(X)≥tobs).p(x) = P_{\theta_0}\big(T(X) \ge t_{\mathrm{obs}}\big).

A significance level (or size) α∈(0,1)\alpha \in (0,1) is a number fixed in advance. The associated test rejects H0H_0 if and only if p(x)≤αp(x) \le \alpha, equivalently if T(x)≥cαT(x) \ge c_\alpha where cαc_\alpha is the (1−α)(1-\alpha)-quantile of TT's null distribution. A result is called statistically significant at level α\alpha if H0H_0 is rejected under this rule.

Intuition — prose building the mental picture

Picture the null hypothesis as generating a known distribution of possible test statistics — a bell curve, say, or some other shape entirely determined by H0H_0. The observed data produce one point on this distribution. The p-value is the tail area beyond that point: the total probability mass, under the null's distribution, of getting a result as extreme or more extreme than what was actually seen. A p-value of 0.030.03 says: "if H0H_0 were exactly true and I repeated this experiment many times, only about 3%3\% of the time would I see a statistic this extreme or more so." The key mental trap is direction of conditioning. The p-value conditions on the null being true and asks about the data; it never conditions on the data and asks about the null. Bayes' theorem shows these two conditional probabilities can differ enormously depending on the prior plausibility of H0H_0 — a fact demonstrated numerically below. A second useful picture: significance level α\alpha is a line drawn in the sand before the experiment, fixing how much Type I error risk is tolerable. The p-value is where the data actually landed relative to that line. Confusing the two — treating the p-value itself as a post-hoc adjustable threshold, or treating α\alpha as a statement about this one data set — is the second classic trap.

Figure
The p-value as a tail area under the null distribution of T
T t_obs p-value Null distribution of T under H₀ shaded area = P(T ≥ t_obs | H₀)
TheoremNull distribution of the p-value is Uniform(0,1)

Let T=T(X)T = T(X) be a test statistic whose cumulative distribution function F0(t)=Pθ0(T≤t)F_0(t) = P_{\theta_0}(T \le t) under the simple null θ=θ0\theta = \theta_0 is continuous (no jumps). Define the p-value as

P=1−F0(T).P = 1 - F_0(T).

Then, if X∼Pθ0X \sim P_{\theta_0} (i.e. H0H_0 is true), the random variable PP satisfies

P∼Uniform(0,1).P \sim \mathrm{Uniform}(0,1).

Consequently, for any α∈(0,1)\alpha \in (0,1), the test "reject H0H_0 iff P≤αP \le \alpha" has Type I error probability exactly α\alpha:

Pθ0(reject H0)=α.P_{\theta_0}(\text{reject } H_0) = \alpha.
Proof

We use the probability integral transform, a direct computation with the definition of CDF.

Step 1: F0F_0 is a valid CDF and U:=F0(T)U := F_0(T) is Uniform(0,1). Since F0F_0 is continuous and non-decreasing with F0(−∞)=0F_0(-\infty)=0, F0(∞)=1F_0(\infty)=1, for any u∈(0,1)u \in (0,1) define the quantile

q(u)=inf⁡{t:F0(t)≥u}.q(u) = \inf\{t : F_0(t) \ge u\}.

By continuity of F0F_0, F0(q(u))=uF_0(q(u)) = u exactly (the infimum is attained on the boundary of the level set because F0F_0 has no jumps, so it cannot "jump over" uu). We claim

{T≤q(u)}={F0(T)≤u}up to a null set.\{T \le q(u)\} = \{F_0(T) \le u\} \quad \text{up to a null set.}

Indeed, if T≤q(u)T \le q(u) then F0(T)≤F0(q(u))=uF_0(T) \le F_0(q(u)) = u by monotonicity. Conversely if F0(T)≤uF_0(T) \le u, monotonicity and the definition of qq as an infimum give T≤q(u)T \le q(u) except possibly on a set where F0F_0 is locally flat; continuity of F0F_0 ensures this exceptional set has Pθ0P_{\theta_0}-probability zero (flat regions of F0F_0 correspond to TT-values with zero density). Hence, for all u∈(0,1)u \in (0,1),

Pθ0(F0(T)≤u)=Pθ0(T≤q(u))=F0(q(u))=u.P_{\theta_0}(F_0(T) \le u) = P_{\theta_0}(T \le q(u)) = F_0(q(u)) = u.

This is precisely the CDF of the Uniform(0,1)\mathrm{Uniform}(0,1) distribution evaluated at uu, so U=F0(T)∼Uniform(0,1)U = F_0(T) \sim \mathrm{Uniform}(0,1).

Step 2: transfer to P=1−UP = 1 - U. Since U∼Uniform(0,1)U \sim \mathrm{Uniform}(0,1), and u↦1−uu \mapsto 1-u is a measure-preserving bijection of (0,1)(0,1) onto itself (it maps Lebesgue measure to Lebesgue measure, as one checks directly: for any interval [a,b]⊂[0,1][a,b] \subset [0,1], P(1−U∈[a,b])=P(U∈[1−b,1−a])=(1−a)−(1−b)=b−aP(1-U \in [a,b]) = P(U \in [1-b,1-a]) = (1-a)-(1-b) = b-a), we conclude

P=1−U∼Uniform(0,1).P = 1 - U \sim \mathrm{Uniform}(0,1).

Step 3: Type I error computation. By Step 2, for any α∈(0,1)\alpha \in (0,1),

Pθ0(P≤α)=α,P_{\theta_0}(P \le \alpha) = \alpha,

directly from the CDF of the uniform distribution, P(Uniform(0,1)≤α)=αP(\text{Uniform}(0,1) \le \alpha) = \alpha. Since the test rejects exactly when P≤αP \le \alpha, its Type I error probability is exactly α\alpha. ■\blacksquare

∎
LemmaComposite null: conservativeness

If H0:θ∈Θ0H_0: \theta \in \Theta_0 is composite (not a single point) and the p-value is defined as p(x)=sup⁡θ∈Θ0Pθ(T≥tobs)p(x) = \sup_{\theta \in \Theta_0} P_\theta(T \ge t_{\mathrm{obs}}), then for every θ∈Θ0\theta \in \Theta_0 and every α\alpha,

Pθ(reject H0)≤α.P_\theta(\text{reject } H_0) \le \alpha.
Proof

Fix θ∈Θ0\theta \in \Theta_0. By definition of the supremum,

Pθ(T≥tobs)≤sup⁡θ′∈Θ0Pθ′(T≥tobs)=p(x).P_\theta(T \ge t_{\mathrm{obs}}) \le \sup_{\theta' \in \Theta_0} P_{\theta'}(T \ge t_{\mathrm{obs}}) = p(x).

So whenever the true parameter is θ∈Θ0\theta \in \Theta_0, the realized p-value PP (as a function of the random data) satisfies P≥UθP \ge U_\theta pointwise, where UθU_\theta denotes the p-value computed as if θ0=θ\theta_0 = \theta were the true simple null. By the simple-null case applied at the true θ\theta (continuity of TT's distribution under θ\theta assumed), Uθ∼Uniform(0,1)U_\theta \sim \mathrm{Uniform}(0,1), so

Pθ(reject)=Pθ(P≤α)≤Pθ(Uθ≤α)=α.P_\theta(\text{reject}) = P_\theta(P \le \alpha) \le P_\theta(U_\theta \le \alpha) = \alpha.

The middle inequality holds because P≥UθP \ge U_\theta implies {P≤α}⊆{Uθ≤α}\{P \le \alpha\} \subseteq \{U_\theta \le \alpha\}. ■\blacksquare

∎

Worked examples

Example 1 — one-sided z-test with asymmetric numbers. A factory claims its light bulbs have mean lifetime μ0=1000\mu_0 = 1000 hours. An engineer suspects a new manufacturing defect has reduced mean lifetime, so she tests

H0:μ=1000vs.H1:μ<1000.H_0: \mu = 1000 \quad \text{vs.} \quad H_1: \mu < 1000.

Lifetimes are modeled as Xi∼N(μ,σ2)X_i \sim N(\mu, \sigma^2) with known σ=84\sigma = 84 hours (from long production history). She samples n=49n = 49 bulbs and observes sample mean xˉ=976.4\bar{x} = 976.4 hours. The natural test statistic is

Z=Xˉ−μ0σ/n.Z = \frac{\bar{X} - \mu_0}{\sigma/\sqrt{n}}.

Under H0H_0, Z∼N(0,1)Z \sim N(0,1) exactly (since XiX_i are normal with known variance). Small (very negative) ZZ is evidence against H0H_0 in favor of μ<1000\mu < 1000, so this is a left-tailed test; the p-value is P(Z≤zobs)P(Z \le z_{\mathrm{obs}}). Compute:

zobs=976.4−100084/49=−23.684/7=−23.612=−1.96‾.z_{\mathrm{obs}} = \frac{976.4 - 1000}{84/\sqrt{49}} = \frac{-23.6}{84/7} = \frac{-23.6}{12} = -1.9\overline{6}.

So zobs≈−1.9667z_{\mathrm{obs}} \approx -1.9667. The p-value is

p=Φ(−1.9667),p = \Phi(-1.9667),

where Φ\Phi is the standard normal CDF. From standard normal tables, Φ(−1.96)=0.0250\Phi(-1.96) = 0.0250 and Φ(−1.97)≈0.0244\Phi(-1.97) \approx 0.0244; interpolating at −1.9667-1.9667 gives

p≈0.0250−0.67×(0.0250−0.0244)≈0.0246.p \approx 0.0250 - 0.67 \times (0.0250-0.0244) \approx 0.0246.

So p≈0.0246p \approx 0.0246.

Interpretation. If the true mean lifetime were exactly 10001000 hours, a sample mean at least as far below 10001000 as 976.4976.4 (using this exact nn and σ\sigma) would occur with probability about 2.46%2.46\%. At a pre-declared significance level α=0.05\alpha = 0.05, since 0.0246≤0.050.0246 \le 0.05, the engineer rejects H0H_0 and concludes the data are statistically significant evidence of reduced lifetime. Note what this does not say: it does not say there is a 2.46%2.46\% chance the true mean is 10001000, and it does not by itself say the reduction (23.6 hours, about 2.4%2.4\% of nominal life) is of practical importance — that depends on engineering tolerances, a separate judgment from the p-value.

Example 2 — two-sided test with a discrete statistic, illustrating conservativeness. A quality-control officer wants to test whether a packing machine mislabels boxes at a rate different from the historical baseline of π0=0.10\pi_0 = 0.10. She inspects n=20n = 20 boxes and finds k=1k = 1 mislabeled box. Model K∼Binomial(20,π)K \sim \mathrm{Binomial}(20, \pi), testing

H0:π=0.10vs.H1:π≠0.10.H_0: \pi = 0.10 \quad \text{vs.} \quad H_1: \pi \ne 0.10.

This is a two-sided test with a discrete statistic, so a common convention (not the only one) defines the p-value via the exact test: sum the probabilities of all outcomes k′k' that are at least as extreme as the observed k=1k=1, where "extreme" is measured by having binomial probability under H0H_0 no larger than P(K=1)P(K=1). First compute the null pmf at relevant points, π0=0.10\pi_0 = 0.10, n=20n=20:

P(K=k)=(20k)(0.1)k(0.9)20−k.P(K=k) = \binom{20}{k}(0.1)^k(0.9)^{20-k}.
  • P(K=0)=(0.9)20P(K=0) = (0.9)^{20}. Compute (0.9)20(0.9)^{20}: (0.9)10≈0.348678(0.9)^{10} \approx 0.348678, so (0.9)20≈0.3486782≈0.121577(0.9)^{20} \approx 0.348678^2 \approx 0.121577.
  • P(K=1)=20(0.1)(0.9)19=2(0.9)19P(K=1) = 20 (0.1)(0.9)^{19} = 2 (0.9)^{19}. Since (0.9)19=(0.9)20/0.9≈0.121577/0.9≈0.135086(0.9)^{19} = (0.9)^{20}/0.9 \approx 0.121577/0.9 \approx 0.135086, we get P(K=1)≈2×0.135086=0.270171P(K=1) \approx 2 \times 0.135086 = 0.270171...

Wait — recompute carefully: 20×0.1=220 \times 0.1 = 2, and this multiplies (0.9)19(0.9)^{19}, so P(K=1)=2×0.135086=0.270171P(K=1) = 2 \times 0.135086 = 0.270171.

  • P(K=2)=(202)(0.1)2(0.9)18=190×0.01×(0.9)18P(K=2) = \binom{20}{2}(0.1)^2(0.9)^{18} = 190 \times 0.01 \times (0.9)^{18}. (0.9)18=(0.9)19/0.9≈0.135086/0.9≈0.150096(0.9)^{18} = (0.9)^{19}/0.9 \approx 0.135086/0.9 \approx 0.150096. So P(K=2)≈190×0.01×0.150096=1.9×0.150096≈0.285182P(K=2) \approx 190 \times 0.01 \times 0.150096 = 1.9 \times 0.150096 \approx 0.285182.

We need all k′k' with P(K=k′)≤P(K=1)≈0.270171P(K=k') \le P(K=1) \approx 0.270171. Check both tails: Lower tail: P(K=0)≈0.121577≤0.270171P(K=0) \approx 0.121577 \le 0.270171. Yes, include k′=0k'=0. P(K=1)=0.270171P(K=1) = 0.270171 itself, included (equal). There is no k′<0k' < 0. Upper tail: we need k′≥2k' \ge 2 with P(K=k′)≤0.270171P(K=k') \le 0.270171. We found P(K=2)≈0.285182>0.270171P(K=2) \approx 0.285182 > 0.270171, so k′=2k'=2 is excluded (it is actually more probable than the observed value, hence not "as extreme"). Check P(K=3)P(K=3):

P(K=3)=(203)(0.1)3(0.9)17=1140×0.001×(0.9)17.P(K=3) = \binom{20}{3}(0.1)^3(0.9)^{17} = 1140 \times 0.001 \times (0.9)^{17}.

(0.9)17=(0.9)18/0.9≈0.150096/0.9≈0.166773(0.9)^{17} = (0.9)^{18}/0.9 \approx 0.150096/0.9 \approx 0.166773. So P(K=3)≈1.14×0.166773≈0.190121≤0.270171P(K=3) \approx 1.14 \times 0.166773 \approx 0.190121 \le 0.270171. Include k′=3k'=3. Since P(K)P(K) is unimodal (increasing then decreasing near the mode nπ0=2n\pi_0 = 2), and P(K=2)>P(K=1)P(K=2) > P(K=1) while P(K=3)<P(K=1)P(K=3) < P(K=1), all k′≥3k' \ge 3 automatically have P(K=k′)<P(K=3)<P(K=1)P(K=k') < P(K=3) < P(K=1) in the decreasing tail (binomial tail probabilities decrease monotonically past the mode for π0\pi_0 fixed and k′k' large — this can be checked via the ratio P(K=k′+1)/P(K=k′)=n−k′k′+1⋅π01−π0P(K=k'+1)/P(K=k') = \frac{n-k'}{k'+1}\cdot\frac{\pi_0}{1-\pi_0}, which is less than 11 once k′k' exceeds the mode, confirming monotone decrease), so every k′≥3k' \ge 3 qualifies as "at least as extreme." The p-value is

p=P(K=0)+P(K=1)+P(K≥3)=P(K=0)+P(K=1)+(1−∑k′=02P(K=k′)).p = P(K=0) + P(K=1) + P(K \ge 3) = P(K=0)+P(K=1) + \left(1 - \sum_{k'=0}^{2}P(K=k')\right).

We have ∑k′=02P(K=k′)≈0.121577+0.270171+0.285182=0.676930\sum_{k'=0}^2 P(K=k') \approx 0.121577+0.270171+0.285182 = 0.676930, so P(K≥3)≈1−0.676930=0.323070P(K\ge 3) \approx 1-0.676930 = 0.323070. Therefore

p≈0.121577+0.270171+0.323070=0.714818.p \approx 0.121577+0.270171+0.323070 = 0.714818.

Interpretation. With p≈0.715p \approx 0.715, the data (1 mislabeled box out of 20) are entirely consistent with the baseline rate π0=0.10\pi_0=0.10; there is no evidence to reject H0H_0 at any conventional level. This example also illustrates the conservativeness built into exact discrete tests: because the pmf is discrete, the achievable p-values form a finite set, and the actual Type I error rate of the "reject if p≤αp \le \alpha" rule can be strictly less than α\alpha (the CDF has jumps, so the continuity hypothesis of the Uniform theorem fails, and only the inequality Pθ0(reject)≤αP_{\theta_0}(\text{reject}) \le \alpha from discreteness is guaranteed, not equality).

Counterexamplewhy continuity of the null distribution is needed

Consider a single Bernoulli trial as the entire "data set": X∼Bernoulli(θ)X \sim \mathrm{Bernoulli}(\theta), and test

H0:θ=0.5vs.H1:θ≠0.5,H_0: \theta = 0.5 \quad \text{vs.} \quad H_1: \theta \ne 0.5,

using the (trivial) test statistic T=XT = X itself, with T=1T=1 deemed the more extreme value (arbitrarily chosen orientation for this illustration) and p-value defined by p(x)=P0.5(T≥T(x))p(x) = P_{0.5}(T \ge T(x)). The null distribution of TT is discrete: P(T=0)=P(T=1)=0.5P(T=0) = P(T=1) = 0.5. Compute the p-value function:

p(0)=P(T≥0)=1,p(1)=P(T≥1)=0.5.p(0) = P(T \ge 0) = 1, \qquad p(1) = P(T \ge 1) = 0.5.

So the p-value, as a random variable under H0H_0, takes only the two values {0.5,1}\{0.5, 1\}, each with probability 0.50.5. This is not Uniform(0,1)\mathrm{Uniform}(0,1) — it is a two-point distribution. Consequently, for a significance level such as α=0.3\alpha = 0.3,

PH0(P≤0.3)=0,P_{H_0}(P \le 0.3) = 0,

not 0.30.3 as the (false, mis-applied) uniformity theorem would suggest. The test never rejects at level 0.30.3, even though α=0.3\alpha=0.3 was meant to guarantee a 30%30\% false-rejection rate. The theorem's conclusion fails precisely because its hypothesis — continuity of F0F_0 — fails: F0F_0 here has jumps of size 0.50.5 at each of the two support points, so the probability integral transform argument in the proof breaks down at Step 1 (the set where F0(T)≤uF_0(T)\le u fails to equal {T≤q(u)}\{T \le q(u)\} up to a null set — here the "exceptional set" has probability 0.50.5, not zero). This is exactly why exact tests on discrete data (as in Worked Example 2) are described as conservative: the true Type I error rate is at most α\alpha, generally strictly less.

Scope, edge cases & common traps

SituationWhat is trueWhat is false
Continuous test statistic, simple nullP∼Uniform(0,1)P \sim \mathrm{Uniform}(0,1) under H0H_0; Type I error =α=\alpha exactly—
Discrete test statisticPθ0(P≤α)≤αP_{\theta_0}(P\le\alpha) \le \alpha (conservative)P∼Uniform(0,1)P \sim \mathrm{Uniform}(0,1) exactly
Composite null Θ0\Theta_0Sup-based p-value gives Pθ(reject)≤αP_\theta(\text{reject}) \le \alpha for all θ∈Θ0\theta \in \Theta_0Type I error exactly α\alpha for every θ∈Θ0\theta \in \Theta_0
Interpretation of small ppData unlikely under H0H_0H0H_0 unlikely given data; P(H0∣data)=pP(H_0\mid\text{data}) = p
Interpretation of large ppData consistent with H0H_0; no evidence to rejectH0H_0 is true; H0H_0 is "proved"
Effect sizep-value is confounded with sample sizeSmall pp implies a large or important effect
Multiple testingRunning many tests inflates the family-wise false rejection rateA single test's α\alpha still controls the family-wise rate
Optimal stopping / data peekingRepeatedly testing as data accrue and stopping at first p≤αp\le\alpha inflates true Type I errorThe nominal α\alpha still applies after optional stopping

Numerical illustration of the inversion fallacy. Suppose a screening test for a rare biomarker anomaly is run on many independent gene locations, each with prior probability π=P(H0 false, i.e. real effect)=0.01\pi = P(H_0 \text{ false, i.e. real effect}) = 0.01 (only 1%1\% of tested loci harbor a true effect). Suppose tests with a real effect yield p≤0.05p\le 0.05 with probability (power) 0.60.6, while tests with no effect yield p≤0.05p \le 0.05 with probability exactly 0.050.05 (by the Uniform theorem, since α=0.05\alpha=0.05). Among 10,00010{,}000 loci tested, expected counts:

  • True effects: 100100 loci; of these, 6060 show p≤0.05p\le 0.05.
  • No effect: 9,9009{,}900 loci; of these, 9900×0.05=4959900\times 0.05 = 495 show p≤0.05p\le 0.05 purely by chance.

Among all 60+495=55560+495 = 555 loci with p≤0.05p\le 0.05, only 6060 actually have a real effect:

P(real effect∣p≤0.05)=60555≈0.108.P(\text{real effect} \mid p \le 0.05) = \frac{60}{555} \approx 0.108.

So even though each individual test controls Type I error at 5%5\%, roughly 89%89\% of the "significant" findings in this rare-effect regime are false positives — the p-value threshold alone says nothing about this ratio without the prior π\pi and the power.

The mathematician behind it

Origins · 1 minRonald Aylmer Fisher and how this was discovered
RA
Ronald Aylmer Fisher
1890–1962 · Statistics and genetics, Rothamsted Experimental Station and University College London

Fisher introduced significance testing and the p-value as a working tool for agricultural experimentation, formalizing it in Statistical Methods for Research Workers (1925). He conceived the p-value as an informal measure of the "strength of evidence" against a null hypothesis in a single experiment, deliberately resisting a fixed universal threshold — his famous suggestion of 0.050.05 was offered as a convenient convention, not a universal law of nature. Fisher's approach differed philosophically from the later Neyman–Pearson framework, which fixed α\alpha in advance as part of a decision rule with explicit control of both Type I and Type II error rates; much of the modern confusion around p-values stems from a hybrid of these two frameworks that neither Fisher nor Neyman–Pearson fully endorsed.

History
- 1925 — Fisher's Statistical Methods for Research Workers introduces significance testing and popularizes the p-value in applied science.
- 1928 — Jerzy Neyman and Egon Pearson begin developing a decision-theoretic alternative distinguishing Type I and Type II errors.
- 1933 — The Neyman–Pearson lemma establishes optimality of likelihood-ratio tests for simple hypotheses, formalizing fixed-α\alpha testing.
- 1955–1960s — Widespread adoption of α=0.05\alpha = 0.05 as a default threshold across experimental psychology and biomedical research.
- 2016 — The American Statistical Association issues a formal statement warning against common misuses and misinterpretations of p-values.
Is a p-value the probability that the null hypothesis is true?

No. The p-value is P(statistic as extreme as observed∣H0)P(\text{statistic as extreme as observed}\mid H_0), a probability about hypothetical data assuming H0H_0, not a probability about H0H_0 itself given the data. The probability that H0H_0 is true given the data, P(H0∣data)P(H_0\mid\text{data}), requires Bayes' theorem, a prior probability for H0H_0, and a model for the alternative — none of which the p-value alone supplies. As the rare-effect screening example shows, these two quantities can differ by an order of magnitude or more. Treating them as interchangeable is called the "inversion fallacy" and is the most common misreading of significance testing in applied literature.

Why is 0.05 the standard significance threshold, and is it mandatory?

Fisher suggested 0.050.05 as a convenient, round convention in agricultural experiments in the 1920s, not as a universal law. It became entrenched through decades of textbook repetition and journal convention, but it carries no special mathematical status — any α∈(0,1)\alpha \in (0,1) is a valid, internally consistent choice, and different fields use different defaults (particle physics effectively requires α\alpha near 3×10−73\times10^{-7}, "5-sigma"). The threshold should reflect the relative costs of Type I versus Type II errors in context; a lower threshold is appropriate when false positives are especially costly or when many comparisons are made simultaneously.

Does a large p-value prove the null hypothesis is true?

No. A large p-value only shows that the observed data are not unusual under H0H_0; it never establishes that H0H_0 is correct, since many other hypotheses (including some quite different from H0H_0) could make the same data equally unsurprising. Absence of evidence against H0H_0 is not evidence for H0H_0. Formal statements of "no meaningful effect" require different tools, such as equivalence testing or confidence-interval-based arguments that explicitly bound the plausible effect sizes, rather than a bare non-significant p-value.

Why does repeatedly testing data as it arrives ("peeking") invalidate the significance level?

The Uniform(0,1) theorem for the p-value assumes a single, fixed test applied to data collected according to a pre-specified design. If an experimenter checks the p-value after every new observation and stops as soon as p≤αp \le \alpha, the actual probability of eventually stopping under H0H_0 can be much larger than α\alpha — in some idealized continuous-time models it approaches 11 almost surely (a phenomenon related to the law of the iterated logarithm and optional stopping for martingales). Valid sequential analysis requires specialized designs (e.g., sequential probability ratio tests, alpha-spending functions) that explicitly control the cumulative false-positive rate across all possible stopping times.

What is the difference between a p-value and a significance level?

The significance level α\alpha is a threshold chosen before the experiment as part of the decision rule; it represents the long-run Type I error rate the experimenter is willing to tolerate across repeated hypothetical experiments. The p-value is a number computed after observing the data, summarizing how extreme the specific observed statistic is relative to the null distribution. The decision rule "reject H0H_0 if p≤αp \le \alpha" ties them together, but they answer different questions: α\alpha is a property of the procedure, while pp is a property of this particular data set relative to that procedure.

Can a p-value be exactly zero?

In principle, for continuous test statistics with unbounded support, the p-value is a continuous random variable strictly between 00 and 11 (with probability one under H0H_0), so it is never exactly zero in the idealized continuous model. In practice, computed p-values are often reported as "p<10−6p < 10^{-6}" or similar because of the limits of numerical precision or extreme tail approximations, but the underlying mathematical object is a genuine probability in (0,1)(0,1), never identically zero for a nondegenerate continuous null distribution.

How does the p-value relate to the confidence interval?

For a level-α\alpha two-sided test of H0:θ=θ0H_0:\theta=\theta_0 built by inverting a pivotal quantity, H0H_0 is rejected at level α\alpha exactly when θ0\theta_0 falls outside the corresponding (1−α)(1-\alpha) confidence interval for θ\theta. This duality means a confidence interval simultaneously reports, for every candidate θ0\theta_0, whether the associated test would reject it — giving a richer picture (a whole range of plausible parameter values with a coherent error-rate guarantee) than a single p-value against one fixed null value. Many statisticians recommend reporting confidence intervals alongside or instead of bare p-values for exactly this reason.

Before this

Where this leads