1.3 Hypothesis testing

In the previous section we saw how to estimate unknown parameters using maximum likelihood. While this is all well and good, we would like to also be able to test hypotheses regarding parameters. Consider Figure 1.4.

## Warning: package 'latex2exp' was built under R version 4.6.1
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once per session.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## Warning in geom_point(aes(x = 0.9, y = f(0.9)), colour = palette.colors(2), : All aesthetics have length 1, but the data has 2 rows.
## ℹ Please consider using `annotate()` or provide this layer with data containing
##   a single row.
Log likelihood of the sample

Figure 1.4: Log likelihood of the sample

There we have an estimate of \(\theta\) which is \(\hat\theta = 0.9\). We would like to test \(H_0: \theta=\theta_0 = 1\) against \(\theta \neq \theta_0\).

This should be based on how far away, in some sense, the maximum likelihood estimate is from \(\theta_0\). Looking at the figure, we can see three different ways of measuring how far away \(\hat\theta\) and \(\theta_0\) are from each other. One way would be to measure the vertical distance between the log-likelihood function in \(\hat\theta\) and \(\theta_0\). I.e. we would calculate: \[ l(\hat\theta) - l(\theta_0). \] This is know as the likelihood ratio test.

Another option is to calculate the horizontal distance between \(\hat\theta\) and \(\theta_0\). I.e. to calculate the distance \[ |\hat\theta - \theta_0|. \] This is known as the Wald test.

Lastly we know that \(\partial_\theta l(\theta)|_{\theta=\hat\theta} = 0\). So we could calculate \[ |\partial_\theta l(\theta)|_{\theta=\theta_0}|, \] and see how close it is to 0. This is known as the Score test. In the following sections we examine each test in detail.