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.
After this guide you can
- Write H₀ and Hₐ about a parameter.
- Compute a test statistic and interpret a p-value.
- Decide with α and state a conclusion in context.
- Explain Type I and Type II errors and power.
- Run one-sample, two-sample, paired and two-proportion tests.
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
- Hypotheses are about parameters (μ, p), never statistics.
- Small p-value: the data would be surprising if H₀ were true, so reject H₀. Large p-value: fail to reject; that is not proof H₀ is true.
- Lowering α reduces Type I errors but raises Type II errors. Larger samples raise power.
- Paired data (same subjects twice) are analyzed as one sample of differences. Two independent groups use Welch's t by default.
- Statistically significant does not mean large or important; report the effect size or an interval too.
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.
- H₀: μ = 5.0; Hₐ: μ ≠ 5.0.
- SE = 1.2/√36 = 0.2; t = (5.4 − 5.0)/0.2 = 2.00, df = 35.
- Two-sided p ≈ 0.053.
- 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
- Writing H₀: x̄ = 5.0.
- Saying "accept H₀" or "H₀ is proven."
- Reading the p-value as the probability H₀ is true.
- Running a two-sample test on paired data.
- Changing α after seeing the p-value.
Check yourself
- A new drug should lower pain scores below the old mean of 6. Write the hypotheses.
- p = 0.003 with α = 0.05. Decision?
- A fire alarm sounds with no fire. Which error type is that?
- How can you raise power without raising α?
- Before and after scores for the same 12 people: which test?
- Two independent groups of patients compared on mean recovery time: which test?
- p = 0.20. Does that show H₀ is true?
- A huge study finds a 0.1 point difference with p < 0.001. Is it important?
Answer key
- H₀: μ = 6; Hₐ: μ < 6. The claim to show goes in Hₐ.
- Reject H₀. p < α.
- Type I. Rejecting "no fire" when it was true.
- Increase n. Smaller SE makes real effects easier to see.
- Paired t on the differences, df = 11. Same subjects twice.
- Two-sample t (Welch). Independent samples, quantitative outcome.
- No. It only means the data are not surprising under H₀.
- 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