Definitionintro
P-value
Also called observed significance level.
The probability, under the null hypothesis, of a test statistic at least as extreme as the one observed. Rejecting when it is at most alpha gives a level-alpha test.
The p-value of a statistical hypothesis test is the probability, computed under the null hypothesis , of a test statistic at least as extreme as the one observed. Small values mean that the data would be unusual if were true. It is valid in a precise sense: under , the probability that it is at most is at most , so the rule "reject when " has level for every at once. It is uniform on under a simple null with a continuous statistic and stochastically larger than uniform for a discrete one. It is not the probability that is true.
Definition
Let be a test statistic whose large values are evidence against , and let be its observed value. The p-value is
For a simple null this is . For a two-sided test with a statistic whose null law is symmetric about 0, it is , twice the one-sided tail. For an asymmetric discrete null law there are several two-sided rules (doubling the smaller tail, or summing the probabilities of outcomes no more likely than the observed one), and they can differ.
Validity. For every and every , .
Proof. Fix and let , which is non-increasing in . Since , it suffices to show . The set is an interval going to with left end . If it contains , then , whose probability is . If not, then , whose probability is .
Uniform when continuous. If and has a continuous distribution under , then is continuous and for all : the p-value is exactly uniform on , and the test "reject when " has size exactly . If is discrete, takes finitely or countably many values and for most : the p-value is stochastically larger than uniform, and the test is conservative.
Monte Carlo p-value. If the null law of cannot be computed but can be sampled, draw independently from it and use
Under a simple null, are exchangeable values, so the rank of among them is uniform (with ties broken against rejection) and exactly, for every . The version without the two 1s can be 0 and is not valid.
Examples and non-examples
A continuous statistic. Nine packs from a machine set to 500 g, with known g, have mean g, so the z-test statistic is . The two-sided p-value is and the one-sided p-value for is 0.018610.
A discrete statistic. With under and , the p-value takes the values 0.3770, 0.1719, 0.0547, 0.0107 and 0.000977 at (exact sums). So , far below 0.05: the test "reject when " has size 0.0107. The exact binomial test has this property at every .
The p-value mixes the effect and the sample size. A one-sample z-test of a mean shifted by with gives and ; a shift of with gives and . For a two-sample t-test with the same sample effect size and per group (so with degrees of freedom), the two-sided p-value is 0.511 at , 0.137 at , 0.0029 at and at .
Non-example: the probability that is true. is computed assuming ; it is , not . The second needs a prior probability for and is a Bayesian quantity; with a Bayes factor the two can disagree sharply, most of all at large (Lindley's paradox).
Non-example: the type I error rate. The level of the rule is fixed before the data. Reporting ", so the error rate is 0.3%" mixes a property of the data with a property of the procedure.
Non-example: evidence for the null. does not show that is true: with low power, a real effect gives large p-values most of the time. "Not significant" is not "no effect".
The ASA statement of 2016 (Wasserstein and Lazar) puts two of these points as principles: "A p-value, or statistical significance, does not measure the size of an effect or the importance of a result", and "By itself, a p-value does not provide a good measure of evidence regarding a model or hypothesis."
Related definitions
- Significance level. The threshold fixed in advance; the test rejects when . The p-value is the smallest level at which the observed data would lead to rejection, hence the name observed significance level.
- Mid-p-value. For a discrete statistic, . It is closer to uniform on average but is not valid in the sense above.
- Adjusted p-values. In multiple testing, p-values modified so that comparing them with controls a family-wise error rate or a false discovery rate.
- E-variable. A nonnegative statistic with expectation at most 1 under . By Markov's inequality is a valid p-value, and e-variables can be multiplied across independent studies and monitored continuously.
- Combining p-values. For independent tests with continuous statistics, Fisher's method uses , which is chi-square with degrees of freedom under all the nulls.
References
- Ronald A. Fisher, Statistical Methods for Research Workers, Oliver and Boyd, 1925, online text of the first edition, Chapter III, section 12 (P as the probability of a deviation at least as large, and the 5% point)
- George Casella and Roger L. Berger, Statistical Inference, second edition, Duxbury, 2002, Section 8.3.4 (p-values, the definition of a valid p-value and the theorem that the tail probability is valid)
- Larry Wasserman, All of Statistics, Springer, 2004, Section 10.2 (p-values, their interpretation and their uniform distribution under the null)
- Ronald L. Wasserstein and Nicole A. Lazar, The ASA statement on p-values: context, process, and purpose, The American Statistician 70(2), 2016, pp. 129 to 133, The six principles on the use and interpretation of p-values
Where this leads
- Benjamini-Hochberg procedure
- Binomial test
- Bonferroni correction
- Pearson's chi-squared goodness-of-fit test
- Chi-squared test of independence
- Durbin-Watson test
- E-variable
- False discovery rate
- Fisher's method
- Fisher's exact test
- Genomic control
- Hardy-Weinberg exact test
- Kolmogorov-Smirnov test
- Kruskal-Wallis test
- Likelihood ratio test
- Lindley paradox
- Ljung-Box test
- Log-rank test
- Mann-Whitney U test
- McNemar's test
- Mixture sequential probability ratio test
- Multiple comparisons problem
- One-way analysis of variance
- Permutation test
- Post-selection inference
- Posterior predictive check
- Weight matrix score p-value
- F-test for nested linear models
- Score test
- Shapiro-Wilk test
- Sign test
- Student's t-test
- Duality of tests and confidence sets
- Wald test
- Wilcoxon signed-rank test
- Z-test
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag MZX1D5 Edit this page History Report an error Markdown