MIT 18.650 — Lecture 15

Introduction to Hypothesis Testing

§ Hypothesis Testing

Definition. A test is a function Ψ:{data}{0,1}\Psi: \{\mathrm{data}\} \to \{0, 1\}. Equivalently, a test is an estimator of a binary value.

In other words, a test is a process of reading in data and answering a question about the population based on that data. Given a parametric model {PθθΘ}\{\mathbb{P}_{\theta} \mid \theta \in \Theta\}, the question a test will answer must look like “Does θΘ0\theta \in \Theta_0 or θΘ1\theta \in \Theta_1?”, where Θ=Θ0Θ1\Theta = \Theta_0 \sqcup \Theta_1.

Definition. The null hypothesis H0H_0 is the claim that θΘ0\theta \in \Theta_0, and the alternative H1H_1 is the claim that θΘ1\theta \in \Theta_1.

The distinction is that the null hypothesis is the “status quo” (e.g. “the drug does not outperform the placebo”).

§ Error Types

Of course, a test Ψ\Psi only reads in sample data, so the answer that it gives won't always be correct.

Definition. A Type I error occurs if H0H_0 is true but Ψ=1\Psi = 1, and a Type II error occurs if H1H_1 is true but Ψ=0\Psi = 0.

Type I is conventionally the more serious error: it is worse to wrongly declare “the drug outperforms the placebo”. Note that the probability of a Type I / Type II error depends on the true population parameter θ\theta.

Definition. The size of a test Ψ\Psi is size(Ψ):=maxθΘ0Pθ(Ψ=1)\mathrm{size}(\Psi) := \max_{\theta \in \Theta_0} \mathbb{P}_{\theta}(\Psi = 1): the maximum possible probability of a Type I error. A test Ψ\Psi is said to have level α\alpha if size(Ψ)α\mathrm{size}(\Psi) \leq \alpha.

Definition. The power of a test Ψ\Psi is the function β(θ)=Pθ(Ψ=1)\beta(\theta) = \mathbb{P}_{\theta}(\Psi = 1).

In the above, the size of Ψ\Psi is the yy-intercept α\alpha. A perfect test would have β(θ)\beta(\theta) be the Heaviside step function.