Interactive statistics

56 free interactive lessons: from mean and median to A/B tests and Bayes. Drag the charts and build intuition. No sign-up.

Module 5: Hypothesis testing

Why test hypotheses

You changed something — and the metric went up. But data is always noisy: it jumps from sample to sample even with no effect at all. The analyst's core question: is this a real signal or just the ripple of chance? Hypothesis testing is the formal way to answer it without fooling yourself.

Compare two worlds. In one there is no effect: the difference you see is pure chance. In the other the effect is real. The trouble is that, because of noise, BOTH worlds can produce the same observed number. Looking at a single result you cannot be sure which world it came from — hence the need for a formal procedure rather than an eyeball call. (The interactive with the two overlapping worlds comes in the next lesson — here, just the idea.)

What it means
What decision this changes

The default decision is to change nothing and treat the difference as chance. Hypothesis testing answers one question: is the data surprising enough to abandon that default and accept the change.

The practical meaning is simple: before celebrating a metric's growth, an analyst asks "could this have happened by chance?". If yes — the result does not count. That discipline separates an evidence-based decision from self-deception.

The reverse matters too: "we found no effect" is not the same as "there is definitely no effect". Maybe there just wasn't enough power to see it (the power lesson covers this). The test answers cautiously and honestly, not categorically.

Where it shows up

Drug regulators will not approve a medicine until it is shown the effect is not explained by chance. The same logic governs vaccine, materials and engineering validation.

In a product every change is a hypothesis: "the new button will lift conversion". Hypothesis testing turns that "it seems" into a measurable, reproducible decision.

Definitions
Null hypothesis (H0)
"no effect, the difference is chance". The starting point one tries to refute.
Alternative hypothesis (H1)
"the effect is real". Accepted only if H0 could be rejected.
Signal and noise
signal — the real effect; noise — random fluctuations of the data. The test's job is to tell one from the other.
Next →
Enjoying the materials?

This site is built by the DataSlice Telegram channel: data analytics in plain words — real cases, metrics, careers. The channel is in Russian.

Open the Telegram channel