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 , and choose a test statistic sensitive to departures from . Then we ask how extreme the observed statistic is relative to what predicts. The p-value formalizes "how extreme" as a probability computed under . 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 . It does not say 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 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.
- A p-value is , a probability computed assuming the null.
- Under , if the test statistic has a continuous distribution, the p-value is exactly — this is a theorem, not a convention.
- Significance level is a pre-chosen threshold; rejecting whenever controls the Type I error rate at exactly (for continuous statistics).
- A p-value is not , not the probability 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 .
- 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 , 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 (), 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?
Let be data with distribution depending on a parameter . Consider testing
using a test statistic such that larger values of constitute stronger evidence against (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 with observed statistic is
When is a single point (a simple null), this reduces to
A significance level (or size) is a number fixed in advance. The associated test rejects if and only if , equivalently if where is the -quantile of 's null distribution. A result is called statistically significant at level if 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 . 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 says: "if were exactly true and I repeated this experiment many times, only about 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 — a fact demonstrated numerically below. A second useful picture: significance level 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 as a statement about this one data set — is the second classic trap.
Let be a test statistic whose cumulative distribution function under the simple null is continuous (no jumps). Define the p-value as
Then, if (i.e. is true), the random variable satisfies
Consequently, for any , the test "reject iff " has Type I error probability exactly :
We use the probability integral transform, a direct computation with the definition of CDF.
Step 1: is a valid CDF and is Uniform(0,1). Since is continuous and non-decreasing with , , for any define the quantile
By continuity of , exactly (the infimum is attained on the boundary of the level set because has no jumps, so it cannot "jump over" ). We claim
Indeed, if then by monotonicity. Conversely if , monotonicity and the definition of as an infimum give except possibly on a set where is locally flat; continuity of ensures this exceptional set has -probability zero (flat regions of correspond to -values with zero density). Hence, for all ,
This is precisely the CDF of the distribution evaluated at , so .
Step 2: transfer to . Since , and is a measure-preserving bijection of onto itself (it maps Lebesgue measure to Lebesgue measure, as one checks directly: for any interval , ), we conclude
Step 3: Type I error computation. By Step 2, for any ,
directly from the CDF of the uniform distribution, . Since the test rejects exactly when , its Type I error probability is exactly .
∎If is composite (not a single point) and the p-value is defined as , then for every and every ,
Fix . By definition of the supremum,
So whenever the true parameter is , the realized p-value (as a function of the random data) satisfies pointwise, where denotes the p-value computed as if were the true simple null. By the simple-null case applied at the true (continuity of 's distribution under assumed), , so
The middle inequality holds because implies .
∎Worked examples
Example 1 — one-sided z-test with asymmetric numbers. A factory claims its light bulbs have mean lifetime hours. An engineer suspects a new manufacturing defect has reduced mean lifetime, so she tests
Lifetimes are modeled as with known hours (from long production history). She samples bulbs and observes sample mean hours. The natural test statistic is
Under , exactly (since are normal with known variance). Small (very negative) is evidence against in favor of , so this is a left-tailed test; the p-value is . Compute:
So . The p-value is
where is the standard normal CDF. From standard normal tables, and ; interpolating at gives
So .
Interpretation. If the true mean lifetime were exactly hours, a sample mean at least as far below as (using this exact and ) would occur with probability about . At a pre-declared significance level , since , the engineer rejects and concludes the data are statistically significant evidence of reduced lifetime. Note what this does not say: it does not say there is a chance the true mean is , and it does not by itself say the reduction (23.6 hours, about 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 . She inspects boxes and finds mislabeled box. Model , testing
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 that are at least as extreme as the observed , where "extreme" is measured by having binomial probability under no larger than . First compute the null pmf at relevant points, , :
- . Compute : , so .
- . Since , we get ...
Wait — recompute carefully: , and this multiplies , so .
- . . So .
We need all with . Check both tails: Lower tail: . Yes, include . itself, included (equal). There is no . Upper tail: we need with . We found , so is excluded (it is actually more probable than the observed value, hence not "as extreme"). Check :
. So . Include . Since is unimodal (increasing then decreasing near the mode ), and while , all automatically have in the decreasing tail (binomial tail probabilities decrease monotonically past the mode for fixed and large — this can be checked via the ratio , which is less than once exceeds the mode, confirming monotone decrease), so every qualifies as "at least as extreme." The p-value is
We have , so . Therefore
Interpretation. With , the data (1 mislabeled box out of 20) are entirely consistent with the baseline rate ; there is no evidence to reject 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 " rule can be strictly less than (the CDF has jumps, so the continuity hypothesis of the Uniform theorem fails, and only the inequality from discreteness is guaranteed, not equality).
Consider a single Bernoulli trial as the entire "data set": , and test
using the (trivial) test statistic itself, with deemed the more extreme value (arbitrarily chosen orientation for this illustration) and p-value defined by . The null distribution of is discrete: . Compute the p-value function:
So the p-value, as a random variable under , takes only the two values , each with probability . This is not — it is a two-point distribution. Consequently, for a significance level such as ,
not as the (false, mis-applied) uniformity theorem would suggest. The test never rejects at level , even though was meant to guarantee a false-rejection rate. The theorem's conclusion fails precisely because its hypothesis — continuity of — fails: here has jumps of size at each of the two support points, so the probability integral transform argument in the proof breaks down at Step 1 (the set where fails to equal up to a null set — here the "exceptional set" has probability , 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 , generally strictly less.
Scope, edge cases & common traps
| Situation | What is true | What is false |
|---|---|---|
| Continuous test statistic, simple null | under ; Type I error exactly | — |
| Discrete test statistic | (conservative) | exactly |
| Composite null | Sup-based p-value gives for all | Type I error exactly for every |
| Interpretation of small | Data unlikely under | unlikely given data; |
| Interpretation of large | Data consistent with ; no evidence to reject | is true; is "proved" |
| Effect size | p-value is confounded with sample size | Small implies a large or important effect |
| Multiple testing | Running many tests inflates the family-wise false rejection rate | A single test's still controls the family-wise rate |
| Optimal stopping / data peeking | Repeatedly testing as data accrue and stopping at first inflates true Type I error | The nominal 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 (only of tested loci harbor a true effect). Suppose tests with a real effect yield with probability (power) , while tests with no effect yield with probability exactly (by the Uniform theorem, since ). Among loci tested, expected counts:
- True effects: loci; of these, show .
- No effect: loci; of these, show purely by chance.
Among all loci with , only actually have a real effect:
So even though each individual test controls Type I error at , roughly 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 and the power.
The mathematician behind it
Origins · 1 minRonald Aylmer Fisher and how this was discovered
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 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 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.
Is a p-value the probability that the null hypothesis is true?
No. The p-value is , a probability about hypothetical data assuming , not a probability about itself given the data. The probability that is true given the data, , requires Bayes' theorem, a prior probability for , 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 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 is a valid, internally consistent choice, and different fields use different defaults (particle physics effectively requires near , "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 ; it never establishes that is correct, since many other hypotheses (including some quite different from ) could make the same data equally unsurprising. Absence of evidence against is not evidence for . 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 , the actual probability of eventually stopping under can be much larger than — in some idealized continuous-time models it approaches 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 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 if " ties them together, but they answer different questions: is a property of the procedure, while 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 and (with probability one under ), so it is never exactly zero in the idealized continuous model. In practice, computed p-values are often reported as "" or similar because of the limits of numerical precision or extreme tail approximations, but the underlying mathematical object is a genuine probability in , never identically zero for a nondegenerate continuous null distribution.
How does the p-value relate to the confidence interval?
For a level- two-sided test of built by inverting a pivotal quantity, is rejected at level exactly when falls outside the corresponding confidence interval for . This duality means a confidence interval simultaneously reports, for every candidate , 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.