Hypothesis Testing
Fundamentals of Hypothesis Testing
The classical frequentist picture, start to finish, before any of it gets pulled apart.
1. What hypotheses are
There are two types of hypotheses we define in advance of a hypothesis test, the null and the alternative hypotheses.
- : a default state, the state of the world in which the effect you’re looking for is exactly zero.
- : the claim you’re trying to prove, often the complement of .
The null hypothesis () has to be defined specifically enough to enable computation under that world. In other words, the parameters of your sampling distribution must be fully specified under the frequentist perspective.
Now, let’s take a concrete example. Suppose you’re a drug discovery scientist who’s run a clinical trial to show your drug is effective at mitigating some target symptom. Suppose you ran the trial on a sample of paired measurements, before and after the treatment, for each patient. Showing that the difference within each pair tends toward improvement is exactly what would make your drug effective.
Since you’re a frequentist, you’ll first assume this difference follows some simple parametric distribution, (simply, for example, ). (Assuming the pairs are controlled for, so nothing else is confounding the comparison.)
Here, your hypothesis becomes:
- :
- :
2. Fundamentals of HT
Generic hypothesis testing aims to choose the largest region we can call a “discovery,” at a fixed level of Type I error.
Neyman-Pearson Lemma
For a given significance level , and a predefined test statistic , the rejection region , for the parameter of interest , is defined as
Two things worth keeping in mind here:
- On the choice of test statistic: in the asymptotic regime, as , the distribution of the test statistic gets standardized by the CLT, so the specific choice of stops mattering much, different valid choices become asymptotically equivalent.
- Test-inversion duality: invert the frequentist rejection region , and what falls out is exactly the frequentist confidence interval.
3. Seeing the power and significance tradeoff
Unlike Fisher’s test (which is, historically, very much the origin of hypothesis testing), Neyman-Pearson resolves the tradeoff between power and significance level directly, fixing one and optimizing the other. Fisher’s approach simply focuses on evidence against on its own (this is usually the first flavor of hypothesis testing anyone learns, back in high school). Neyman-Pearson is, in a sense, the mature endpoint of the frequentist perspective, fixing both hypotheses and both error rates in advance, and optimizing what’s left to optimize.