P-value

By Jude Wallis · Published

A p-value is the probability, computed assuming the null hypothesis is true, of getting a result at least as extreme as the one you observed.

A p-value is a conditional probability computed while the null hypothesis is taken as true. Written out, it is P(a result at least as extreme as the observed oneH0 is true)P(\text{a result at least as extreme as the observed one} \mid H_0 \text{ is true}), where extreme means in whichever direction the alternative hypothesis points.

Suppose you flip a coin 100 times, get 60 heads, and test H0:p=0.5H_0: p = 0.5 against Ha:p0.5H_a: p \ne 0.5. Under the null, p^\hat{p} (p hat) is centered at 0.5 with standard deviation 0.05, so the observed p^=0.60\hat{p} = 0.60 sits z=0.600.500.05=2.00z = \frac{0.60 - 0.50}{0.05} = 2.00 standard deviations out. Under the normal model the z-test uses, the two-sided p-value is 0.0455. Said aloud: if the coin really were fair, that model puts about 4.6 percent of samples of 100 flips at least 0.10 away from 0.5 in one direction or the other. Against the one-sided Ha:p>0.5H_a: p > 0.5 the same model gives 0.0228, half as much, because only the upper tail counts.

Two readings of that 0.0455 are wrong and both are everywhere. It is not the probability that the coin is fair, and it is not the probability that the result happened by chance. Both of those are claims about the hypothesis, while the p-value is a claim about the data that takes the hypothesis as given. The conditioning runs one way only, and reversing it is the single most repeated error in applied statistics.

A large p-value is not evidence for H0H_0 either. It means the data would not be surprising if H0H_0 were true, which is a much weaker statement than H0H_0 being true. Small samples have little power to detect anything, so a large p-value from one may mean only that the test could not have found an effect of ordinary size, which is why a p-value of 0.4 from 12 observations tells you very little.

The decision comes from comparing the p-value against a significance level α\alpha (alpha) fixed before the data are seen: reject H0H_0 when the p-value is at or below α\alpha, and fail to reject it otherwise. The p-value itself is a measure of evidence on a continuous scale, so 0.049 and 0.051 carry nearly identical information despite falling on opposite sides of the usual cutoff.

Where this comes up

61 pages on the site use this term.

More hypothesis testing terms, or browse the full statistics glossary.