跳至主要内容

複合假設(Composite Hypothese)

單邊問題(One-Sided Problem)

在做 simple H0H_0 和 simple H1H_1 的檢定時,N-P Lemma 可以直接給我們一個 MP 檢定。而它還可以幫我們找到某些 composite H0H_0 和 composite H1H_1 的 UMP 檢定。

對於 H0:θω0H_0: \theta\in\omega_0 v.s. H1:θω1H_1: \theta\in\omega_1。因爲 N-P lemma 告訴我們,在 level α\alpha 下找到的 MP test,對於 level <α<\alpha 時也會是 MP test。那麼如果還有 θω1\forall \theta\in\omega_1 可以得到同一個 ϕ\phi,那麼就可以把複雜的檢定變成簡單的檢定,並使用 N-P Lemma。

記得 f(X~;θ)=g(T:θ)h(X~)f(\utilde{X};\theta)=g(T:\theta)h(\utilde{X}) with T=T(X~)T=T(\utilde{X})θ\theta 的 sufficient statistic,並且我們可以讓 g(T;θ)g(T;\theta) 是 pdf。

因此如果一個滿足 N-P Lemma 的檢定函數,i.e. 拒絕 H0    f(x~;θ1)>cf(x~;θ0)    g(t;θ1)>cg(t;θ0)H_0\iff f(\utilde{x};\theta_1)>cf(\utilde{x};\theta_0)\iff g(t;\theta_1)>cg(t;\theta_0)


EX: X1,,XniidN(θ,σ02)X_1, \cdots, X_n \overset{\text{iid}}{\sim}N(\theta, \sigma^2_0)

H0:θ=θ0 v.s. H1:θ=θ1H_0:\theta=\theta_0 \text{ v.s. } H_1:\theta=\theta_1

    \implies MP level α\alpha 檢定是:拒絕 H0H_0 if Xˉθ0σ0/n>Zα\frac{\bar{X}-\theta_0}{\sigma_0/\sqrt{n}}>Z_\alpha。這對於任何 θ1>θ0\theta_1>\theta_0 都適用。

注意到

Eθϕ(X~)=Pθ(Xˉθ0σ0/n>Zα)=1Φ(nσ2(θ0θ)+Zα)    ddθEθϕ(X~)=nσ0ϕ(nσ0(θ0θ)+Zα)>0    supθθ0Eθϕ(X~)=Eθ0ϕ(X~)=αi.e. ϕ is level α test for H0:θθ0    For testing H0:θθ0 v.s. H1:θ>θ0, we can use the same ϕ\begin{align*} &E_\theta\phi(\utilde{X})=P_\theta\left(\frac{\bar{X}-\theta_0}{\sigma_0/\sqrt{n}}>Z_\alpha\right)=1-\Phi(\frac{\sqrt{n}}{\sigma^2}(\theta_0-\theta)+Z_\alpha)\\ \implies& \frac{d}{d\theta} E_\theta\phi(\utilde{X})=\frac{\sqrt{n}}{\sigma_0}\phi(\frac{\sqrt{n}}{\sigma_0}(\theta_0-\theta)+Z_\alpha)>0\\ \implies& \sup_{\theta\le\theta_0}E_\theta \phi(\utilde{X})=E_{\theta_0}\phi(\utilde{X})=\alpha\\ & \text{i.e. }\phi\text{ is level }\alpha\text{ test for }H^*_0:\theta\le\theta_0\\ \implies& \text{For testing }H_0:\theta\le\theta_0\text{ v.s. }H_1:\theta>\theta_0\text{, we can use the same }\phi \end{align*}
Theorem

X~f(x~;θ),θΩ\utilde{X}\sim f(\utilde{x};\theta), \theta\in\Omega, let T=T(X~)T=T(\utilde{X}) be suff for θ\theta and g(t;θ)g(t;\theta) be its pdf.

Given ω0Ω,ω1Ω\omega_0\subset\Omega, \omega_1\subset\Omega with ω0ω1=\omega_0\cap\omega_1=\empty.

