Docsity

Solving Statistical Hypothesis Testing in R: Finding MP α Test Level and Optimal Rule - Pr, Exams of Statistics

Toggle sidebar
bg1
STAT610 - HWK Solution 10
4.1.5 Let FT,θ0be the CDF of Tunder H:θ=θ0. By Proposition 4.1.2, the p-value is given by
p=α(t) = Pθ0(T > t) = 1 −FT ,θ0(t).
Since FT,θ0(t)∼Unif(0,1), p∼Unif(0,1).
4.1.6 By 4.1.5, α(T1),·· · ,α(Tr)∼i.i.d.Unif(0,1) iid,
⇒ − log α(T1)· ·· − log α(Tr)∼Exp(1) ∼Γ(1,1) iid
⇒
r
X
j=1
(−2 log α(Tj)) = −2
r
X
j=1
log α(Tj)∼Γ(n, 1/2) ∼χ2
2r
4.2.5 It is equivalent to do a hypothesis test
H: (X, Y )∼P0=N(0,0,1,1,0.6) versus K: (X, Y )∼P1=N(1,1,1,1,0.6).
Suppose T(X, Y ) and c minimize max{P0(T≥c), P1(T < c)}. Let α=P0(T≥c). By the definition
of MP test, any size αMP test also minimizes max{P0(T≥c), P1(T < c)}.
- First, find an MP level αtest. Let
L=f(x, y;P1)/f (x, y;P0) = exp x+y−1
1 + ρ.
By N-P Lemma, ϕk=I(L≥k) = I(X+Y≥c) with appropriate kand cis an MP size α
test.
- Second, determine αsuch that max{P0(T≥c), P1(T < c)}is minimized. Let T=X+Y,
T∼N(0,3.2) under P0and T∼N(2,3.2) under P1,
P0(T≥c) = P0X+Y
√3.2≥c
√3.2= 1 −Φc
√3.2= Φ −c
√3.2
P1(T < c) = P1X+Y
√3.2<c−2
√3.2= Φ c−2
√3.2
max{P0(T≥c), P1(T < c)}is minimized when Φ −c
√3.2= Φ c−2
√3.2⇒c= 1.
Therefore, we obtained the optimal rule with statistic T(X, Y ) = X+Yand critical value c= 1.
4.2.7 Assume ϕis an MP level αtest, 0 < α < 1.
- To prove E1ϕ(X)≥α, consider a randomized test E1δ(X) = α, in other words, randomly
reject H0with probability α. It is a size αtest, so E1ϕ(X)≥E1δ(X) = α.
- If E1ϕ(X) = α. Then δ(X) is also an MP test. By N-P Lemma, for θ=θ0and θ=θ1,
Pθ[δ(X)6=ϕk(X), L(X, θ0, θ1)6=k] = 0 (1)
where ϕk(X) is a size αlikelihood ratio test. Since δ(X) = α6= 0 or 1,
Pθ[δ(X) = ϕk(X), L(X, θ0, θ1)6=k] = 0.(2)
1
pf2

Partial preview of the text

Download Solving Statistical Hypothesis Testing in R: Finding MP α Test Level and Optimal Rule - Pr and more Exams Statistics in PDF only on Docsity!

STAT610 - HWK Solution 10

4.1.5 Let FT,θ 0 be the CDF of T under H : θ = θ 0. By Proposition 4.1.2, the p-value is given by

p = α(t) = Pθ 0 (T > t) = 1 − FT,θ 0 (t).

Since FT,θ 0 (t) ∼ Unif(0, 1), p ∼ Unif(0, 1).

4.1.6 By 4.1.5, α(T 1 ), · · · , α(Tr) ∼ i.i.d.Unif(0, 1) iid,

⇒ − log α(T 1 ) · · · − log α(Tr) ∼ Exp(1) ∼ Γ(1, 1) iid

∑^ r

j=

(−2 log α(Tj )) = − 2

∑^ r

j=

log α(Tj ) ∼ Γ(n, 1 /2) ∼ χ^22 r

4.2.5 It is equivalent to do a hypothesis test

H : (X, Y ) ∼ P 0 = N (0, 0 , 1 , 1 , 0 .6) versus K : (X, Y ) ∼ P 1 = N (1, 1 , 1 , 1 , 0 .6).

Suppose T (X, Y ) and c minimize max{P 0 (T ≥ c), P 1 (T < c)}. Let α = P 0 (T ≥ c). By the definition of MP test, any size α MP test also minimizes max{P 0 (T ≥ c), P 1 (T < c)}.

  • First, find an MP level α test. Let

L = f (x, y; P 1 )/f (x, y; P 0 ) = exp

x + y − 1

1 + ρ

By N-P Lemma, ϕk = I(L ≥ k) = I(X + Y ≥ c) with appropriate k and c is an MP size α

test.

  • Second, determine α such that max{P 0 (T ≥ c), P 1 (T < c)} is minimized. Let T = X + Y ,

T ∼ N (0, 3 .2) under P 0 and T ∼ N (2, 3 .2) under P 1 ,

P 0 (T ≥ c) = P 0

X + Y

c √

  1. 2

c √

  1. 2

c √

  1. 2

P 1 (T < c) = P 1

X + Y

c − 2 √

  1. 2

c − 2 √

  1. 2

max{P 0 (T ≥ c), P 1 (T < c)} is minimized when Φ

c √

  1. 2

c − 2 √

  1. 2

⇒ c = 1.

Therefore, we obtained the optimal rule with statistic T (X, Y ) = X + Y and critical value c = 1.

4.2.7 Assume ϕ is an MP level α test, 0 < α < 1.

  • To prove E 1 ϕ(X) ≥ α, consider a randomized test E 1 δ(X) = α, in other words, randomly reject H 0 with probability α. It is a size α test, so E 1 ϕ(X) ≥ E 1 δ(X) = α.
  • If E 1 ϕ(X) = α. Then δ(X) is also an MP test. By N-P Lemma, for θ = θ 0 and θ = θ 1 ,

Pθ[δ(X) 6 = ϕk(X), L(X, θ 0 , θ 1 ) 6 = k] = 0 (1)

where ϕk(X) is a size α likelihood ratio test. Since δ(X) = α 6 = 0 or 1,

Pθ[δ(X) = ϕk(X), L(X, θ 0 , θ 1 ) 6 = k] = 0. (2)

Combine (1) and (2),

Pθ[L(X, θ 0 , θ 1 ) 6 = k] = 0

Therefore, p(X, θ 1 ) = kp(X, θ 0 ) with probability 1. By

p(x, θ 1 )dx =

p(x, θ 0 )dx = 1,

k =

kp(x, θ 0 )dx =

p(x, θ 1 )dx = 1.

  • If p(·, θ 0 ) = p(·, θ 1 ), then E 1 ϕ(X) = E 0 ϕ(X) = α.

4.3.1 (a) X 1 , · · · , Xn ∼ Poisson(θ), p(x; θ) =

enθθ

P xi ∏ xi!

. For θ 1 < θ 2 ,

p(x, θ 2 )

p(x, θ 1 )

= e−n(θ^2 −θ^1 )

θ 2

θ 1

)P^ xi

then p(x, θ 2 )/p(x, θ 1 ) is increasing in T =

Xi. This is a MLR family in T. By theorem 4.3.1, A UMP test is of the form T ≥ c.

(b) Since T =

Xi ∼ Poisson(nθ 0 ) under θ = θ 0 , α = Pθ 0 (T > c). Therefore, α only takes values from {Pθ 0 (T ≥ n) : n = 0, 1 , 2 , · · · }.

(c) Need the table of Poisson distribution.