Understanding p-Values
What the null distribution is, how to find a p-value for one-sided and two-sided alternatives (from a normal model or a simulation), how to interpret a p-value in context, and what small and large p-values do and do not tell you.
A p-value answers one question: if the null hypothesis were true, how often would we see a result at least this extreme? A small answer means the data would be surprising under H₀, which is evidence for the alternative. A large answer means the data are ordinary under H₀, so there is no convincing evidence against it. A p-value is never the probability that H₀ is true.
1The null distribution
Assuming the null hypothesis is true, the test statistic has a probability distribution called the null distribution. Using it, the p-value is the probability of obtaining a test statistic as extreme as, or more extreme than, the one observed, in the direction of the alternative hypothesis, given that the null hypothesis is true.
School lunch
H₀: p = 0.60, Hₐ: p < 0.60, where p is the proportion of all students at a school who eat the school lunch. In a random sample of 150 students, 81 eat it. Find the p-value.
- 1\(\hat{p} = 81/150 = 0.54\).
- 2If H₀ is true, \(\hat{p}\) has mean 0.60 and standard deviation \(\sqrt{0.60(0.40)/150} = 0.04\).
- 3Test statistic: \(z = \dfrac{0.54 - 0.60}{0.04} = -1.5\).
- 4Hₐ uses “<”, so the p-value is the lower-tail area: \(P(z \le -1.5) \approx 0.0668\).
2Finding a p-value
| Alternative | p-value | Picture |
|---|---|---|
| \(H_a: p \gt p_0\) | \(P(z \ge \text{observed } z)\) | upper tail |
| \(H_a: p \lt p_0\) | \(P(z \le \text{observed } z)\) | lower tail |
| \(H_a: p \ne p_0\) | \(P(z \le -|z|) + P(z \ge |z|)\) | both tails, twice one tail |
Left-handed students
H₀: p = 0.10, Hₐ: p ≠ 0.10, for the proportion of all students at a school who are left-handed. In a random sample of 250 students, 34 are left-handed. Find the p-value.
- 1\(\hat{p} = 34/250 = 0.136\). Standard deviation if H₀ is true: \(\sqrt{0.10(0.90)/250} \approx 0.0190\).
- 2\(z = (0.136 - 0.10)/0.0190 \approx 1.90\).
- 3Two-sided: count both tails. \(P(z \ge 1.90) \approx 0.029\), so the p-value is about \(2(0.029) \approx 0.058\).
With \(H_a: p \ne p_0\), a result just as far below \(p_0\) would be just as extreme. The p-value counts both tails: 0.058 for the left-handed test, not 0.029.
The tail comes from the alternative, not from where the sample landed. With \(H_a: p \gt p_0\) and a sample below \(p_0\), the p-value is the upper-tail area, which is more than 0.5: the data point the wrong way.
3p-values from a simulation
If the null distribution has been simulated, the p-value is the proportion of simulated values as extreme or more extreme than the observed value: at or above it for “>”, at or below it for “<”, and beyond it on both sides for “≠”.
1,000 simulated samples
Figure 3 shows 1,000 simulated sample proportions from samples of 150 when p = 0.60. Estimate the p-value for the lunch test.
- 1Hₐ: p < 0.60, so count simulated values at or below the observed 0.54.
- 271 of the 1,000 simulated values are at or below 0.54.
4Interpreting a p-value
An interpretation of a p-value must say that it is computed by assuming the null hypothesis is true, with the null value in context. Then give the probability, the statistic and its observed value, the direction of the alternative, and the sample size.
School lunch
Interpret the p-value of 0.0668 from the lunch test.
- 1Start with the assumption: the true proportion is 0.60.
- 2Then the probability, the statistic, the observed value, the direction of Hₐ, and the sample size.
“Assuming that [H₀ in context], there is a [p-value] probability of getting a [statistic] of [observed value] or [more / less] in a random sample of [n] [units].”
The p-value is calculated assuming H₀ is true, so it cannot also be the chance that H₀ is true. Nor is it “the probability the results happened by chance.” It is the probability of data this extreme if H₀ were true.
5Small and large p-values
Small p-values mean the observed result would be unusual if the null hypothesis were true, so they provide evidence for the alternative hypothesis. The lower the p-value, the more convincing the evidence. p-values that are not small mean the result would not be unusual under H₀: they do not provide convincing evidence for the alternative, and they do not provide evidence that the null hypothesis is true either.
| p-value | Would the result be unusual if H₀ were true? | Evidence for Hₐ |
|---|---|---|
| 0.003 | Very unusual: about 3 in 1,000 | Strong |
| 0.0668 | Somewhat unusual: about 7 in 100 | Some, but may not be convincing |
| 0.40 | Not unusual at all | None convincing |
What it does not mean
Another school runs the same test and gets a p-value of 0.40. A student concludes, “So 60% of students really do eat the lunch.” Respond.
- 1A p-value of 0.40 means a result like that school’s would be quite ordinary if p were 0.60.
- 2That means the data do not provide convincing evidence for Hₐ.
- 3But not finding evidence against p = 0.60 is not evidence for it: many other values of p would also make the result ordinary.
A large p-value means the data are consistent with H₀, not that H₀ is correct. Lack of evidence for the alternative is not evidence for the null.