Likelihood Ratio Test(LRT)
Recall : L ( θ ; x ~ ) = f ( x ~ ; θ ) L(\theta;\utilde{x})=f(\utilde{x};\theta) L ( θ ; x ) = f ( x ; θ ) a function of θ \theta θ given x ~ \utilde{x} x . 在 θ \theta θ 下出現當前樣本的機率。
Note : MP test rejects H 0 = θ = θ 0 H_0=\theta=\theta_0 H 0 = θ = θ 0 if
f ( x ~ ; θ 1 ) > c ⋅ f ( x ~ ; θ 0 ) ⟺ L ( θ 1 ; x ~ ) > c ⋅ L ( θ 0 ; x ~ ) ⟺ L ( θ 0 ; x ~ ) L ( θ 1 ; x ~ ) < 1 c = c ′ ⟺ L ( θ 0 ; x ~ ) max { L ( θ 0 ; x ~ ) , L ( θ 1 ; x ~ ) } < k some k ∈ [ 0 , 1 ] = { L ( θ 0 ; x ~ ) L ( θ 1 ; x ~ ) if L ( θ 1 ; x ~ ) ≥ L ( θ 0 ; x ~ ) 1 if L ( θ 1 ; x ~ ) < L ( θ 0 ; x ~ ) ⟺ sup θ ∈ ω 0 L ( θ ; x ~ ) sup θ ∈ Ω L ( θ ; x ~ ) < k Ω = ω 0 ∪ ω 1 and ω 0 = { θ 0 } , ω 1 = { θ 1 } \begin{align*}
&f(\utilde{x};\theta_1)>c\cdot f(\utilde{x};\theta_0)\\
\iff &L(\theta_1;\utilde{x})>c\cdot L(\theta_0;\utilde{x})\\
\iff &\frac{L(\theta_0;\utilde{x})}{L(\theta_1;\utilde{x})}<\frac{1}{c}=c'\\
\iff &\frac{L(\theta_0;\utilde{x})}{\max\set{L(\theta_0;\utilde{x}), L(\theta_1;\utilde{x})}}<k\quad\text{some } k\in[0,1]\\
&=\begin{cases}
\frac{L(\theta_0;\utilde{x})}{L(\theta_1;\utilde{x})} &\text{if } L(\theta_1;\utilde{x}) \ge L(\theta_0;\utilde{x})\\
1 &\text{if } L(\theta_1;\utilde{x})<L(\theta_0;\utilde{x})
\end{cases}\\
\iff &\frac{\sup_{\theta\in\omega_0 L(\theta;\utilde{x})}}{\sup_{\theta\in\Omega L(\theta;\utilde{x})}}<k \quad \Omega=\omega_0\cup\omega_1\text{ and } \omega_0=\set{\theta_0}, \omega_1=\set{\theta_1}
\end{align*} ⟺ ⟺ ⟺ ⟺ f ( x ; θ 1 ) > c ⋅ f ( x ; θ 0 ) L ( θ 1 ; x ) > c ⋅ L ( θ 0 ; x ) L ( θ 1 ; x ) L ( θ 0 ; x ) < c 1 = c ′ max { L ( θ 0 ; x ) , L ( θ 1 ; x ) } L ( θ 0 ; x ) < k some k ∈ [ 0 , 1 ] = { L ( θ 1 ; x ) L ( θ 0 ; x ) 1 if L ( θ 1 ; x ) ≥ L ( θ 0 ; x ) if L ( θ 1 ; x ) < L ( θ 0 ; x ) sup θ ∈ Ω L ( θ ; x ) sup θ ∈ ω 0 L ( θ ; x ) < k Ω = ω 0 ∪ ω 1 and ω 0 = { θ 0 } , ω 1 = { θ 1 }
For testing H 0 : θ ∈ ω 0 H_0:\theta\in\omega_0 H 0 : θ ∈ ω 0 v.s. H 1 : θ ∈ ω 1 H_1:\theta\in\omega_1 H 1 : θ ∈ ω 1 , a LRT is a test which ϕ \phi ϕ rejects H 0 H_0 H 0 if λ ( x ~ ) < k \lambda(\utilde{x})<k λ ( x ) < k
with k ∈ [ 0 , 1 ] and λ ( x ~ ) = sup θ ∈ ω 0 L ( θ ; x ~ ) sup θ ∈ Ω L ( θ ; x ~ ) where Ω = ω 0 ∪ ω 1 \text{with }k\in[0,1]\text{ and }\lambda(\utilde{x})=\frac{\sup_{\theta\in\omega_0}L(\theta;\utilde{x})}{\sup_{\theta\in\Omega}L(\theta;\utilde{x})}\text{ where }\Omega=\omega_0\cup\omega_1 with k ∈ [ 0 , 1 ] and λ ( x ) = sup θ ∈ Ω L ( θ ; x ) sup θ ∈ ω 0 L ( θ ; x ) where Ω = ω 0 ∪ ω 1
A level α \alpha α LRT ⟹ \implies ⟹ k is determined by sup θ ∈ ω 0 E θ ϕ ( x ~ ) = α \sup_{\theta\in\omega_0}E_\theta\phi(\utilde{x})=\alpha sup θ ∈ ω 0 E θ ϕ ( x ) = α
EX X ∼ f ( x ; θ ) X\sim f(x;\theta) X ∼ f ( x ; θ )
H 0 : θ ∈ { θ 1 , θ 2 } v.s. H 1 : θ ∈ { θ 3 , θ 4 } H_0:\theta\in\set{\theta_1,\theta_2} \text{ v.s. }H_1:\theta\in\set{\theta_3,\theta_4} H 0 : θ ∈ { θ 1 , θ 2 } v.s. H 1 : θ ∈ { θ 3 , θ 4 }
with level 0.05
x 2 3 4 5 6 7 8 9 10 11 12 θ 1 \theta_1 θ 1 (0.01) (0.01) (0.01) (0.01) (0.01) (0.01) (0.01) (0.01) (0.01) (0.01) 0.90 θ 2 \theta_2 θ 2 (0.01) 0.009 0.008 0.007 0.006 0.005 0.006 0.007 0.008 0.009 [(0.925)] θ 3 \theta_3 θ 3 0.20 [0.10] [0.09] 0.08 0.06 0.05 [0.07] 0.05 0.05 [0.05] 0.20 θ 4 \theta_4 θ 4 [0.26] [0.10] [0.09] [0.11] [0.07] [0.08] [0.07] [0.06] [0.06] [0.05] 0.05 λ = \lambda= λ = 1 26 \frac{1}{26} 26 1 1 10 \frac{1}{10} 10 1 1 9 \frac{1}{9} 9 1 1 11 \frac{1}{11} 11 1 1 7 \frac{1}{7} 7 1 1 8 \frac{1}{8} 8 1 1 7 \frac{1}{7} 7 1 1 6 \frac{1}{6} 6 1 1 6 \frac{1}{6} 6 1 1 5 \frac{1}{5} 5 1 1 1 1
λ ( x ) = sup θ ∈ ω 0 L ( θ ; x ) sup θ ∈ Ω L ( θ ; x ) < k ⟹ k = 1 7 i.e. x = 2 , 3 , 4 , 5 , 7 \lambda(x)=\frac{\sup_{\theta\in\omega_0}L(\theta;x)}{\sup_{\theta\in\Omega}L(\theta;x)}<k\implies k=\frac{1}{7}\quad\text{i.e. }x=2,3,4,5,7 λ ( x ) = sup θ ∈ Ω L ( θ ; x ) sup θ ∈ ω 0 L ( θ ; x ) < k ⟹ k = 7 1 i.e. x = 2 , 3 , 4 , 5 , 7
P θ 1 ( x = 2 or 3 or 4 or 5 or 7 ) = 0.05 P_{\theta_1}(x=2\text{ or }3\text{ or }4\text{ or }5\text{ or }7)=0.05 P θ 1 ( x = 2 or 3 or 4 or 5 or 7 ) = 0.05
Note :
Let θ Ω ^ = arg sup θ ∈ Ω L ( θ ; x ~ ) , θ ω 0 ^ = arg sup θ ∈ ω 0 L ( θ ; x ~ ) \widehat{\theta_\Omega}=\arg\sup_{\theta\in\Omega}L(\theta;\utilde{x}), \widehat{\theta_{\omega_0}}=\arg\sup_{\theta\in\omega_0}L(\theta;\utilde{x}) θ Ω = arg sup θ ∈ Ω L ( θ ; x ) , θ ω 0 = arg sup θ ∈ ω 0 L ( θ ; x )
⟹ λ ( x ~ ) = sup θ ∈ ω 0 L ( θ ; x ) sup θ ∈ Ω L ( θ ; x ) = L ( θ ω 0 ^ ; x ~ ) L ( θ Ω ^ ; x ~ ) \implies\lambda(\utilde{x})=\frac{\sup_{\theta\in\omega_0}L(\theta;x)}{\sup_{\theta\in\Omega}L(\theta;x)}=\frac{L(\widehat{\theta_{\omega_0}};\utilde{x})}{L(\widehat{\theta_\Omega};\utilde{x})} ⟹ λ ( x ) = sup θ ∈ Ω L ( θ ; x ) sup θ ∈ ω 0 L ( θ ; x ) = L ( θ Ω ; x ) L ( θ ω 0 ; x )
T = T ( X ~ ) T=T(\utilde{X}) T = T ( X ) is sufficient for θ \theta θ
⟹ f ( x ~ ; θ ) = g ( t ; θ ) h ( x ~ ) \implies f(\utilde{x};\theta)=g(t;\theta)h(\utilde{x}) ⟹ f ( x ; θ ) = g ( t ; θ ) h ( x )
如果最大值發生在 ω 0 \omega_0 ω 0 ,那麼 λ ( x ~ ) = 1 \lambda(\utilde{x})=1 λ ( x ) = 1 ;如果最大值發生在 ω 1 \omega_1 ω 1 ,那麼 ω 0 \omega_0 ω 0 的最大值會發生在邊界 ∂ ( ω 0 ) \partial(\omega_0) ∂ ( ω 0 ) 上。
λ ( x ~ ) = g ( t ; θ ω 0 ^ ) g ( t ; θ Ω ^ ) = { 1 if θ Ω ^ ∈ ω 0 g ( t ; ∂ ( ω 0 ) ) g ( t ; θ Ω ^ ) if θ Ω ^ ∈ ω 1 \begin{align*}
\lambda(\utilde{x})&=\frac{g(t;\widehat{\theta_{\omega_0}})}{g(t;\widehat{\theta_\Omega})}\\
&=\begin{cases}
1 &\text{if } \widehat{\theta_\Omega}\in\omega_0\\
\frac{g(t;\partial(\omega_0))}{g(t;\widehat{\theta_\Omega})} &\text{if } \widehat{\theta_\Omega}\in\omega_1
\end{cases}
\end{align*} λ ( x ) = g ( t ; θ Ω ) g ( t ; θ ω 0 ) = { 1 g ( t ; θ Ω ) g ( t ; ∂ ( ω 0 )) if θ Ω ∈ ω 0 if θ Ω ∈ ω 1
EX : X 1 , ⋯ , X n ∼ iid N ( θ , σ 0 2 ) X_1, \cdots, X_n\overset{\text{iid}}{\sim} N(\theta, \sigma^2_0) X 1 , ⋯ , X n ∼ iid N ( θ , σ 0 2 ) , to test
H 0 : θ = θ 0 v.s. H 1 : θ ≠ θ 0 H_0:\theta=\theta_0\quad\text{ v.s. }\quad H_1:\theta\ne\theta_0 H 0 : θ = θ 0 v.s. H 1 : θ = θ 0
note that ω 0 = { θ 0 } ⟹ θ ω 0 ^ = θ 0 \omega_0=\set{\theta_0}\implies\widehat{\theta_{\omega_0}}=\theta_0 ω 0 = { θ 0 } ⟹ θ ω 0 = θ 0 and Ω = { θ 0 } ∪ { θ : θ ≠ θ } = R ⟹ θ Ω ^ = x ˉ \Omega=\set{\theta_0}\cup\set{\theta:\theta\neq\theta}=\R\implies\widehat{\theta_\Omega}=\bar{x} Ω = { θ 0 } ∪ { θ : θ = θ } = R ⟹ θ Ω = x ˉ 因為 x ˉ \bar{x} x ˉ 是平均的 MLE。
⟹