p-Values and the z-Test for a Mean
The p-value answers one question: if were true, how often would you see a result at least as extreme as yours? If the answer is "hardly ever" (less than ), either you got very lucky or is wrong, and we bet on the second.
What the symbols mean
- Test statistic
How many standard errors the sample mean is from the claimed value.
- Hypothesized mean
The value under the null hypothesis.
- Standard error
The standard deviation of x̄ if H₀ is true.
Explanation
A p-value is simply a surprise score: the chance of getting data at least as extreme as yours if the null hypothesis were true. The "p" just stands for probability. Small means surprising, and surprising means the null looks doubtful. The test statistic is the same z-score you've been using: (how far your sample mean landed from the claimed value) divided by (the standard error, how far sample means typically wander). So just says "how many standard errors off are we?"
Where the z comes from. From the central limit theorem, if is true then is roughly normal around with standard error . Standardizing turns that into the standard normal, so the p-value is just a tail area you can look up, like any normal probability.
The procedure:
- State and , and choose .
- Compute the test statistic.
- Find the p-value: the tail area beyond the statistic (both tails for a two-tailed test).
- Reject if ; otherwise fail to reject.
- State the conclusion in context.
Two-tailed p-values double the tail: . A two-tailed test is looking for a difference in either direction, so a result just as far off on the other side would have counted as evidence too.
Statistical vs practical significance. With huge samples, tiny unimportant differences become "significant." Always ask how big the effect is, not just whether it exists.
A common mistake. It's tempting to read as "a 3% chance that is true." It isn't that. The p-value is computed assuming is true, so it can't also be the probability of . It's the chance of data this extreme if holds.
See it
Worked examples
Claim: , with . A sample of 64 has . Test at .
- 1
The standard error is , so : the sample mean is 2 standard errors above the claim.
Practice
Type your answer and check it. Solve them all to complete the lesson.
, , , . Find the test statistic.
Find the two-tailed p-value.
At , what is the decision?
At , what is the decision?
For a right-tailed test with , find the p-value.
A bottling line is supposed to fill 500 mL, with known mL. A sample of 25 bottles averages 498.2 mL. Find the test statistic for .
Find the two-tailed p-value for .
The hardest one here. Get it, and you've got this lesson.
Particle physicists announce a discovery only at "5 sigma": . The one-tailed p-value is about 1 in how many?
Where it's used
Scientific papers report p-values for nearly every claim; tech companies use them to decide whether a website change really moved a metric.