For tesing H0:θω0H_0: \theta\in\omega_0 v.s. H1:θω1H_1: \theta\in\omega_1. Suppose a test ϕ(T)\phi(T) with:

  1. supθω0Eθϕ(t)=α\sup_{\theta\in\omega_0}E_\theta\phi(t)=\alpha
  2. θ0ω0\exist \theta_0\in\omega_0 s.t. Eθ0ϕ(T)=αE_{\theta_0}\phi(T)=\alpha and θω1,c>0\forall \theta\in\omega_1, \exist c>0 s.t. ϕ(T)={1if g(t;θ1)>cg(t;θ0)0if g(t;θ1)<cg(t;θ0) \phi(T)=\begin{cases} 1 & \text{if } g(t;\theta_1)>cg(t;\theta_0)\\ 0 & \text{if } g(t;\theta_1)<cg(t;\theta_0) \end{cases}

    \implies ϕ(T)\phi(T) is UMP level α\alpha test.

Note: θω1\forall \theta\in\omega_1 find the same ϕ\phi

MLR

Definition

Monotone Likelihood Ratio (MLR):

X~f(x~;θ),θωR\utilde{X}\sim f(\utilde{x};\theta), \theta\in\omega\subset\R and T=T(X~)T=T(\utilde{X}) is suff for θ\theta with pdf g(t;θ)g(t;\theta).

Suppose θ2>θ1\forall \theta_2>\theta_1

f(x~;θ2)f(x~;θ1)=g(t;θ2)g(t;θ1)is monotone in v(t)\frac{f(\utilde{x};\theta_2)}{f(\utilde{x};\theta_1)}=\frac{g(t;\theta_2)}{g(t;\theta_1)} \quad \text{is monotone in } v(t)

    f(x~;θ)\implies f(\utilde{x};\theta) (or g(t;θ)g(t;\theta)) has MLR.

假設 ff 有 MLR, f(x~;θ1)>cf(x~;θ0)    f(x~;θ1)/f(x~;θ0)>cf(\utilde{x};\theta_1)>cf(\utilde{x};\theta_0) \iff f(\utilde{x};\theta_1)/f(\utilde{x};\theta_0)>c

  1. 如果 θ1>θ0\theta_1>\theta_0,則 g(t;θ1)/g(t;θ0)g(t;\theta_1)/g(t;\theta_0) 是單調遞增的,i.e. v(t)v(t) 越大,g(t;θ1)/g(t;θ0)g(t;\theta_1)/g(t;\theta_0) 越大。
  2. 如果 θ1<θ0\theta_1<\theta_0,則 g(t;θ1)/g(t;θ0)g(t;\theta_1)/g(t;\theta_0) 是單調遞減的,i.e. v(t)v(t) 越小,g(t;θ1)/g(t;θ0)g(t;\theta_1)/g(t;\theta_0) 越大。

k\exist k s.t.

    {v(t)>kif θ1>θ0v(t)<kif θ1<θ0\iff \begin{cases} v(t)>k & \text{if } \theta_1>\theta_0\\ v(t)<k & \text{if } \theta_1<\theta_0 \end{cases}

因此當在 v(t)v(t) 下具有 MLR 時,作檢定:

  1. H0:θ=θ0H_0:\theta=\theta_0 v.s. H1:θ=θ1H_1:\theta=\theta_1 (θ1>θ0\theta_1>\theta_0)

    拒絕 H0H_0 if v(T)>kv(T)>k 會是 MP 檢定。

  2. H0:θ=θ0H_0:\theta=\theta_0 v.s. H1:θ=θ1H_1:\theta=\theta_1 (θ1<θ0\theta_1<\theta_0)

    拒絕 H0H_0 if v(T)<kv(T)<k 會是 MP 檢定。

Theorem

X~f(x~;θ),T=T(X~)\utilde{X}\sim f(\utilde{x};\theta), T=T(\utilde{X}) is suff for θ\theta with pdf g(t;θ)g(t;\theta) has MLR in v(t)v(t). Then for test:

  1. H0:θ=θ0H_0:\theta=\theta_0 v.s. H1:θ=θ1H_1:\theta=\theta_1 (θ1>θ0\theta_1>\theta_0)

    ϕ(X~)=ϕ(T)={1if v(T)>k0if v(T)<kwith Eθ0ϕ(T)=α \phi(\utilde{X})=\phi(T)=\begin{cases} 1 & \text{if } v(T)>k\\ 0 & \text{if } v(T)<k \end{cases} \quad \text{with } E_{\theta_0}\phi(T)=\alpha

    is UMP level α\alpha test.

  2. H0:θ=θ0H_0: \theta=\theta_0 v.s. H1:θ>θ0H_1:\theta>\theta_0 UMP level α\alpha test is also ϕ(T)\phi(T) in (1).

  3. H0:θθ0H_0: \theta\le\theta_0 v.s. H1:θ>θ0H_1:\theta>\theta_0 UMP level α\alpha test is also ϕ(T)\phi(T) in (1)

    and its power function \nearrow in θ\theta.

  4. H0:θθ0H_0: \theta\ge\theta_0 v.s. H1:θ<θ0H_1:\theta<\theta_0

    UMP level α\alpha test is

    ϕ(X~)={1if v(T)<k0if v(T)>k \phi(\utilde{X})=\begin{cases} 1 & \text{if } v(T)<k\\ 0 & \text{if } v(T)>k \end{cases}

    and its power function \searrow in θ\theta.

EX: X1,,Xniide(xθ),xθX_1, \cdots, X_n\overset{\text{iid}}{\sim}e^{-(x-\theta)}, x\ge\theta

UMP level α\alpha test for H0:θθ0H_0:\theta\le\theta_0 v.s. H1:θ>θ0H_1:\theta>\theta_0

Note:

f(x~;θ)=i=1ne(xiθ)I(xiθ)=exi+nθI(x(1)θ)f(\utilde{x};\theta)=\prod_{i=1}^ne^{-(x_i-\theta)}I(x_i\ge\theta)=e^{-\sum x_i+n\theta}I(x_{(1)}\ge\theta)     θ2>θ1,f(x~;θ2)f(x~;θ1)=en(θ2θ1)I(x(1)θ2)I(x(1)θ1) is monotone in x(1)\implies \forall\theta_2>\theta_1, \frac{f(\utilde{x};\theta_2)}{f(\utilde{x};\theta_1)}=e^{n(\theta_2-\theta_1)}\frac{I(x_{(1)}\ge\theta_2)}{I(x_{(1)}\ge\theta_1)}\text{ is monotone in } x_{(1)}

i.e. f(x~;θ)f(\utilde{x};\theta) has MLR in x(1)x_{(1)}. UMP level α\alpha test is:

ϕ(x~)=x(1)~={1if x(1)>krif x(1)=k0if x(1)<k\phi(\utilde{x})=\utilde{x_{(1)}}=\begin{cases} 1 & \text{if } x_{(1)}>k\\ r & \text{if } x_{(1)}=k\\ 0 & \text{if } x_{(1)}< k \end{cases} s.t. α=Eθ0ϕ(x~)=Pθ0(x(1)>k)+rPθ0(x(1)=k)=Pθ0(xi>k,i)=iid[Pθ0(x1>k)]n=[ke(xθ0)dx]n=[eθ0(exk)]n=enθ0nk    k=θ0lnαn\begin{align*} \text{s.t. } \alpha&=E_{\theta_0}\phi(\utilde{x})=P_{\theta_0}(x_{(1)}>k)+r\cdot P_{\theta_0}(x_{(1)}=k)\\ &=P_{\theta_0}(x_i>k, \forall i)\xlongequal{\text{iid}}\left[P_{\theta_0}(x_1>k)\right]^n\\ &=\left[\int_k^\infty e^{-(x-\theta_0)}dx\right]^n=\left[e^{\theta_0}(-e^{-x}|_k^\infty)\right]^n\\ &=e^{n\theta_0-nk}\\ \implies k&=\theta_0-\frac{\ln \alpha}{n} \end{align*}

因此 UMP level α\alpha test 是:拒絕 H0H_0 if x(1)>θ0lnαnx_{(1)}>\theta_0-\frac{\ln \alpha}{n}


當假設檢定的對立假設是 H1:θ>θ0H_1:\theta>\theta_0H1:θ<θ0H_1:\theta<\theta_0 時,稱為單邊(One-Sided)檢定。

而對立假設是 H1:θθ0H_1:\theta\neq\theta_0H1:θ<θ1H_1:\theta<\theta_1 or θ>θ2\theta>\theta_2 時,稱為雙邊(Two-Sided)檢定。

對於單邊檢定問題,如果有 MLR 性質,我們可以直接得到 UMP 檢定。並且拒絕 H0H_0 的範圍與 H1H_1 是“同方向”的。i.e.:

  • H1:θ>θ0H_1:\theta>\theta_0,拒絕 H0H_0 if v(T)>kv(T)>k
  • H1:θ<θ0H_1:\theta<\theta_0,拒絕 H0H_0 if v(T)<kv(T)<k

1-par exp family

如果 f(x~;θ)f(\utilde{x};\theta)\in 1-par exp family,i.e. f(x~;θ)=c(θ)exp(Q(θ)T(θ~))h(x~)f(\utilde{x};\theta)=c(\theta)\exp(Q(\theta)T(\utilde{\theta}))h(\utilde{x}) with X={x~;f(x~;θ)>0}θ\mathscr{X}=\set{\utilde{x};f(\utilde{x};\theta)>0}\perp\theta

    θ2>θ1,f(x~;θ2)f(x~;θ1)=c(θ2)c(θ1)exp(T(x~)(Q(θ2)Q(θ1)))\implies \forall\theta_2>\theta_1, \frac{f(\utilde{x};\theta_2)}{f(\utilde{x};\theta_1)}=\frac{c(\theta_2)}{c(\theta_1)}\exp\left(T(\utilde{x})(Q(\theta_2)-Q(\theta_1))\right)

注意到,如果對於所有 θ2>θ1\theta_2>\theta_1 都有 Q(θ2)Q(θ1)>0Q(\theta_2)-Q(\theta_1)>0,這代表 QQ 是單調遞增的,反之亦然。因此:

  • 如果 QQ 遞增,那麼 ffTT 下具有 MLR。
  • 如果 QQ 遞減,那麼 ffT-T 下具有 MLR。
Theorem

ff\in 1-par exp family

  1. QQ 沿著 θ\theta 遞增     \implies ffTT 下具有 MLR

    1. H0:θ=()θ0H_0:\theta\overset{(\le)}{=}\theta_0 v.s. H1:θ>θ0H_1:\theta>\theta_0. ϕ(X~)={1if T(X~)>krif T(X~)=k0if T(X~)<k\phi(\utilde{X})=\begin{cases} 1 & \text{if } T(\utilde{X})>k\\ r & \text{if } T(\utilde{X})=k\\ 0 & \text{if } T(\utilde{X})<k \end{cases}
    2. H0:θ=()θ0H_0:\theta\overset{(\ge)}{=}\theta_0 v.s. H1:θ<θ0H_1:\theta<\theta_0.
    ϕ(X~)={1if T(X~)<krif T(X~)=k0if T(X~)>k\phi(\utilde{X})=\begin{cases} 1 & \text{if } T(\utilde{X})<k\\ r & \text{if } T(\utilde{X})=k\\ 0 & \text{if } T(\utilde{X})>k \end{cases}

    s.t. Eθ0ϕ(X~)=αE_{\theta_0}\phi(\utilde{X})=\alpha is UMP level α\alpha test.

  2. QQ 沿著 θ\theta 遞減     \implies ffT-T 下具有 MLR

    1. H0:θ=()θ0H_0:\theta\overset{(\le)}{=}\theta_0 v.s. H1:θ>θ0H_1:\theta>\theta_0. ϕ(X~)={1if T(X~)<krif T(X~)=k0if T(X~)>k\phi(\utilde{X})=\begin{cases} 1 & \text{if } T(\utilde{X})<k\\ r & \text{if } T(\utilde{X})=k\\ 0 & \text{if } T(\utilde{X})>k \end{cases}
    2. H0:θ=()θ0H_0:\theta\overset{(\ge)}{=}\theta_0 v.s. H1:θ<θ0H_1:\theta<\theta_0.
    ϕ(X~)={1if T(X~)>krif T(X~)=k0if T(X~)<k\phi(\utilde{X})=\begin{cases} 1 & \text{if } T(\utilde{X})>k\\ r & \text{if } T(\utilde{X})=k\\ 0 & \text{if } T(\utilde{X})<k \end{cases}

    s.t. Eθ0ϕ(X~)=αE_{\theta_0}\phi(\utilde{X})=\alpha is UMP level α\alpha test.

  3. H0:θθ1H_0:\theta\le\theta_1 or θθ2\theta\ge\theta_2 v.s. H1:θ1<θ<θ2H_1:\theta_1<\theta<\theta_2

    UMP level α\alpha test is

    ϕ(t)={1if k1<t<k2r1if t=k1r2if t=k20if t<k1 or t>k2 \phi(t)=\begin{cases} 1 & \text{if } k_1<t<k_2\\ r_1 & \text{if } t=k_1\\ r_2 & \text{if } t=k_2\\ 0 & \text{if } t<k_1\text{ or } t>k_2 \end{cases}

    s.t. Eθiϕ(T)=αE_{\theta_i}\phi(T)=\alpha

EX: X1,,XniidB(1,θ)X_1,\cdots, X_n\overset{\text{iid}}{\sim}B(1, \theta)

    f(x~;θ)=i=1nθxi(1θ)1xi=θt(1θ)ntwith t=xi=(1θ)n(θ1θ)t=c(θ)exp(tlnθ1θ) 1-par exp familywith Q(θ)=lnθ1θQ(θ)=1θ+11θ>0\begin{align*} \implies f(\utilde{x};\theta)&=\prod_{i=1}^n\theta^{x_i}(1-\theta)^{1-x_i}\\ &=\theta^t(1-\theta)^{n-t}\quad \text{with } t=\sum x_i\\ &=(1-\theta)^n\left(\frac{\theta}{1-\theta}\right)^t\\ &=c(\theta)\exp\left(t\ln\frac{\theta}{1-\theta}\right)\in \text{ 1-par exp family}\\ \text{with }Q(\theta)&=\ln\frac{\theta}{1-\theta}\quad Q'(\theta)=\frac{1}{\theta}+\frac{1}{1-\theta}>0 \end{align*}

因此 ffT=XiT=\sum X_i 下具有 MLR。對於檢定:

H0:θ(=)θ0 v.s. H1:θ>θ0H_0:\theta\overset{(=)}{\le}\theta_0\text{ v.s. }H_1:\theta>\theta_0

UMP level α\alpha test 是:

ϕ(t)={1if t>krif t=k0if t<k\phi(t)=\begin{cases} 1 & \text{if } t>k\\ r & \text{if } t=k\\ 0 & \text{if } t<k \end{cases}  with α=Eθ0ϕ(T)=Pθ0(T>k)+rPθ0(T=k)\text{ with } \alpha=E_{\theta_0}\phi(T)=P_{\theta_0}(T>k)+r\cdot P_{\theta_0}(T=k)

在樣本數比較大的情況下,我們難以計算 Pθ0(T>k)P_{\theta_0}(T>k)。我們可以用中央極限定理來近似到標準常態分佈,這樣就可以查表得到 kk

α=Pθ0(T>k)+rPθ0(T=k)=P(Tnθ0nθ0(1θ0)>knθ0nθ0(1θ0))+rP(Tnθ0nθ0(1θ0)=knθ0nθ0(1θ0))連續分佈的單點幾率為0P(Z>knθ0nθ0(1θ0))    knθ0nθ0(1θ0)=Zα    k=nθ0+Zαnθ0(1θ0)\begin{align*} \alpha&=P_{\theta_0}(T>k)+r\cdot P_{\theta_0}(T=k)\\ &=P\left(\frac{T-n\theta_0}{\sqrt{n\theta_0(1-\theta_0)}}>\frac{k-n\theta_0}{\sqrt{n\theta_0(1-\theta_0)}}\right)+r\cdot \underbrace{P\left(\frac{T-n\theta_0}{\sqrt{n\theta_0(1-\theta_0)}}=\frac{k-n\theta_0}{\sqrt{n\theta_0(1-\theta_0)}}\right)}_{\text{連續分佈的單點幾率為0}}\\ &\approx P(Z>\frac{k-n\theta_0}{\sqrt{n\theta_0(1-\theta_0)}})\\ &\implies \frac{k-n\theta_0}{\sqrt{n\theta_0(1-\theta_0)}}=Z_\alpha\\ &\implies k=n\theta_0+Z_\alpha\sqrt{n\theta_0(1-\theta_0)} \end{align*}
  • 假設 n=25,θ0=0.5,α=0.01n=25, \theta_0=0.5, \alpha=0.01

k=2512+Z0.012512122512+2.3318.3k=25\cdots\frac{1}{2}+Z_{0.01}\sqrt{25\cdot\frac{1}{2}\cdot\frac{1}{2}}\approx 25\cdot\frac{1}{2}+2.33\approx 18.3

    ϕ(t)={1if t>18.30if t<18.3={1if t=19,20,,250o.w.\implies \phi(t)=\begin{cases} 1 & \text{if } t>18.3\\ 0 & \text{if } t<18.3 \end{cases}=\begin{cases} 1 & \text{if } t=19, 20, \cdots, 25\\ 0 & \text{o.w.} \end{cases}

雙邊問題(Two-Sided Problem)

H0:θ=θ0 v.s. H1:θθ0H_0:\theta=\theta_0\text{ v.s. }H_1:\theta\neq\theta_0

or

H0:θ1θθ2 v.s. H1:θ<θ1 or θ>θ2H_0:\theta_1\le\theta_\le\theta_2 \text{ v.s. }H_1:\theta<\theta_1\text{ or }\theta>\theta_2

對於雙邊問題,UMP 檢定通常不存在(反例:U(0,θ)U(0, \theta)

EX: For 1-par exp family

f(x~θ)=c(θ)exp(Q(θ)T(x~))h(x~) with Q(θ) in θf(\utilde{x}\theta)=c(\theta)\exp(Q(\theta)T(\utilde{x}))h(\utilde{x})\quad\text{ with } Q(\theta)\nearrow \text{ in }\theta

    \implies UMP level α\alpha test for H0:θ=θ0H_0:\theta=\theta_0 v.s. H1:θ>θ0H_1:\theta>\theta_0 is: reject H0H_0 if T>k1T>k_1 with Eθ0ϕ1(T)=αE_{\theta_0}\phi_1(T)=\alpha

UMP level α\alpha test for H0:θ=θ0H_0:\theta=\theta_0 v.s. H1:θ<θ0H_1:\theta<\theta_0 is: reject H0H_0 if T<k2T<k_2 with Eθ0ϕ2(T)=αE_{\theta_0}\phi_2(T)=\alpha

    \implies UMP level α\alpha test for H0:θ=θ0H_0:\theta=\theta_0 v.s. H1θθ0H_1\theta\neq\theta_0 does not exist.

Idea: 假設 UMP test 存在,令 ϕ\phi^* 是 UMP test,並且 Eθ0ϕ=αE_{\theta_0}\phi^*=\alpha

因為是 UMP test,那麼 ϕ\phi^* 的 power 應該比其他任何 α\alpha test 都大,i.e. ϕ\forall \phi with Eθ0ϕ=αE_{\theta_0}\phi=\alpha,有 EθϕEθϕ,θθ0E_{\theta}\phi^*\ge E_{\theta}\phi, \forall\theta\neq\theta_0

H1H_1 所假設的範圍可以拆成 θ>θ0\theta>\theta_0θ<θ0\theta<\theta_0。因為 ϕ\phi^* 是 UMP test,那麼對於這兩個範圍的檢定,ϕ\phi^* 也應該是 UMP test。

這兩個範圍的 UMP test 分別是 ϕ1\phi_1ϕ2\phi_2。而 UMP test 通常 是唯一的,因此 ϕ=ϕ1=ϕ2\phi^*=\phi_1=\phi_2

ϕ1ϕ2\phi_1\neq\phi_2 是矛盾的,因此 UMP test 不存在。


EX X1,,XniidU(0,θ)X_1,\cdots,X_n\overset{\text{iid}}{\sim}U(0,\theta)

UMP level α\alpha test for H0:θ=θ0H_0:\theta=\theta_0 v.s. H1:θθ0H_1:\theta\neq\theta_0 exists and is given

  1. UMP level α\alpha test for H0:θ=θ0H_0:\theta=\theta_0 v.s. H1:θ>θ0H_1:\theta>\theta_0 is

    ϕ1(X(n))={1if x(n)>k10o.w.with α=Pθ0(X(n)>k1)=1Pθ0(X(n)k1)=1(k1θ0)n \phi_1(X_{(n)})=\begin{cases} 1 & \text{if } x_{(n)}>k_1\\ 0 & \text{o.w.} \end{cases} \quad \text{with } \begin{align*} \alpha&=P_{\theta_0}(X_{(n)}>k_1)\\ &=1-P_{\theta_0}(X_{(n)}\le k_1)\\ &=1-\left(\frac{k_1}{\theta_0}\right)^n \end{align*}     k1=θ0(1α)1/n\implies k_1=\theta_0(1-\alpha)^{1/n}

    and its power, θ>θ0\forall\theta>\theta_0

    Eθϕi(X(n))=Pθ(X(n)>θ0(1α)1/n)=1Pθ(X(n)θ0(1α)1/n)=1(θ0(1α)1/nθ)n=1(θ0θ)n(1α)θ>θ0Eθϕ(X(n))ϕ with Eθ0ϕ=α\begin{align*} E_\theta\phi_i(X_{(n)})&=P_\theta(X_{(n)}>\theta_0(1-\alpha)^{1/n})\\ &=1-P_\theta(X_{(n)}\le\theta_0(1-\alpha)^{1/n})\\ &=1-\left(\frac{\theta_0(1-\alpha)^{1/n}}{\theta}\right)^n\\ &=1-\left(\frac{\theta_0}{\theta}\right)^n(1-\alpha)\quad\forall\theta>\theta_0\\ &\ge E_\theta\phi(X_{(n)})\quad\forall\phi\text{ with }E_{\theta_0}\phi=\alpha \end{align*}
  2. UMP level α\alpha test H0:θ=θ0H_0:\theta=\theta_0 v.s. H1:θ<θ0H_1: \theta<\theta_0 is

    ϕ2(X(n))={1if x(n)<k20o.w.with α=Eθ0ϕ2(X(n))=Pθ0(X(n)<k2)=(k2θ0)n\phi_2(X_{(n)})=\begin{cases} 1 & \text{if } x_{(n)}<k_2\\ 0 & \text{o.w.} \end{cases} \quad\text{with }\begin{align*} \alpha&=E_{\theta_0}\phi_2(X_{(n)})\\ &=P_{\theta_0}(X_{(n)}<k_2)\\ &=\left(\frac{k_2}{\theta_0}\right)^n \end{align*}     k2=θ0α1/n\implies k_2=\theta_0\alpha^{1/n}

    with power, θ<θ0\forall\theta<\theta_0

    Eθϕ2(X(n))=Pθ(X(n)<θ0α1/n)={1if θθ0α1/n(θ0θ)nαif θ>θ0α1/nEθϕ(X(n))ϕ with Eθ0ϕ=α \begin{align*} E_\theta\phi_2(X_{(n)})&=P_\theta(X_{(n)}<\theta_0\alpha^{1/n})\\ &=\begin{cases} 1&\text{if }\theta\le\theta_0\alpha^{1/n}\\ \left(\frac{\theta_0}{\theta}\right)^n\alpha&\text{if }\theta>\theta_0\alpha^{1/n} \end{cases}\\ &\ge E_\theta\phi(X_{(n)})\quad\forall\phi\text{ with }E_{\theta_0}\phi=\alpha \end{align*}
  3. UMP level α\alpha test for H0:θ1θθ2H_0:\theta_1\le\theta\le\theta_2 v.s. H1:θθ2H_1:\theta\neq\theta_2 is

    ϕ(X(n))={1if x(n)>θ0 or x(n)<θ0α1/n0o.w. \phi(X_{(n)})=\begin{cases} 1 & \text{if } x_{(n)}>\theta_0\text{ or } x_{(n)}<\theta_0\alpha^{1/n}\\ 0 & \text{o.w.} \end{cases}     Eθ0ϕ(X(n))=Pθ0(X(n)>θ0)=0+Pθ0(X(n)<θ0α1/n)=(θ0α1/nθ0)n=α\implies E_{\theta_0}\phi(X_{(n)})=\underbrace{P_{\theta_0}(X_{(n)}>\theta_0)}_{=0}+P_{\theta_0}(X_{(n)}<\theta_0\alpha^{1/n})=\left(\frac{\theta_0\alpha^{1/n}}{\theta_0}\right)^n=\alpha

    and its power

    Eθϕ(X(n))=Pθ(X(n)>θ0)+Pθ(X(n)<θ0α1/n)={1(θ0θ)nif θ>θ0Eθϕ2(X(n))if θ<θ0α1/nEθϕ(X(n))ϕ with Eθ0ϕ=α\begin{align*} E_\theta\phi(X_{(n)})&=P_\theta(X_{(n)}>\theta_0)+P_\theta(X_{(n)}<\theta_0\alpha^{1/n})\\ &=\begin{cases} 1-\left(\frac{\theta_0}{\theta} \right)^n&\text{if }\theta>\theta_0\\ E_\theta\phi_2(X_{(n)})&\text{if }\theta<\theta_0\alpha^{1/n} \end{cases}\\ &\ge E_\theta\phi(X_{(n)})\quad\forall\phi\text{ with }E_{\theta_0}\phi=\alpha \end{align*}

EX:

UMPU Test

Definition
  1. A level α\alpha test ϕ\phi for H0:θω0H_0:\theta\in\omega_0 v.s. H1:θω1H_1:\theta\in\omega_1 is said to be unbiased if Eθϕ(x~)αθω1 E_\theta\phi(\utilde{x})\ge\alpha\quad\forall\theta\in\omega_1
  2. ϕ\phi^* is UMPU levet α\alpha test     ϕ\iff\phi^* is UMP level α\alpha test among unbiased test

我們可以找一個一定無偏的 test ϕα=α\phi_\alpha=\alpha,使得 Eθ[ϕα]=α,θE_\theta[\phi_\alpha]=\alpha, \forall\theta。因為 UMP test ϕ\phi^* 的 power 比任何 α\alpha test 都大,i.e. θω1,Eθ[ϕ]Eθ[ϕα]=α\forall\theta\in\omega_1, E_\theta[\phi^*]\ge E_\theta[\phi_\alpha]=\alpha。因此 UMP test 一定是 UMPU test。

而在單邊問題下,如果有 MLR,那麼我們可以直接得到 UMP test,也就是 UMPU test。所以 UMPU 的理論結果只討論在雙邊問題下。

Theorem

Let T=T(X~)T=T(\utilde{X}) be sufficient for ηR\eta\in\R with p.d.f. g(t;η)=c(η)exp(ηt)h(t)g(t;\eta)=c(\eta)\exp(\eta\cdot t)h(t)\in 1-par exp family.

  1. H0:η=η0H_0:\eta=\eta_0 v.s. H1:ηη0H_1:\eta\neq\eta_0

    UMPU level α\alpha test exists and is given

    ϕ1(T)={1if t>k1 or t<k2riif t=ki,i=1,2,0o.w.withk1>k2,ri[0,1],i=1,2, \phi_1(T)=\begin{cases} 1 & \text{if } t>k_1\text{ or } t<k_2\\ r_i & \text{if } t=k_i, i=1,2,\cdots\\ 0 & \text{o.w.} \end{cases}\quad \text{with} k_1>k_2, r_i\in[0,1],i=1,2,\cdots

    s.t. Eη0ϕ(T)=αE_{\eta_0}\phi(T)=\alpha and Eη0[Tϕ(T)]=αEη0[T]E_{\eta_0}[T\phi(T)]=\alpha E_{\eta_0}[T]Eη0ϕ(T)E_{\eta_0}\phi(T)η0\eta_0 時有最小值)。

  2. H0:η1ηη2H_0:\eta_1\le\eta\le\eta_2 v.s. H1:η<η1H_1:\eta<\eta_1 or η>η2\eta>\eta_2

    UMPU level α\alpha test exists and is given

    ϕ2(T)={1if t>k1 or t<k2riif t=ki,i=1,2,0o.w.withk1>k2,ri[0,1],i=1,2, \phi_2(T)=\begin{cases} 1 & \text{if } t>k_1\text{ or } t<k_2\\ r_i & \text{if } t=k_i, i=1,2,\cdots\\ 0 & \text{o.w.} \end{cases}\quad \text{with} k_1>k_2, r_i\in[0,1],i=1,2,\cdots

    s.t. Eη1ϕ(T)=αE_{\eta_1}\phi(T)=\alpha and Eη1ϕ2(T)=α=Eη2ϕ2(T)E_{\eta_1}\phi_2(T)=\alpha=E_{\eta_2}\phi_2(T)

EX: X1,,XniidN(θ,σ02)X_1, \cdots, X_n\overset{\text{iid}}{\sim}N(\theta ,\sigma^2_0) with σ02\sigma^2_0 known     T=XˉN(θ,τ2)\implies T=\bar{X}\sim N(\theta, \tau^2) where τ2=σ02/n\tau^2=\sigma^2_0/n.i.e.

g(t;θ)=12πτ2exp((tθ)22τ2)=12πτexp(t22τ2)h(t)exp(θτ2ηt)exp(θ22τ2)=g(t;η)\begin{align*} g(t;\theta)&=\frac{1}{\sqrt{2\pi\tau^2}}\exp\left(-\frac{(t-\theta)^2}{2\tau^2}\right)\\ &=\underbrace{\frac{1}{\sqrt{2\pi}\tau}\exp\left(-\frac{t^2}{2\tau^2}\right)}_{h(t)}\exp\left(\underbrace{\frac{\theta}{\tau^2}}_{\eta}\cdot t\right)\exp\left(-\frac{\theta^2}{2\tau^2}\right)\\ &=g(t;\eta) \end{align*}

Note τ2\tau^2 is known, η=θτ2,η0=θ0τ2\eta=\frac{\theta}{\tau^2}, \eta_0=\frac{\theta_0}{\tau^2}

    H0:θ=θ0    H0:θτ2=θ0τ2    H0:η=η0\implies H_0:\theta=\theta_0\iff H_0:\frac{\theta}{\tau^2}=\frac{\theta_0}{\tau^2}\iff H_0:\eta=\eta_0

For testing H0:θ=θ0H_0:\theta=\theta_0 v.s. H1:θθ0H_1:\theta\neq\theta_0, UMPU level α\alpha test is

ϕ(t)={1if t>k1 or t<k2(k1<k2)riif t=ki,i=1,2,0o.w.\phi(t)=\begin{cases} 1 & \text{if } t>k_1\text{ or } t<k_2\quad(k_1<k_2)\\ r_i & \text{if } t=k_i, i=1,2,\cdots\\ 0 & \text{o.w.} \end{cases} with α=Eη0ϕ(T)=Eθ0ϕ(T)=Pθ0(T<k1)+Pθ0(T>k2)單點機率為0=P(Z<k1θ0τ)+P(Z>k2θ0τ)\begin{align*} \text{with }\alpha&=E_{\eta_0}\phi(T)=E_{\theta_0}\phi(T)\\ &=P_{\theta_0}(T<k_1)+P_{\theta_0}(T>k_2)\quad\text{單點機率為0}\\ &=P(Z<\frac{k_1-\theta_0}{\tau})+P(Z>\frac{k_2-\theta_0}{\tau})\\ \end{align*}     k1=θ0σ0nZα/2k2=θ0+σ0nZα/2\implies k_1=\theta_0-\frac{\sigma_0}{\sqrt{n}}Z_{\alpha/2}\quad k_2=\theta_0+\frac{\sigma_0}{\sqrt{n}} Z_{\alpha/2} i.e. ϕ(t)={1if t>θ0+σ0nZα/2 or t<θ0σ0nZα/20o.w.={1if n(Xˉθ0)σ0>Zα/20o.w.=I(n(Xˉθ0)σ0>Zα/2)\begin{align*} \text{i.e. }\phi(t)&=\begin{cases} 1 & \text{if } t>\theta_0+\frac{\sigma_0}{\sqrt{n}}Z_{\alpha/2}\text{ or } t<\theta_0-\frac{\sigma_0}{\sqrt{n}}Z_{\alpha/2}\\ 0 & \text{o.w.} \end{cases}\\ &=\begin{cases} 1&\text{if } \left|\frac{\sqrt{n}(\bar{X}-\theta_0)}{\sigma_0}\right|>Z_{\alpha/2}\\ 0&\text{o.w.} \end{cases}\\ &=I\left(\left|\frac{\sqrt{n}(\bar{X}-\theta_0)}{\sigma_0}\right|>Z_{\alpha/2}\right) \end{align*}

and

Eη0[Tϕ(T)]=Eθ0[TI(n(Xˉθ0)σ0>Zα/2)]TN(θ0,σ02n)=Eθ0[(θ0+σ02nZ)I(Z>Zα/2)]=θ0Eθ0[I(Z>Zα/2)]+σ0nEθ0[ZI(Z>Zα/2)]=θ0α+0\begin{align*} E_{\eta_0}[T\phi(T)]&=E_{\theta_0}\left[T\cdot I\left(\left|\frac{\sqrt{n}(\bar{X}-\theta_0)}{\sigma_0}\right|>Z_{\alpha/2}\right)\right]\quad T\sim N(\theta_0, \frac{\sigma^2_0}{n})\\ &=E_{\theta_0}\left[(\theta_0+\frac{\sigma^2_0}{\sqrt{n}}Z)I(|Z|>Z_{\alpha/2})\right]\\ &=\theta_0E_{\theta_0}\left[I(|Z|>Z_{\alpha/2})\right]+\frac{\sigma_0}{\sqrt{n}}E_{\theta_0}\left[Z\cdot I(|Z|>Z_{\alpha/2})\right]\\ &=\theta_0\alpha+0 \end{align*} E[ZI(Z>Zα/2)]=Z>Zα/2z12πez2/2dz=Zα/2z2πez2/2dz+Zα/2z2πez2/2dz=0odd function\begin{align*} \because E[Z\cdot I(|Z|>Z_{\alpha/2})]&=\int_{|Z|>Z_{\alpha/2}}z\cdot\frac{1}{\sqrt{2\pi}}e^{-z^2/2}dz\\ &=\int_{Z_{\alpha/2}}^\infty \frac{z}{\sqrt{2\pi}}e^{-z^2/2}dz+\int_{-\infty}^{-Z_{\alpha/2}}\frac{z}{\sqrt{2\pi}}e^{-z^2/2}dz\\ &=0 \quad\because \text{odd function} \end{align*}

Remark:

g(t;θ)=c(θ)exp(Q(θ)t)h(t)θ=Q1(η)η=Q(θ)c0(η)exp(ηt)h(t)=g(t;η)g(t;\theta)=c(\theta)\exp(Q(\theta)\cdot t)h(t)\xRightarrow[\theta=Q^{-1}(\eta)]{\eta=Q(\theta)}c_0(\eta)\exp(\eta\cdot t)h(t)=g(t;\eta)     θ=θ0    η=η0θ1θθ2    η1ηη2\implies \theta=\theta_0 \iff \eta=\eta_0\qquad \theta_1\le\theta\le\theta_2\iff \eta_1\le\eta\le\eta_2
Theorem

UMPU test exist when p.d.f is of this form

c(θ,ξ1,ξ2,,ξknuisance param)exp(θT(x~)+i=1kξiUi(x~))h(x~) (k+1)-par exp familyc(\theta,\underbrace{\xi_1,\xi_2,\cdots,\xi_k}_{\text{nuisance param}})\exp\left(\theta T(\utilde{x})+\sum_{i=1}^k\xi_iU_i(\utilde{x})\right)h(\utilde{x})\in\text{ (k+1)-par exp family}

of interest is θR\theta\in\R and nulls are

H01:θθ0 v.s. H11:θ>θ0H02:θθ0 v.s. H12:θ<θ0H03:θ1θθ2 v.s. H13:θ<θ1 or θ>θ2H04:θθ1 or θθ2 v.s. H14:θ1<θ<θ2H05:θ=θ0 v.s. H15:θθ0\begin{alignat*}{2} &H_0^1:\theta\le\theta_0 &\quad\text{ v.s. }\quad &H_1^1:\theta>\theta_0\\ &H_0^2:\theta\ge\theta_0 &\quad\text{ v.s. }\quad &H_1^2:\theta<\theta_0\\ &H_0^3:\theta_1\le\theta\le\theta_2 &\quad\text{ v.s. }\quad &H_1^3:\theta<\theta_1\text{ or }\theta>\theta_2\\ &H_0^4:\theta\le\theta_1\text{ or }\theta\ge\theta_2 &\quad\text{ v.s. }\quad &H_1^4:\theta_1<\theta<\theta_2\\ &H_0^5:\theta=\theta_0 &\quad\text{ v.s. }\quad &H_1^5:\theta\neq\theta_0 \end{alignat*}

基本上,H0H_0 的拒絕區域取決於 H1H_1 的範圍。並通過計算顯著水準來確定拒絕的分界點。

EX: X1,,XniidN(θ,σ2)    (Xˉ,S2)X_1,\cdots,X_n\overset{\text{iid}}{\sim}N(\theta, \sigma^2)\implies(\bar{X}, S^2): sufficient for (θ,σ2)(\theta, \sigma^2) with θ,σ2\theta, \sigma^2 unknown.

    H0:θθ0\implies H_0:\theta\le\theta_0 v.s. H1:θ>θ0H_1:\theta>\theta_0, UMPU level α\alpha test is reject H0H_0 if n(xˉθ0)/Stn1>tn1,α\underbrace{\sqrt{n}(\bar{x}-\theta_0)/S}_{\sim t_{n-1}}>t_{n-1,\alpha}