Introduction

Almost every statistics course, lab report and research paper ends up at the same number: the p-value. Software prints it in a second. Interpreting it correctly is much harder, and misreading it is one of the most common mistakes in student work and published research alike.

This guide explains what a p-value actually measures, walks through two complete examples, and shows how to report a result so that it is both correct and useful.

What a P-Value Is

Every hypothesis test starts with two competing statements:

You then summarise your data in a single test statistic (such as a t or z value) that measures how far the data are from what $H_0$ predicts.

Definition — P-value

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

A small p-value means your data would be surprising if $H_0$ were true. That surprise is evidence against $H_0$. A large p-value means the data are quite compatible with $H_0$ — which is not the same as proving it.

Intuition — The courtroom

The null hypothesis is "innocent until proven guilty". The p-value asks: if the defendant really were innocent, how likely is evidence this strong? If it is very unlikely, we reject innocence. If not, the verdict is "not guilty" — not "proven innocent".

Example 1 — A Suspicious Coin

A friend's coin lands heads 60 times in 100 flips. Is the coin biased, or could a fair coin do this by chance?

1
Testing whether a coin is fair
1

State the hypotheses. $H_0$: the probability of heads is $p = 0.5$. $H_1$: $p \neq 0.5$ (biased in either direction).

2

Ask what a fair coin would do. With 100 flips, a fair coin gives on average 50 heads, with a standard deviation of

$$\sqrt{np(1-p)} = \sqrt{100 \times 0.5 \times 0.5} = 5$$

So 60 heads is two standard deviations above what we expect: $z = (60 - 50)/5 = 2$.

3

Find the p-value. "At least as extreme" means 60 or more heads or 40 or fewer, because we care about bias in either direction. The exact binomial calculation gives

$$p = P(X \ge 60) + P(X \le 40) \approx 0.057$$

(The normal approximation with $z = 2$ gives about 0.046; with only 100 flips the exact binomial value is the one to trust.)

Interpretation

If the coin were fair, a result at least this lopsided would happen in about 5.7% of sets of 100 flips. That is unusual but not rare. At the common 5% significance level we would not reject $H_0$ — the data are suggestive, not conclusive. Flipping the coin more times would settle it.

One-Sided or Two-Sided?

In the coin example we counted extreme results in both directions. That is a two-sided test. If, before collecting any data, you had a genuine reason to care only about one direction (say, the coin was claimed to favour heads), a one-sided test counts only that tail. For 60 heads it gives $p \approx 0.028$ — roughly half the two-sided value.

Note — Choose the direction before you look

Switching to a one-sided test after seeing which way the data went, just to get under 0.05, is a form of p-hacking. Two-sided tests are the default in almost all research and in software, and that is the safe choice unless your study plan says otherwise.

Example 2 — Did Tutoring Help?

Twenty-five students write a test, take six weeks of tutoring, then write a comparable test. Their scores improve by an average of 4.2 points, with a standard deviation of 8 points. Is that improvement real, or could it be noise?

2
A paired (one-sample) t-test on the improvements
1

Hypotheses. $H_0$: the mean improvement is $\mu = 0$. $H_1$: $\mu \neq 0$. Because the same students are measured twice, we test the 25 differences.

2

Standard error and test statistic.

$$SE = \frac{s}{\sqrt{n}} = \frac{8}{\sqrt{25}} = 1.6, \qquad t = \frac{\bar{x} - 0}{SE} = \frac{4.2}{1.6} \approx 2.63$$
3

P-value and confidence interval. With $n - 1 = 24$ degrees of freedom, the two-sided p-value is about 0.015. The critical value $t_{0.975,\,24} \approx 2.064$ gives the 95% confidence interval

$$4.2 \pm 2.064 \times 1.6 \;\Rightarrow\; 0.9 \text{ to } 7.5 \text{ points}$$
Interpretation

If tutoring had no effect on average, an improvement this large would happen only about 1.5% of the time, so we reject $H_0$ at the 5% level. The confidence interval adds what the p-value cannot: the average gain is plausibly anywhere from about 1 to 7.5 points. (Without a comparison group we cannot say the gain was caused by tutoring rather than, say, practice with the test format — a design question, not a p-value question.)

Significance Levels and Errors

The significance level $\alpha$ is a threshold you fix in advance — most often 0.05. If $p \le \alpha$, the result is called statistically significant and you reject $H_0$. Two kinds of mistakes are possible:

