1.8 Wilks’ test

In the previous sections we found the asymptotic distribution of \(\hat\theta_n\). Here we seek the asymptotic distribution of the likelihood ratio \(-2(l_n(\theta_0) - l_n(\hat\theta_n)))\). The reason is that, as we have seen, finding the exact distribution is difficult. If we have the approximate, asymptotic, distribution, we can use that to do for example hypothesis testing. For ease of notation we suppress the \(n\) and write \(l\) and \(\hat\theta\).

We will use the following results, that we have seen before: \[\begin{align*} l'(\hat\theta) &= 0,\\ -\frac{1}{n}l''(\hat\theta) &\overset{asym.}{\sim} -\frac{1}{n}l''(\theta) \overset{asym.}{\sim} I(\theta),\\ \sqrt{n}(\hat\theta - \theta) &\overset{asym.}{\sim} I^{-1/2}(\theta )Z, \end{align*}\] with \(Z\sim \mathsf N(0,1)\).

Just as in the delta method, we now do a Taylor expansion of \(l(\theta)\) around \(\hat\theta\):

\[\begin{align} l(\theta) \approx& l(\hat \theta) + l'(\hat\theta)(\theta-\hat\theta) + \frac{l''(\hat\theta)}{2}(\theta-\hat\theta) ^2\\ =& l(\hat\theta) + \frac{l''(\hat\theta)}{2}(\theta-\hat\theta) ^2 = l(\hat \theta) +\frac{1}{2} \frac{1}{n}l''(\hat\theta)n(\theta-\hat\theta) ^2\\ \overset{asym.}{\sim} & l(\hat\theta) -\frac{1}{2} I(\theta)I^{-1}(\theta)Z^2 \overset{d}{=} l(\hat\theta) - \frac{1}{2}\chi_1^2. \end{align}\] In other words, for a large sample,
\[ \lambda_{LR} = 2( l_n(\hat\theta)-l_n(\theta_0))\overset{asym.}{\sim} \chi_1^2. \]

Which is Wilks’ theorem.

Let us again apply this to the exponential distribution. Of course, we have already found the exact likelihood ratio test, so we would in reality not use an asymptotic test in this case. Nonetheless, we can calculate it as:

lrStatistic <- 2*(logLn(optimResult$maximum, t) - logLn(0.1, t))
lrStatistic
## [1] 2.200652

Recall that we reject \(H_0\) if \(\lambda_{LR}\) is large. Therefore the p-value is

1 - pchisq(lrStatistic, 1)
## [1] 0.1379523