STAT 461/561 Kelin Pan Assignment Two Solution Question 1. Chapter 8. Ex.8.25 (p.406). (a) and (b) has been discussed in class. Now for (c) Given BIN(n, θ) family, n is known. The exponential family family can be found as P (x|θ) = n Y n! θxi (1 − θ)n−xi = h(x)exp[T (x)η(θ) − B(θ)] (n − x )!x ! i i i=1 Pn where h(x) = exp[ n! i=1 (n−xi )!xi ! ], θ T (x) = x̄, η(θ) = n(logθ − log(1 − θ)) = nlog 1−θ , and B(θ) = nlog(1 − θ). η is strictly increasing function of θ in the region (0, 1). Therefore by the definition given in question 4, the statistic T is in MLR family. Question 2. Chapter 8. Ex.8.28 (p.406). The pdf and cdf of logistic distribution are f (x|θ) = ex−θ , (1 + ex−θ )2 F (x|θ) = ex−θ . 1 + ex−θ 1. For θ2 > θ1 , the likelihood ratio λ(x, θ2 , θ1 ) = f (x|θ2 ) 1 + ex−θ1 2 = eθ1 −θ2 ( ) . f (x|θ1 ) 1 + ex−θ2 The derivative of the quantity in the circle brackets is d ex−θ1 − ex−θ2 (.) = . dx (1 + ex−θ2 )2 Because θ2 > θ1 , ex−θ1 > ex−θ2 , hence, the ratio is increasing in x. The family has MLR. 2. Test hypothesis: H0 : θ = 0 vs. H1 : θ = 1. The MP test to reject H0 is when f (x|1) f (x|0) > k. By (1), this ratio is increasing in x. Thus, this inequality is equivalent to rejecting H0 if x > k 0 . Using cdf of logistic distribution, we have 0 α = supθ∈Θ0 ek 1 = P (X > k |θ = 0) = β(0) = 1 − F (k |0) = 1 − . 0 = k 1+e 1 + ek0 0 0 and 0 β = F (k 0 |1) = ek −1 , 1 + ek0 −1 For a specified α = .2, k 0 = log( 1−α α ) = 1.386 and β = 1 e.386 1+e.386 = .595. 3. From (1) and (2), the Karlin-Rubin theorem is satisfied. So the test is UMP of size α. Question 3. Chapter 8. Ex.8.31 (p.406). Given X ∼ iid Poisson(λ) 1. Test hypothesis: H0 : λ ≤ λ0 vs. H1 : λ > λ0 . By Karlin-Rubin theorem, the UMP test is to reject H0 if a sufficient statistic T > k can be found. Let T = P i Xi ∼ exp(nλ), which is Poisson distribution with single parameter exponential family. We proved such a distribution has MLR (see Ex.8.25). Karlin-Rubin theorem is satisfied if we chose a constant k to satisfy P (T > k|λ0 ) = α. 2. Test hypothesis: H0 : λ ≤ 1 vs. H1 : λ > 1. By CLT, T ∼ N (nλ, nλ), therefore √ √ P (T > k|λ = 1) ≈ P (Z > (k − nλ)/ nλ|λ = 1) = P (Z > (k − n)/ n) = .05, √ √ P (T > k|λ = 2) ≈ P (Z > (k − nλ)/ nλ|λ = 2) = P (Z > (k − 2n)/ 2n) = .9. By normal table, we have k−n √ n = 1.645 and k−2n √ 2n = −1.28, yielding n = 12 and k = 17.70. Question 4. Chapter 8. Ex.8.34 (p.407). • Definition of MLR (Based on Bickel and Doksum book (Ref.1). I understand that it may result in a confusion to have another definition for MLR. However without this definition, it is hard to solve this question. As we discussed in class most single-parameter exponential family pdf (with strictly increasing η(θ)) satisfies this definition.) Def.: The family of models {Pθ : θ ∈ Θ} with Θ ⊂ R (a Euclid space) is said to be a monotone likelihood ratio (MLR) family if for θ1 > θ2 , the distribution Pθ1 and Pθ2 are distinct and the ratio P (x, θ1 )/P (x, θ2 ) is an increasing function of T (x). • (a) has been proved in class. 2 • For part (b), suppose we have continuous pdf. For θ1 > θ2 , we must show F (t|θ1 ) ≤ F (t|θ2 ) or equivalently S(t|θ1 ) > S(t|θ2 ). Notice d f (t|θ1 ) [F (t|θ1 ) − F (t|θ2 )] = f (t|θ1 ) − f (t|θ2 ) = f (t|θ2 )( − 1). dt f (t|θ2 ) Because pdf has MLR, the ratio on the right-hand side is increasing (according to our definition of MLR). The derivative can only change the sign from negative to positive, which means that any interior extremum is a minimum. Thus the function in the square bracket is maximized by its value at ±∞, which is zero. It means [.] ≤ 0, then we have F (t|θ1 ) ≤ F (t|θ2 ). Question 5. Chapter 8. Ex.8.37 (p.407). Given Xi ∼ N (θ, σ 2 ) Test hypothesis: H0 : θ ≤ θ0 vs. H1 : θ > θ0 1. If σ 2 is given, show that the test that reject H0 when X̄ > θ0 + zα σ 2 /n is a test p of size α. Show that the test can be derived as a LRT. q X̄ − θ0 P (X̄ > θ0 + zα σ 2 /n) = P ( p 2 > zα |θ0 ) = P (Z > zα |θ0 ) = α, σ /n for one sided-test, where Z ∼ N (0, 1). The normal test is equivalent to LRT when C = exp[−zα σ 2 /2] (as we derived in lass for two-sided test). 2. From (1) we have X̄ > C. X̄ is sufficient and its pdf has MLR (it has been proved in Exercise 8.25(a)). Then by Karlin-Rubin theorem, the test is UMP. 3. If σ 2 is unknown. In this case, √ P (X̄ > θ0 + tn−1,α S/ n|θ0 ) = P (Tn−1 > tn−1,α ) = α X̄−θ0 where Tn−1 = √ is a student’s t random variable with n − 1 degree of freedom. 2 S /n If we define 1X (xi − x̄)2 , n 1X σ̂02 = (xi − θ0 )2 n then for X̄ > θ0 the LRT statistic can be expressed σ̂ 2 = (2πσ̂02 )−n/2 exp[− i (xi − θ0 )2 /2σ̂02 ] λ(x) = . P (2πσ̂ 2 )−n/2 exp[− i (xi − x̄)2 /2σ̂ 2 ] P 3 (1) Notice that in eq.(1), the numerator and denominator inside of square brackets of exponential are same. Thus, we have ( σ̂ 2 n/2 ) . σ̂0 For the case X̄ < θ0 , λ is simply equal to 1. Writing σ̂ 2 = σ̂02 = (x̄ − θ0 )2 + n−1 2 n S , n−1 2 n S and it is clear that the LRT is equivalent to the t-test because λ < C when (x̄ − n−1 2 n S 2 θ0 )2 + n−1 n S = (n − 1)/n < C, and x̄ ≥ θ0 , (x̄ − θ0 )2 /S 2 + (n − 1)/n √ which is same as rejecting when (x̄ − θ0 )/(S/ n) is large. Question 6. Chapter 8. Ex.8.49 (p.411). 1. p-value is 10 X 1 1 P r(X ≥ 7|θ = ) = P r(X = i|θ = ) = .171875. 2 2 i=7 2. p-value is P (X ≥ 3|λ = 1) = 1 − P (X < 3|λ = 1) = 1 − [ e−1 12 e−1 11 e−1 10 + + ] = .0803. 2! 1! 0! 3. p-value is X P( Xi ≥ 9|3λ = 3) = 1−P (T < 9|3λ = 3) = 1−e−3 [ i 38 37 36 30 + + +...+ ] = .0038. 8! 7! 6! 0! Question 7. 1. p-value is P (H0 |X) = P (N ≤ 2|X = 1) = P (N = 1|X = 1)+P (N = 2|X = 1) = e−λ2 +λ2 e−λ2 = e−1.8 (1 + 1.8) = .463. If we set α = .05, obviously we accept H0 . If we consider α = .5, we will reject H0 . 4