Likelihood Ratio Test
Likelihood Ratio Test
Likelihood Ratio Test
1|P a g e
LIKELIHOOD RATIO TEST
TABLE OF CONTENTS
Review 3
Assumptions 4
Definition …………………………………………………………………………………………………………………………………………………………....4
Purpose of Likelihood Ratio Test………………………………………………………………………………………………………………………....4
Example……………………………………………………………………………………………………………………………………………………………8
Example#1 ……………………………………………………………………………………………………………………………………………………..11
Example#2..…………………………………………………………………………………………………………………………………………………….14
Example#3 ……………………………………………………………………………………………………………………………………………………..20
References………………………………………………………………………………………………………………………………………………………..23
2|P a g e
LIKELIHOOD RATIO TEST
REVIEW
It is the statistical investigation of the goodness of fit among two styles. In this check, a
genuinely additional perplexing model is being contrasted with a considerably less confounded
form that permits you to take conveyance of or reject the confine on the parameter. The
opportunity proportion check is legitimate assuming we will analyze progressively settled styles.
Thusly, a more prominent complex rendition need to contrasts from a substantially less look at
form with the guide of the expansion of one or additional parameters.
The (generalized) likelihood-ratio check (every so often called the probability ratio chi
rectangular take a look at) was proposed through J. Neyman and E.S. Pearson in 1928. They also
proved (1933) that of all degree- α tests for checking out one easy hypothesis in opposition to
another, the chance-ratio test is the most effective among all of the level-α checks. This is
likewise referred to as the generalized likelihood ratio test. LRT is one in all oldest classical
LIKELIHOOD
RATIO TEST
3|P a g e
LIKELIHOOD RATIO TEST
approaches of hypothesis checking out. Likelihood ratio exams (LRTs) are as broadly used as
maximum probability estimation.
ASSUMPTIONS
To derive the asymptotic properties of the statistic LR, we anticipate that both of the restricted
and unrestricted estimators are asymptotically every day. Components of g are continuously
differentiable on Θ with appreciation to all of the components of θ.
DEFINITION
A LIKELIHOOD RATIO (LR) TEST IS A HYPOTHESIS TEST IN WHICH TWO
DIFFERENT MAXIMUM LIKELIHOOD ESTIMATES OF A PARAMETER ARE
COMPARED TO DECIDE WHETHER OR NOT TO REJECT A PARAMETER
RESTRICTION. ACCORDING TO STATISTICS, THE LIKELIHOOD RATIO TEST
ASSESSES THE GOODNESS-OF-FIT OF TWO COMPETING STATISTICAL
MODELS BASED ON THE RATIO OF THEIR LIKELIHOODS, NAMELY, ONE
FOUND BY MAXIMIZING THE ENTIRE PARAMETER SPACE AND ANOTHER
FOUND AFTER IMPOSING A PARTICULAR RESTRICTION.
Likelihood ratios are essentially the ratio of either the possibility that the test outcome is
correct or the probability that the test result is incorrect.
4|P a g e
LIKELIHOOD RATIO TEST
H 0 :θ=θ 0
H 1 :θ=θ1
we define
L ( x1, x2, … , xn ; θ0 )
λ ( x 1 , x2 , … , xn )=
L ( x 1 , x 2 , … , x n ; θ 1)
λ<c ⟹ Reject H 0
λ ≥ c ⟹ Accept H 0
H 0 :θ ϵ Θ0
Against
Θ
H1: θ ϵ
Θ1
H 0 :θ ϵ Θ¿
H 1 :θ ϵ Θ1
5|P a g e
LIKELIHOOD RATIO TEST
Let L(θ ; x 1 , … , x n) be the likelihood function for a sample x 1 , … , x n having joint density
f ( x 1 , … , x n ; θ )where θ ϵ θ¿. The generalized likelihood ratio, denoted by λ∨λ ndefined to be as
¿ L(θ ; x , … , x )
θ ϵ Θ ¿0 1 n
λ=λ n=λ ( x 1 , … , x n )= ¿
L(θ ; x 1 , … , x n )
θ ϵ Θ1
Can be expressed as
¿ L(θ ; x ,… , x )
¿ 1 n
θ ϵ Θ0
Λ=λ=λn =λ ( x 1 , … , x n )=
¿ L(θ ; x , … , x )
1 n
θ ϵ Θ1
The values of Λ statistic used to formulate a check of the above cited speculation that if
6|P a g e
LIKELIHOOD RATIO TEST
DECISION CRITERIA:
H 0is to be rejected if and only if λ ≤ λ 0.
CRITICAL REGION:
The critical region of GLRT is defined as
R={ y : λ ( y ) ≤ a }
Where a is a constant value chosen to give significance level α , that is such that
P { λ ( y ) ≤ a|H 0 }=α
The level−α GLRT will reject H 0 when Λ ≤ c . c is chosen so that P H 0 [ A ≤ c ] equals (or
approximately equals) to α .
It makes good sense that our test statistic tends to be smaller if our null hypothesis H 0is false.
Since the denominator of λ tends to be larger than the numerator.
DEMERIT:
i. Sometimes, it becomes challenging to find the ¿ L(θ ; x 1 , … , x n)
ii. It can be challenging to find the distribution of Λ which is required to test the
power of the test.
H 0 :θ=θ 0
H 1 :θ ≠ θ0
l(θ0 )
Λ=
max θ l (θ)
7|P a g e
LIKELIHOOD RATIO TEST
n
Where ( θ ) = ∏ f (θ) is the likelihood function and the numerator is the value of the likelihood
(i=1)
The denominator is the maximum value of the likelihood function from all the possible values of
^ where θ^ is the MLE.
θ in the parameter space. The denominator is equivalent to l( θ)
Here, G is the difference between the -2log likelihoods. If we are doing MLE numerically, then
test statistic G is the difference between two minimum values.
Then we will use −2 log Λ as the test statistic for the GLRT. From the above observation that
Λ ≤ 1, we have −2 log Λ ≥ 0. If the dimensions of the parameter space is k , then the GLRT at
level α rejects H 0when
2
−2 log Λ ≥ χ ( α )
Hence χ 2 ( α ) is the upper α point of chi square distribution with k degrees of freedom.
For example, if the null hypothesis is that there are 5 elements of θ equals to zero then 4 is the
degrees of freedom.
8|P a g e
LIKELIHOOD RATIO TEST
Solution:
HYPOTHESIS:
H ∘ :θ ≤ θ∘
H 1 :θ >θ∘.
LEVEL OF SIGNIFICANCE:
P (λ (Y) ≤ a | H 0) = α.
The level-α GLRT will reject H 0when λ ≤ λ ο. C is chosen so that P H 0 [ λ ≤ λ ο] equals (or
approximately equals) to α.
COMPUTATIONS:
Then the pdf of exponential distribution will be given as: (A)
f ( x ; θ )=θ e−θx
n
L ( x ; θ ) =∏ θ e
−θxi
l (θ )=log ( θ n e−θΣxi )
9|P a g e
LIKELIHOOD RATIO TEST
∂l ( θ ) n
= −Σxi ( 2 )
∂ (θ) θ
∂l ( θ )
=0
∂ (θ)
We have,
n
−Σxi=0
θ^
n
= Σxi
θ^
n ^
=θ
Σxi
Or
^ 1
θ=
x
∂2 l ( θ ) −n
2
= 2 <0
∂ (θ) θ
1
Hence is the mle of θ .
x
^ 1n
l ( θ )= exp −
x [() ]
1
x
( Σxi )
10 | P a g e
LIKELIHOOD RATIO TEST
λ=θ° en −θ ° Σxi 1n
/ exp −
x
1
x [() ]
( Σxi )
λ=θ° e
n −θ ° Σxi −n
/ x exp [ ]
−Σxi
x
θ °n
λ= exp (−n ) [ θ° x−1 ]
x−n
λ=¿
Let y=θ° x
λ =¿
DECISION RULE:
1 θ °n 1
λ ( x 1 , x 1 , … , xn )={1 ≤θ ο dont reject H 0 −n exp [−θ° n x +n ] > θο reject H 0
x x x
If 0< λο <1 ,then a generalized likelihood ratio test is given by the following: reject H ο if λ ≤ λ οor
1
Reject H ο if >θο and ¿
x
Then we can write this non-randomized test (LRT) by using the critical function
CRITICAL FUNCTION:
ψ ( x 1 , x 2 ,… , xn ) ={0 ¿
We see that the generalized likelihood ratio test reduces to the following:
11 | P a g e
LIKELIHOOD RATIO TEST
Example 1:
Derive the likelihood ratio test for H0: μ ≤ μ 0versus H1: μ¿μ0, when the population is
normal and population variance σ2 is known.
Solution:
HYPOTHESES:
H ° :μ≤μ0 where σ 2 is known
H 1 : μ> μ 0
LEVEL OF SIGNIFICANCE
P (λ (Y) ≤ a| H 0) = α.
The level-α GLRT will reject H 0when λ ≤ λ ο. c is chosen so that P H 0 [ λ ≤ λ ο] equals (or
approximately equals) to α.
TEST STATISTIC:
L (ϖ )
Λ=λ= ∨ Λ=L ( μ ° )/ L ( μ^ ) (A)
L (Ω)
COMPUTATION
The pdf of normal distribution will be as follows:
1
f ( x ; μ , σ )=
2
exp ¿
√ 2 π σ2
First derive the likelihood function of distribution
n
L ( x ; μ , σ ) =∏ f ( xi; μ , σ )
2 2
n
1
L ( x ; μ , σ )=∏
2
exp ¿ ¿
i √2 π σ 2
L ( x ; μ , σ 2 ) =¿
12 | P a g e
LIKELIHOOD RATIO TEST
−n n 1
l ( μ , σ )=
2 2
log σ − log (2 π )− 2 Σ ¿
2 2 2σ
−n n 1
l ( μ , σ )=
2 2
log σ − log (2 π )− ¿
2 2 2
∂l ( μ , σ 2 ) 1
=0−0− 2 Σ 2 ¿
∂μ 2σ
∂l ( μ , σ 2 ) 1
= 2 Σ ¿= Σ xi−nμ/σ 2 (2)
∂μ σ
∂l ( μ , σ 2 )
=0
∂μ
Σ xi−n μ^
We have, => =0 => Σ xi−n ^μ=0=¿ Σxi=n μ^
σ2
This is the candidate of MLE so we will go for second order condition from equation 1
∂2 l ( μ , σ 2 ) 1 −n
( 0−n ) = 2 < 0 hence X is the MLE of μ
2 = 2
∂ μ σ σ
L ( μ^ )=¿
13 | P a g e
LIKELIHOOD RATIO TEST
L( ϖ ) =
λ= L ( μ° )/ L ( μ^ )= ¿/¿
^)
L( Ω
λ = L ( μ° )/ L ( μ^ ) =exp ¿* exp ¿
L ( μ° )/ L ( μ^ )=exp ¿
Consider Σ ¿
λ = Σ ( xi−x ¿ ¿2 + Σ ¿ ( xi−x ¿ ¿2 ¿
λ=n ¿
λ =exp ¿ =exp ¿
DECISION RULE:
λ ( x )={1 x ≤ μ ο exp ¿
Note that by GLRT we will reject null the hypothesis if λ ( x ) <c where is some constant lie
between0< c<1
ψ ( x 1 , x 2 ,… , xn ) ={0 exp ¿
Example 2:
Derive the likelihood ratio test by testing the hypothesis for H 0: μ¿ μ0versus H1: μ≠ μ0
, when x 1 , x 2 , … , x n be a random sample drawn from anormal distribution with mean
μand variance σ2is unknown.
Solution:
14 | P a g e
LIKELIHOOD RATIO TEST
HYPOTHESIS:
H 0 :μ¿ μ0; σ2> 0
H 1 : μ ≠ μ0 ; σ2< 0
LEVEL OF SIGNIFICANCE
P (λ(Y) ≤ a | H 0) = α.
The level-α GLRT will reject H 0when λ ≤ λ ο. c is chosen so that P H 0 [ λ ≤ λ ο] equals (or
approximately equals) to α.
TEST STATISTIC:
L (ϖ )
Λ=λ= ∨ Λ=L ( μ ° )/ L ( μ^ )(A)
L (Ω)
COMPUTATION
The pdf of normal distribution will be as follows:
1
f ( x ; μ , σ )=
2
exp ¿
√ 2 π σ2
First derive the likelihood function of distribution
n
L ( x ; μ , σ ) =∏ f ( xi; μ , σ 2 )
2
n
1
L ( x ; μ , σ )=∏
2
exp ¿ ¿
i √2π σ2
L ( x ; μ , σ ) =¿
2
−n n 1
l ( μ , σ )=
2 2
log σ − log (2 π )− 2 Σ ¿
2 2 2σ
15 | P a g e
LIKELIHOOD RATIO TEST
−n n 1
l ( μ , σ 2 )= log σ 2− log (2 π )− ¿
2 2 2
∂l ( μ , σ )
2
1
=0−0− 2 Σ 2 ¿
∂μ 2σ
∂l ( μ , σ ) 1
2
= 2 Σ ¿= Σ xi−nμ/σ 2 (4)
∂μ σ
∂l ( μ , σ 2 )
=0
∂μ
Σ xi−n μ^
We have, => =0 => Σ xi−n ^μ=0=¿ Σxi=n μ^
σ2
This is the candidate of MLE so we will go for second order condition from the equation
∂ l (μ,σ )
2 2
1
= ( 0−n )
∂2 μ σ2
n
¿− 2 <0 hence X is the MLE of μ
σ
∂l ( μ , σ 2 ) −n 1
∂σ
2
=
2 σ 2 ( ) 1
( 1 )−0− Σ¿
2
−n
= + Σ ¿¿
2 σ2
−n
= 2+ Σ ¿ ¿
2σ
−1
= (n- Σ ¿ ¿)
2 σ2
16 | P a g e
LIKELIHOOD RATIO TEST
∂l ( μ , σ )
2
2
=0
∂σ
−1
We have, => 2 (n- Σ ¿ ¿) =0
2σ
n- Σ ¿ ¿ =0
n =Σ ¿ ¿
σ^ =Σ¿ ¿
2
σ^2=Σ¿ ¿
This is the candidate of MLE, so we will go for second order condition from equation
∂2 l ( μ , σ 2 )
2 2 =−Σ ¿ ¿
∂σ
¿−Σ¿ ¿
n S2 n
¿− +
S
2
2¿¿
n
¿
¿¿
n
¿− <0
¿¿
17 | P a g e
LIKELIHOOD RATIO TEST
L ( ^μ , σ^ ) =¿
2
L( ϖ )
^ ) = L μ , σ / L ( ^μ , σ )
λ= ( 2) ^2
L( Ω
λ =¿/¿
λ = L ( μ , σ 2 )/ L ( ^μ , σ^2 )=¿ ¿
Consider Σ ¿
Σ ¿= Σ ( xi−x ¿ ¿2 +n ¿( xi−x ¿ ¿2 ¿
As we know that sum of square deviation from its mean is zero so,
Σ ¿= Σ ( xi−x ¿ ¿2 +n ¿
λ =¿
=(1+n ¿ ¿ ¿
DECISION RULE:
Note that by GLRT we will reject null hypothesis if λ ( x ) <c where is some constant lie between
0< c<1 OR
As 0< Λ <1because Θo ⊂Θ , thus when Λ< c we would reject H ° ,where c < 1 is a constant.
So,
(1+ n ¿ ¿ ¿
(1+n ¿ ¿
n¿¿
n¿¿
n¿¿
18 | P a g e
LIKELIHOOD RATIO TEST
n ¿ ¿)
¿ ¿)
√¿ ¿¿
|x−μ ο|
S
n
√
≥ (n−1)( c ¿ ¿
−n
2
−1)¿
√
t ≥ (n−1)(c ¿ ¿
−n
2
−1) ¿
√ (n−1)(c ¿ ¿
−n
2
t
−1) ¿ = α2 ,n−1
−n 2
(n−1)( c ¿ ¿ −1)¿= t α ,n−1
2 2
2
−n tα
c −1=
, n−1
2 2
n−1
−n t 2α
c = +1
, n−1
2 2
n−1
2
tα −2
c= ( 2
, n−1
+1¿ ¿ n
n−1
Example 3:
Suppose that an engineer wishes to compare the number of the complaints per week
that is filled by union stewards for two different shifts at a manufacturing plant.
19 | P a g e
LIKELIHOOD RATIO TEST
There are 100 independent observations on the number of the complaints gave mean
x=20 for the 1 shift and y=22 for 2 shift. Assume that the number of complaints per
week on the ith shift has a poisson distribution with mean θi for i=1,2. Use likelihood
ratio test method to test the hypothesis H o :θ1=θ 2 verse H 1 :θ 1 ≠ θ2 with significance
level ¿ 0.01 .
SOLUTION:
HYPOTHESIS:
H ° :θ=θO
H 1 :θ ≠ θO
LEVEL OF SIGNIFICANCE
P (λ(Y) ≤ a| H 0) = α=0.01.
The level-α GLRT will reject H 0when θ ≤ θ ο. c is chosen so that P H 0 [θ ≤ θ ο] equals (or
approximately equals) to α.
TEST STATISTIC:
L (ϖ)
Λ=λ= ∨ Λ=L ( θ° )/ L ( θ^ ) (1)
L (Ω)
COMPUTATION
The pdf of Poisson Distribution will be as follows:
e λ λx eλ λ y
f ( x : λ)= And f ( y : λ )=
x! y!
So the likelihood function for joint probability function of x i ' sand y i ' s is given as
n −θ 1 x n −θ2 y
e θ1 e θ2
L ( θ1 ,θ 2) =∏ ∏
i=1 x! i=1 y!
θ1 ∑ e θ2 ∑
−n θ1 xi −n θ2 yi
e
= n n
∏ x! ∏ y!
i=1 i=1
1 −n θ ∑ x −n θ ∑ y
= e θ1 e θ 21 i 2 i
20 | P a g e
LIKELIHOOD RATIO TEST
n n
Where k=∏ x ! ∏ y !
i=1 i=1
For the numerator of equation (1), θ1=θ 2=θ whereθ is unknown so the likelihood function of a
single parameterθ is
1
L ( θ° ) = e−nθ θ∑ x e−nθ θ∑ y i i
1 −2 nθ ∑ x + ∑ y
= e θ i i
∑ xi ∑y 1
i=1
+ i=1 = (x + y )
n n 2
^
θ=
2
^ 1 (20+22) =21
θ=
2
Fro For the denominator of equation (1), θ1 ≠θ 2 and also θ1 >0 , θ2 >0 . So the MLE of L ( θ1 ,θ 2) is
maximized when θ^ 1= xand θ^ 2= y . So the denominator becomes
1 −n θ^
L ( θ^ ) = e θ^ 1∑ e θ^ 2∑
x −n ^θ
1 y i 2 i
1
−n x ∑ x −n y ∑ y
= e x e y i i
1
−n (x+ y) n x n y
= e x y
k
1 −2 n θ^ ^ ∑ x +∑ y
e θ i i
^ k
Λ=L ( θ ° )/ L ( θ ) =
1 −n (x+ y) n x n y
e x y
k
^
( θ)
n x+n y
=
( x ¿) ( y ¿)n y ¿ ¿
nx
21 | P a g e
LIKELIHOOD RATIO TEST
^
By putting the values of x=20 , y=22 , n=100 and θ=21, the observed value of Λ becomes
(21)100(20 +22)
Λ=
(20)100(20 )(22)100(22)
=9.53
In this r=2 and r o =1 , as the approximate distribution of -2log Λ is a χ 2 with degree of freedom
v= r-r o =1.
DECISION RULE:
so,
9.53 ≥ 6.635
CONCLUSION:
So we reject null hypothesis conclude that the number of complaints filed by the union
stewards do differ at the significance level of α =0.01
REFERENCES
https://sites.warnercnr.colostate.edu/gwhite/wp-content/uploads/sites/73/2017/04/LikelihoodRatioTests.pdf
https://www.statlect.com/fundamentals-of-statistics/likelihood-ratio-test
http://fisher.stats.uwo.ca/faculty/kulperger/SS3858/Handouts/ExponentialLikelihoodRatio.pdf
http://www.utstat.toronto.edu/burkett/sta442f15/STA442_7_LRTs.pdf
https://pdfs.semanticscholar.org/a7e8/2b5ddfd6100cf9d3ab4c1e79cfb0843f1755.pdf
22 | P a g e
LIKELIHOOD RATIO TEST
http://people.missouristate.edu/songfengzheng/Teaching/MTH541/Lecture%20notes/LRT.pdf
https://www.math.drexel.edu/~tolya/test%20for%20mean%20of%20a%20normal%20distribution.pdf
https://www.youtube.com/watch?v=VE6hjm5IUIo
https://www.youtube.com/watch?v=gUoM_6B-TVY
https://www.youtube.com/watch?v=xRVzo3J-IBw
https://www.youtube.com/watch?v=fVXA9CK-Nb0
https://www.youtube.com/watch?v=9RvLy554NnI
https://www.youtube.com/watch?v=yzO80fa0_Y4
http://www.stat.uchicago.edu/~yibi/teaching/stat226/lectures/C01.pdf
https://web.stanford.edu/class/archive/stats/stats200/stats200.1172/Lecture22.pdf
http://people.missouristate.edu/songfengzheng/Teaching/MTH541/Lecture%20notes/LRT.pdf
https://people.stat.sc.edu/habing/courses/703/GLRTExample.pdf
https://webspace.maths.qmul.ac.uk/b.bogacka/MS_Lectures_23and24.pdf
https://cpb-us-w2.wpmucdn.com/voices.uchicago.edu/dist/9/1193/files/2016/01/05a-CompositeHTests.pdf
http://people.musc.edu/~bandyopd/bmtry711.11/lecture_02.pdf
23 | P a g e