statistics

Hypothesis Testing

Hypothesis testing decides between two competing claims about a population using sample data. We compute a test statistic and reject the null hypothesis if the p-value is small.

Hypothesis testing is a framework for using sample data to decide between two competing claims about a population:

  • Null hypothesis H0H_0: the default / "nothing interesting" claim (e.g. coin is fair, drug has no effect).
  • Alternative HaH_a: what we suspect / want to demonstrate.

Procedure:

  1. State H0H_0 and HaH_a.
  2. Choose a significance level α\alpha (commonly 0.05) — the probability of false rejection (Type I error).
  3. Compute a test statistic from the data (z-score, t-statistic, chi-square, F-ratio).
  4. Compute the p-value — probability under H0H_0 of seeing data at least as extreme.
  5. Decide: if p<αp < \alpha, reject H0H_0; otherwise fail to reject.

Two error types:

  • Type I: rejecting a true H0H_0 (probability α\alpha).
  • Type II: failing to reject a false H0H_0 (probability β\beta); 1β1 - \beta is the power.

Common confusion: "fail to reject" ≠ "accept H0H_0". Absence of evidence is not evidence of absence — small sample sizes can hide real effects.

This framework underlies clinical trials, A/B tests, quality control, and most published "statistical significance" claims.