Hypothesis testing

Hypothesis testing is a statistical procedure that uses sample data to decide whether an observed result is consistent with a stated assumption, the null hypothesis. It reports a p-value, the probability of a result at least as extreme if the null hypothesis were true.

Also called: statistical hypothesis testing · significance testing · null hypothesis significance testing · p-value · null hypothesis

What it is

Hypothesis testing is a method for deciding, from a sample, whether an observed difference or pattern is more than chance variation would produce. The analyst states a null hypothesis, which is the assumption of no effect or no difference, and an alternative hypothesis, which is the claim the data might support.

The steps are:

The National Institute of Standards and Technology (NIST) describes the p-value as the probability, under the null hypothesis, that the test statistic takes values equal to or more extreme than the one observed. If the p-value is at or below alpha, the null hypothesis is rejected. Otherwise it is not rejected.

Two errors are possible. A type I error rejects a true null hypothesis, and alpha is the probability of that error. A type II error fails to reject a false null hypothesis.

A confidence interval is the companion tool. It gives a range of values for the quantity being estimated.

Why it matters

Samples vary, so a gap between two groups can appear by chance. A test puts a number on how surprising the gap would be if nothing real were happening.

Analysts use it to decide whether a change in an average, a rate or a relationship is worth acting on. A result with no stated test is an anecdote, and a test misread can lead to a wrong decision in either direction.

Worked example

Illustrative numbers. A bank expects a payment process to take 10 minutes on average. After a change, a sample of 100 payments averages 9.5 minutes, with a sample standard deviation of 2.5 minutes.

  1. Null hypothesis: the true average is still 10 minutes. Alternative: it differs from 10.
  2. Alpha is set at 0.05.
  3. The standard error is 2.5 divided by the square root of 100, which is 0.25. The test statistic is (9.5 minus 10) divided by 0.25, which is minus 2.
  4. A statistic of minus 2 is about two standard errors from the null value. The two-sided p-value is close to 0.05.

The result is borderline. The analyst reports the estimate, the interval and the p-value rather than a bare yes or no.

How to read it

A small p-value is evidence against the null hypothesis. It does not give the probability that the null hypothesis is true, and it does not measure the size or importance of the effect. A large p-value means the data do not rule out the null, not that the null is proved.

Who uses it

Common confusions

7Roles that need it

8Skills behind it

Sources behind this page (2) · Updated 5 Nov 2026

Concept