$H_0$ is actually true$H_0$ is actually false
Reject $H_0$Type I error (false positive) — probability $\alpha$Correct
Don't reject $H_0$CorrectType II error (false negative) — probability $\beta$

Power, $1 - \beta$, is the chance of detecting an effect that really exists. It grows with sample size and with the size of the effect.

Watch out — Many tests, many false positives

Each test at $\alpha = 0.05$ carries a 5% false-positive risk when $H_0$ is true. Run 20 independent tests on pure noise and the chance that at least one comes out "significant" is $1 - 0.95^{20} \approx 64\%$. When you test many outcomes or groups, use a correction such as Bonferroni or Holm, or plan fewer, focused comparisons.

What a P-Value Is Not

These misreadings are so common that the American Statistical Association published a formal statement on p-values in 2016 to address them.

Myth 1 — "p = 0.015 means a 1.5% chance the null hypothesis is true"

No. The p-value is calculated assuming $H_0$ is true, so it cannot also be the probability that $H_0$ is true. It is the probability of the data (or more extreme), given $H_0$ — not the probability of $H_0$, given the data.

Myth 2 — "p > 0.05 proves there is no effect"

A large p-value only says the data are compatible with no effect. Small studies often miss real effects. Absence of evidence is not evidence of absence — look at the confidence interval to see which effects are still plausible.

Myth 3 — "A smaller p-value means a bigger or more important effect"

The p-value mixes effect size with sample size. A tiny, useless effect can have a tiny p-value in a huge sample, as the next section shows.

Myth 4 — "0.05 is a magic line"

p = 0.049 and p = 0.051 represent practically identical evidence. Report the exact p-value rather than just "significant" or "not significant".

P-Values, Sample Size and Effect Size

Two contrasting studies make the point.

StudyDifference in meansP-value95% CI
A: 10,000 students per group, SD 150.5 points0.0180.1 to 0.9
B: 8 students per group, SD 106 points0.25−4.7 to 16.7

Study A is "significant" but the effect — half a point on a test — is too small to matter to anyone. Study B is "not significant", yet its interval includes large, important effects; it is simply too small to tell. Judged by p-values alone, you would draw the wrong lesson from both.

Rule of thumb

The p-value answers "is there evidence of an effect?". The effect size and confidence interval answer "how big is it, and how precisely do we know?". Good reports give both.

How to Report a P-Value

Example write-up

"After six weeks of tutoring, scores improved by a mean of 4.2 points (95% CI 0.9 to 7.5; paired t-test, t(24) = 2.63, two-sided p = 0.015)."

Running It in R and Python

R

binom.test(60, 100, p = 0.5)  — exact test for the coin (p ≈ 0.057)

t.test(after, before, paired = TRUE)  — paired t-test on before/after scores

p.adjust(pvals, method = "holm")  — correct a set of p-values for multiple testing

Python (SciPy)

stats.binomtest(60, 100, p=0.5).pvalue  — exact test for the coin

stats.ttest_rel(after, before)  — paired t-test

stats.ttest_1samp(improvement, 0)  — the same test on the differences

Practice Questions

Try each one, then check with the hint.

1

A study reports p = 0.03. A classmate says "so there is a 3% chance the results are due to chance." What is wrong with that?

It reverses the conditional. p = 0.03 means: if there were no real effect, results at least this extreme would occur 3% of the time. It is not the probability that the null hypothesis is true or that the result is a fluke.
2

A two-sided z-test gives z = 1.5. What is the p-value, and is it significant at the 5% level?

$P(Z > 1.5) \approx 0.067$, so the two-sided p-value is about $2 \times 0.067 \approx 0.13$. That is above 0.05, so the result is not significant — the data are compatible with no effect.
3

A pilot study of 16 patients finds a promising improvement, but p = 0.053. The authors conclude "the treatment does not work." How should they have reported it?

p = 0.053 is borderline, and a small pilot has low power. They should report the size of the improvement with its confidence interval and say the evidence is inconclusive — a larger study is needed — rather than claim there is no effect.
Next steps

Not sure which test produces your p-value? Read How to Choose the Right Statistical Test. Need the z-scores used above? See the normal distribution guide. Working on a thesis or paper? TutorDice offers one-on-one statistics consultation — your first session is free.