STEM-TutorLearn • Practice • ExcelBook Free DemoFree demo

P-values, explained with examples

A p-value measures how surprising your data would be if the null hypothesis were true. It is the number that decides most significance tests, and also one of the most misunderstood ideas in statistics.

On this page
  1. The definition
  2. The logic of a significance test
  3. Comparing with the significance level
  4. Worked examples
  5. What a p-value is not
  6. Statistical significance versus practical importance
  7. Why 0.05?
  8. Where p-values come from in practice
  9. Common mistakes
  10. Practice questions
  11. Frequently asked questions
  12. Key takeaways
  13. Related guides

The definition

A p-value is the probability, assuming the null hypothesis H0 is true, of getting a sample result at least as extreme as the one actually observed, in the direction of the alternative hypothesis.

Every part of that sentence matters. “Assuming H0 is true”: the calculation imagines a world where nothing unusual is going on. “At least as extreme”: we count the observed result and anything further from what H0 predicts. “In the direction of Ha”: a one-sided test looks in one tail; a two-sided test looks in both.

The logic of a significance test

Suppose a coin is claimed to be fair, and you get 64 heads in 100 flips. If the coin really were fair, how often would you see 64 or more heads? If that would happen only rarely, you have evidence that the coin is not fair. A small p-value says: “this result would be unusual if H0 were true”. So either something very unlikely happened, or H0 is wrong. A significance test takes the second option when the p-value is small enough.

-3-2-10123P(Z > 1)z (standard deviations from the mean)
The standard normal curve. Probabilities are areas under the curve; the shaded area is the probability of a value more than one standard deviation above the mean (about 0.16).

Comparing with the significance level

Before collecting data, choose a significance level α, usually 0.05. Then:

Never say “accept H0”. A large p-value means the data are consistent with H0, not that H0 has been proved true. The sample may simply have been too small to detect a real effect.

Worked examples

Example 1: a one-sided test for a proportion

A school claims 50% of students walk to school. A researcher suspects it is more. In a random sample of 100 students, 58 walk. Find the p-value.

Example 2: the decision

Using α = 0.05, what should the researcher conclude?

Example 3: a two-sided test

If the researcher had tested Ha: p ≠ 0.5 with the same data, what would the p-value be?

Example 4: interpreting a p-value in context

A test of whether a new diet lowers cholesterol gives a p-value of 0.012. Interpret it.

Example 5: a p-value from a t-test

A random sample of 25 bags of crisps has mean mass 31.0 g and standard deviation 2.0 g. Test whether the mean is more than the stated 30 g.

What a p-value is not

Statistical significance versus practical importance

With a large enough sample, even a trivial difference becomes statistically significant. A medicine might lower blood pressure by 0.5 points with p = 0.001: real, but not useful. That is why a confidence interval, which shows the size of the effect, is a valuable companion to a p-value. Always ask both questions: is there evidence of an effect, and is the effect large enough to matter?

Why 0.05?

The 5% level is a convention, not a law of nature. It balances the risk of a false alarm against the risk of missing a real effect. In medicine or engineering, where a false alarm could be costly, researchers often use 0.01. In early exploratory work, 0.10 is sometimes used. The key rule is to choose α before seeing the data.

Where p-values come from in practice

On the AP exam you find p-values with a calculator, a table, or computer output. Every test follows the same pattern: state the hypotheses, check conditions, calculate a test statistic (z, t or χ²), find the p-value from the matching distribution, compare with α, and conclude in context.

Common mistakes

Practice questions

Try each one before opening the answer.

Q1. A test gives p = 0.003 with α = 0.01. What is the decision?

Show answer
0.003 < 0.01, so reject H0.

Q2. A test gives p = 0.21. Does this prove H0 is true?

Show answer
No. There is just not convincing evidence against it.

Q3. A one-sided test has z = 2.0. Find the p-value.

Show answer
P(Z ≥ 2) ≈ 0.0228.

Q4. The same z for a two-sided test?

Show answer
≈ 0.0455.

Frequently asked questions

Are p-values on the AP Statistics exam?

Yes. They appear in every significance test in Units 6 to 9, and interpreting a p-value in context is a frequent free-response task.

Are p-values in A level Maths?

A level Maths hypothesis tests often compare a probability with the significance level, which is a p-value approach, though some boards use critical regions instead.

Key takeaways