1.10 Score test
In this section we discuss the score test, sometimes called the Rao test or the Lagrange multiplier (LM) test.
If \(\hat\theta\) is close to \(\theta_0\) then we should have that \(l'(\theta_0)\approx 0\). The score test is therefore that we reject \(H_0\) if \(\left| l'(\theta_0)\right|>k\), for some \(k\) chosen depending on the size of the test.
We can use the asymptotics we already calculated, that isSo the score test of size \(\alpha\) is to reject \(H_0\) if \[ \frac{\left|l_n'(\theta_0)\right|}{\sqrt{I_n(\theta_0)}}>z_{\alpha/2}. \]
Note that this test statistic does not require us to calculate the MLE \(\hat\theta\). By squaring the test statistic we get, as in the previous section, a test statistic that is \(\chi^2_1\)-distributed, similar to Wilks’ test.
We apply this to the exponential distribution. We have already calculated everything we need so it is just a matter of putting it together:
lp <- n*( 1/lambda0 - mean(t) )
fisherInfo <- n/lambda0^2
scoreStatistic <- lp / sqrt(fisherInfo)
scoreStatistic## [1] 1.41103
With p-value:
## [1] 0.1582359
In this particular case the score test and the Wald test are exactly the same. This is not true in general.