StatsQuest · County Courthouse · Statistics

Putting Claims on Trial: Hypothesis Tests

A test is a trial. Assume H₀ is true, measure how surprising the data would be, and decide with α set in advance.

PDFBack to the game

After this guide you can

Key terms

Null hypothesis H₀
The "no effect" claim, with an equals sign.
Alternative Hₐ
What you suspect: <, > or ≠.
Test statistic
(estimate − null value)/SE.
p-value
P(data this extreme or more | H₀ true).
Significance level α
The cutoff chosen in advance, often 0.05.
Type I error
Rejecting a true H₀; probability α.
Type II error
Failing to reject a false H₀; probability β.
Power
1 − β, the chance of detecting a real effect.

The big ideas

Null distribution with both tails beyond t = 2.00 shaded; the shaded area is the two-sided p-value−4−3−2−10123400.10.20.30.4t = 2.00−2.00t curve if H₀ is truep/2 ≈ 0.027p/2 ≈ 0.027two-sided p ≈ 0.053test statisticdensity

The p-value is the shaded area beyond the observed statistic, in both tails for a two-sided test.

Worked example

A label says a supplement capsule holds 5.0 mg. A sample of 36 has x̄ = 5.4 mg, s = 1.2 mg. Test at α = 0.05.

  1. H₀: μ = 5.0; Hₐ: μ ≠ 5.0.
  2. SE = 1.2/√36 = 0.2; t = (5.4 − 5.0)/0.2 = 2.00, df = 35.
  3. Two-sided p ≈ 0.053.
  4. p > 0.05, so fail to reject H₀.

Answer: Not enough evidence at the 5% level that the mean differs from 5.0 mg

Common mistakes

Check yourself

  1. A new drug should lower pain scores below the old mean of 6. Write the hypotheses.
  2. p = 0.003 with α = 0.05. Decision?
  3. A fire alarm sounds with no fire. Which error type is that?
  4. How can you raise power without raising α?
  5. Before and after scores for the same 12 people: which test?
  6. Two independent groups of patients compared on mean recovery time: which test?
  7. p = 0.20. Does that show H₀ is true?
  8. A huge study finds a 0.1 point difference with p < 0.001. Is it important?

Answer key

  1. H₀: μ = 6; Hₐ: μ < 6. The claim to show goes in Hₐ.
  2. Reject H₀. p < α.
  3. Type I. Rejecting "no fire" when it was true.
  4. Increase n. Smaller SE makes real effects easier to see.
  5. Paired t on the differences, df = 11. Same subjects twice.
  6. Two-sample t (Welch). Independent samples, quantitative outcome.
  7. No. It only means the data are not surprising under H₀.
  8. Not necessarily. Significant is not the same as practically large.

1 Design2 Describing3 Probability4 Normal5 CLT6 Intervals8 Regression9 Chi-square, ANOVA10 Health stats11 Full review