Hypothesis Testing

A formal framework for deciding whether data provides enough evidence to reject a default assumption.

Hypothesis test — rejection region and test statistic
z=1.96z=-1.96z=1.80-3-2-10123α/2 = 0.025α/2 = 0.025
✓ Fail to reject H₀ — p-value ≈ 0.0719 > α=0.05
α = 0.05
z = 1.80
Click to toggle
Definition

Hypothesis testing is a framework for using data to decide between two competing claims about the world.

  • The null hypothesis H0H_0 is the default, conservative claim — usually "no effect" or "no difference."
  • The alternative hypothesis H1H_1 is what you're trying to find evidence for.

The logic: assume H0H_0 is true, then ask "how surprising is the data I collected?" If the data would be very unlikely under H0H_0, that's evidence against it.

Is this coin fair?

You suspect a coin is biased. You flip it 20 times and get 15 heads.

H0H_0: the coin is fair (p=0.5p = 0.5). H1H_1: the coin is biased (p0.5p \neq 0.5).

If the coin were fair, getting 15 or more heads in 20 flips would happen about 2% of the time. That's unlikely. So the data provides some evidence against the fair coin hypothesis.

Try it

A new drug is tested. The null hypothesis is that the drug has no effect on blood pressure. You observe that patients' blood pressure dropped by an average of 8 points. Is this enough information to reject H0H_0? What else would you need?

Solution

No, it's not enough on its own. You also need to know how variable blood pressure is (to judge whether 8 points is a lot or a little), how many patients were in the study (more patients → more reliable estimate), and the size of the typical placebo effect. Without knowing how surprising 8 points is relative to the noise, you can't assess the evidence against H0H_0.

Related concepts

Related reading