Likelihood Ratio Test

advertisement
Likelihood Ratio Test
1. Please derive the likelihood ratio test for H0: μ = μ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:



L   L0 , 
2



n
 xi  0 2   1  2
 1

exp  
exp 
2
2 
2

2
2
 2
2

  2 
 
1
n
i 1
 x
n
i 1
i
2
 0  

There is no free parameter in L  , thus Lˆ   L  .
L  L ,  2   i 1
n
n
 x   2   1  2
 1
exp   i 2   
exp 

2
2
2
 2
2 2

  2 
1
 x
n
i 1
i
2
  

There is only one free parameter μ in L . Now we shall find the value of μ that maximizes
the log likelihood ln L   
n
1
ln 2 2  
2
2 2
 x
n
i 1
  .
2
i
n
d ln L  1
 2 i 1 xi     0 , we have ̂  x
d

It is easy to verify that ̂  x indeed maximizes the loglikelihood, and thus the likelihood
By solving
function.
Therefore the likelihood ratio is:
n
n
 1 2
 1
xi  0 2 
exp  

2
2
2 
2 i 1
L 0 ,  
L 0 ,    2 
Lˆ 
 2





n
2
2
ˆ
max  L ,   Lˆ ,  
L
n
 1 2
 1
xi  x 2 
exp  

2 
2 i 1
 2 
 2

 
 1
 exp 
2
 2
 x   
n
i 1
2
i
0
 1  x  0  2 
 1
2 
2
  xi  x    exp   
   exp   z0  

 2

 2   / n  

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  z / 2 .
2. Please derive the likelihood ratio test for H0: μ = μ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:
L   L0 ,  2   i 1
n
n
 x   2   1  2
 1
exp   i 2 0   
exp 

2
2
2
 2
2 2

  2 
1
 x
n
i 1
i
2
 0  

There is one free parameter, σ2, in L  . Now we shall find the value of σ2 that maximizes

d ln L  
d
2

n
2
2

1
2

n
1
ln 2 2  2
2
2
the log likelihood ln L    
 x   
n
4
i 1
i
 x   
n
i 1
i
 0 , we have ˆ2 
2
0
2
0
. By solving
1 n
2
 xi  0 

i 1
n
It is easy to verify that this solution indeed maximizes the loglikelihood, and thus the
likelihood function.
The likelihood under the alternative hypothesis is:
L  L ,  2   i 1
n
n
 x   2   1  2
 1
exp   i 2   
exp 

2
2
2
 2
2 2

  2 
1
 x
n
i 1
i
2
  

There are two free parameter μ and σ2 in L . Now we shall find the value of μ and σ2 that
maximizes the log likelihood ln L   
By solving the equation system:
 ln L   


1

2
  x     0 and
n
i 1
i
we have ̂  x and ˆ 2 
n
1
ln 2 2  
2
2 2
 ln L   

2

n
2
2
 x
n
i 1

1
2
  .
2
i
 x  
n
4
i 1
i
2
0
1 n
2
 xi  x 

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





2
L 0 , ˆ2
L ˆ  max 2 L 0 , 



ˆ
max  , 2 L  ,  2
L ˆ , ˆ 2
L 
 
  n  xi  0 2 

  i n1
   xi  x 2 
i 1


  t0  2 

 1 
 n 1 




n
2




2
n
n

 exp   
n
2

 2   xi  0  
 2 
i 1



n

2
n
n

 exp   
n
2

 2   xi  x  
 2 
i 1


  n  xi  x 2  n  x  0 2 

  i 1
n
2


x

x
 i 1  i 



n
2
2

n  x  0  

 1  n
   xi  x 2 
i 1



n
2
n
2
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, / 2 .
Download