You are on page 1of 3

Likelihood Ratio Test

1. Please derive the likelihood ratio test for H 0: μ = μ0 versus Ha: μ ≠ μ0, when the population
is normal and population variance σ2 is known.

Solution:
For a 2-sided test of H0: μ = μ0 versus Ha: μ ≠ μ0, when the population is normal and
population variance σ2 is known, we have:
    ,  2  :   0 ,  2   2  and     ,  2  :     ,  2   2 
The likelihoods are:
n
  x   2   1 2
L   L  0 ,    i 1
1  1 2
 x  0  
n n
2
exp  i 2 0    2 
exp  i
2 2
 2   2    2 2 i 1

There is no free parameter in L  , thus Lˆ   L  .
n
  x  2   1 2
L    L  ,    i 1

2 n 1
exp  i 2    2 
exp 
1
2 i 1
n
 xi    2 
2 2
 2   2   2 
There is only one free parameter μ in L   . Now we shall find the value of μ that
ln  2 2  
n 1
maximizes the log likelihood ln L      x   .
n 2
i
2 2 2 i 1

d ln L   1
 2 i 1  xi     0 , we have ̂  x
n
By solving
d 
̂
It is easy to verify that  x indeed maximizes the loglikelihood, and thus the likelihood
function.

Therefore the likelihood ratio is:


n
 1 2 
exp 
1
2 i 1
n
 xi  0  2 
L  0 ,  2  L  0 ,  2 
 2 
Lˆ  2   2
    
L  
ˆ max  L  ,   2
L ˆ ,  2 
 1 2
n

 2 
exp 
1
2 i 1
n
 xi  x  2 
 2   2 
 1  x  0  2 
  x 
 1 2   1 2
  0    xi  x    exp      exp  z0  
n 2
 exp
 2
i
2 i 1
  2   / n    2 
Therefore, the likelihood ratio test that will reject H0 when   * is equivalent to the z-test
that will reject H0 when Z 0  c , where c can be determined by the significance level α as
c  za / 2 .
2. Please derive the likelihood ratio test for H 0: μ = μ0 versus Ha: μ ≠ μ0, when the population
is normal and population variance σ2 is unknown.

Solution: For a 2-sided test of H0: μ = μ0 versus Ha: μ ≠ μ0, when the population is normal and
population variance σ2 is unknown, we have:
 
    ,  2  :   0 , 0   2  � and     ,  2  : �   �, 0   2  �  
The likelihood under the null hypothesis is:
n
  xi   0  2   1  2
L   L  0 ,    i 1

2 n
exp 
1

 2 
exp 
1
2 i 1
n
 xi  0  2 
2 2
 2 2
  2   2 
There is one free parameter, σ , in L  . Now we shall find the value of σ that maximizes
2 2

n 1
the log likelihood ln L     
2

ln 2 2  2
2
 �  x  
n
i 1 i 0
2
. By solving

d ln L    n 1 1 n
�  x   �  xi  0 
n 2 2
 0 , we have ˆ 
2
  4 i 0
d 2
2 2
2 i 1 n i 1

It is easy to verify that this solution indeed maximizes the loglikelihood, and thus the
likelihood function.

The likelihood under the alternative hypothesis is:


n
  x  2   1 2
L    L  ,  2   i 1

n 1
exp  i 2    2 
exp 
1
2 i 1
n
 xi    2 
2 2
 2   2   2 
There are two free parameter μ and σ in L   . Now we shall find the value of μ and σ that
2 2

ln  2 2  
n 1
maximizes the log likelihood ln L      x   .
n 2
i
2 2 2 i 1

By solving the equation system:


�ln L    1 �ln L    n 1
�  x     0 and �  x  
n n 2
 i   4 0

� 2 i 1

� 2
2 2
2 i 1 i

1 n
�  xi  x 
2
we have ̂  x and ˆ 
2
i 1
n
It is easy to verify that this solution indeed maximizes the loglikelihood, and thus the
likelihood function.

Therefore the likelihood ratio is:


n
� n �
2
n�
� �exp �
 �


L  ˆ  max 2 L 0 , 

2



L 0 , ˆ2    �2 �  xi  0  2
�
n
i 1

� �2�
L  ˆ  max  , 2 L  ,  2 L ˆˆ,  2    � n �
2
�n�
n

� �  �
exp �
�2 �  xi  x  �
n 2
� 2�
� i 1 �
n n n
  
��n  xi  0  2 �2 ��n  xi  x  2 + n  x  0  2 �2 � n  x    2 �2
 � i n1 �  � i 1 � �
1+ n 0

��  xi  x  � � �i 1  xi  x  � � �i 1  xi  x  �
2 n 2 2
� � �
� i 1 � �
n

�  t0  2 �2
�
1+ �
� n 1 �
� �
Therefore, the likelihood ratio test that will reject H0 when   * is equivalent to the z-test
that will reject H0 when t0 �c , where c can be determined by the significance level α as
c  tn 1,a / 2 .

You might also like