A Simple Example (Exponential)

say X1, .., Xn iid with f(x)=βexp(-βx), x>0 and we want to test H0:β=β0 vs Ha:β≠β0

Wald type test

we can often find such a test by first finding the method of moments estimator:

so if 1/X̅ is close to β0 we should accept the null hypothesis, otherwise we should reject it. This is of course equivalent toX̅ is close to 1/β0. Now

so we reject H0 if √n|X̅-1/β0|/(1/β0)=√n|β0X̅-1|>qnorm(1-α/2) =zα/2

LRT test


and we reject H0 if -2logλ(x)>qchisq(1-α,1)

How about using the LRT without the chisquare approximation? As always we have

"reject H0 if λ(x) is small"

iff

"reject H0 if -2logλ(x) is large"

iff

"reject H0 ifX̅ is small or large" (see exp.ex(3))

so we reject H0 ifX̅<cv1 orX̅>cv2.

Now

and clearly cv2=qgamma(1-α/2,n,β0)/n

This solution only works because we know the distribution of a sum of exponential variables (gamma), in another example we might be stuck with using the chisquare approximation.

Which test is better?
for that we need to find the power of the tests:

and

The power curves are shown in exp.ex(5)