Stat 300A Theory of Statistics Homework 7: Solutions Nikos Ignatiadis Due on November 28, 208 Solutions should be complete and concisely written. Please, use a separate sheet or set of sheets for each problem. We will be using Gradescope https://www.gradescope.com for homework submission you should have received an invitation - no paper homework will be accepted. Handwritten solutions are still fine though, just make a good quality scan and upload it to Gradescope. You are welcome to discuss problems with your colleagues, but should write and submit your own solution. P3. from Lehmann, Romano, Testing Statistical Hypotheses. Let X,..., X n an i.i.d. sample from N ξ, σ 2. i If σ = σ 0 known, there exists a UMP test for testing H : ξ ξ 0 against ξ > ξ 0 which rejects when Xi ξ 0 is large. ii If ξ = ξ 0 known, there exists a UMP test for testing H : σ σ 0 against σ > σ 0 which rejects when Xi ξ o 2 is too large. i Let us first derive the optimal test for H : ξ = ξ 0 against K : ξ = ξ, where ξ > ξ 0. The optimal test is of course the Neyman-Pearson NP test. Writing f ξ X = n i= f ξx i for the likelihood under ξ, we know that the NP test rejects for large values of: f ξ f ξ0 X = exp 2σ0 2 i= 2ξ ξ 0 n = exp n [ Xi ξ 2 X i ξ 0 2] i= X i nξ 2 ξ 2 0 Observe that since ξ > ξ 0, rejecting for large values of f ξ f ξ0 X must be equivalent to rejecting for large values of n i= X i, hence also for large values of T X = n i= X i ξ 0, i.e. the NP test rejects when T X c for some constant c note that all distributions here have density w.r.t. Lebesgue measure hence we do not need to be careful about > or. The constant c is of course determined so as to control the type-i error, i.e. Normal pdf we require: c α = P ξ0 [T X c] = Φ n with Φ the standard In other words c = nz α, with z α the α quantile of the standard Normal distribution.
To summarize: The NP test for H : ξ = ξ 0 versus K : ξ = ξ rejects when: T X nz α We now make two observations: First, this is still a valid test for H : ξ ξ 0, since for any ξ ξ 0, we have that: c nξ ξ0 c P ξ [T X c] = Φ Φ = α n n Thus it must also be UMP for H : ξ ξ 0 vs. K : ξ = ξ. Second its form does not depend on the specific choice of ξ > ξ 0, hence it must be UMP against any ξ > ξ 0, i.e. it is UMP for H : ξ ξ 0 against K : ξ > ξ 0. Note that this argument could have been shortened by sufficiency and monotone likelihood ratio considerations. ii We proceed as in part i. Fix σ > σ 0 and let us derive the NP test for H : σ = σ 0 vs. K : σ = σ. The likelihood ratio is: Since f σ f σ0 X = σn 0 σ n exp n 2σ 2 X i ξ 0 2 i=, we see that the NP test rejects for large values of T X = n 2σ 2 i= X i ξ 0 2. Since under H : σ = σ 0 it holds that T X χ 2 σ n, we see that the NP test takes rejects the null when 0 2 T X c, where c = σ0χ 2 2 n, α with χ 2 n, α the α quantile of the Chi-squared distribution with n degrees of freedom. Now note that for σ σ 0 : P σ [T X c] = P σ [ T X σ 2 0 χ 2 n, α ] P σ [ T X σ 2 ] χ 2 n, α = α So the proposed test is even most powerful for H : σ σ 0 against K : σ = σ. Its form does not depend on the specific choice of σ > σ 0, hence it is UMP for H : σ σ 0 versus K : σ > σ 0. 2
P3.2 from Lehmann, Romano, Testing Statistical Hypotheses. Let X = X,..., X n an i.i.d. sample from the uniform distribution U[0, θ]. i For testing H : θ θ 0 against K : θ > θ 0 any test is UMP at level α for which E θ0 φx = α, E θ φx α for θ θ 0 and φx = when max{x,..., x n } > θ 0. ii For testing H : θ = θ 0 against K : θ θ 0, a unique UMP test exists and is given by φx = when max{x,..., x n } > θ 0 or max{x,..., x n } θ 0 α /n and φx = 0 otherwise. i Let us fix θ > θ 0 and show that the specified test is a Neyman-Pearson test for H : θ = θ 0 versus K : θ = θ. For convenience we also write T X = max {X,..., X n } and f θ X for the likelihood ratio: f θ X = θn 0 θ n δ θ0,θ T X We defined: δ θ0,θ u = {, for u θ 0, θ ], for u [0, θ 0 ] This defines δ θ0,θ T X on sets with both P θ0 and P θ probability equal to. Any test φ of the form specified specified in the question, is a test with size α, i.e. E θ0 φx = α and furthermore it rejects when f θ X > θn 0 θ and accepts when f θ n X < θn 0 θ this last statement is n vacuous since P θ0 and P θ almost surely this never happens. By the sufficient condition of the NP theorem Theorem 3.2.. in TSH, it must be most powerful and since θ > θ 0 was arbitrary, it is UMP for H : θ = θ 0 against K : θ > θ 0. Finally this test is also valid for H : θ θ 0, since by assumptions it also satisfies E θ φx α for θ θ 0. Thus it is UMP for H : θ θ 0 against K : θ > θ 0. ii We start by showing that the specified test is indeed UMP. Let us first check that under θ 0 : P θ0 [T X θ 0 α /n] = n P θ0 [X i θ 0 α /n] = i= α /n n = α Hence by our argument in part i, the specified test is a UMP test for testing H : θ = θ 0 against K : θ > θ 0. Let us now check that it is UMP at the other tail too. Thus let us test θ 0 vs θ with 0 < θ < θ 0 and show it is most powerful. Here the Likelihood ratio takes the form: f θ X = θn 0 δ θ n θ,θ 0 T X Where we define δ θ,θ 0 on the P θ0, P θ -support of T X as: 3
δ θ,θ 0 u = { 0, for u θ, θ 0 ], for u [0, θ ] We see that the test given in the question rejects when f θ X > θn 0 θ n 2 and accepts when f θ X < θn 0 θ n 2. It furthermore has size α, thus by the sufficient condition of the NP theorem Theorem 3.2.. in TSH, it must be most powerful. It remains to check uniqueness. Let us first find the unique most powerful test of θ 0 against θ = α /n θ 0. The necessary condition of Theorem 3.2.. now implies that there exists a k such that the most powerful test rejects for δ θ,θ 0 T X > k and accepts for δ θ,θ 0 T X < k. This k clearly cannot be < 0, for otherwise we would not have size α. It also clearly cannot be >, for otherwise the test would have power 0. Let us consider the following cases for k. When we write almost surely below we require the statement to hold P θ0 and P θ almost surely. If k 0,, then the test takes exactly the form of accepting when δ θ,θ 0 T X = 0 and rejecting when it is =. But this is equivalent to rejecting when T X θ = α /n θ 0 and accepting otherwise. If k = 0, then the test still rejects at T X θ = α /n θ 0 and it remains to consider what happens when δ θ,θ 0 T X = 0. However almost surely the test needs to accept on this event, since otherwise the test will have size > α. If k =, the test accepts when δ θ,θ 0 T X = 0 and we need to check what happens when it is =. Clearly power is strictly maximized by always rejecting when k = vs. potentially not rejecting with some positive probability, yet still has the correct size α. To recap: The necessary condition of the NP theorem for θ 0 vs θ 0 α /n forces the test to take the form at least almost everywhere w.r.t. Lebesgue measure of rejecting when T X θ 0 α /n and accepting when T X θ 0 α /n, θ 0 ]. The same condition hence must also apply to the UMP test of H : θ = θ 0 vs K : θ θ 0. We still need to check what the test does for T X > θ 0. It is clear that the test should always reject then, since this happens with probability 0 under P θ0, hence this does not influence the size of the test, yet increases power under any θ > θ 0. To be more precise: Fixing any θ > θ 0 we see that power under this θ will be strictly maximized if we always reject for T X θ 0, θ ] and now note that this holds for any θ > θ 0, 4
P3.9 from Lehmann, Romano, Testing Statistical Hypotheses. Let X distributed according to P θ, θ Ω and let T sufficient for θ. If φx is any test of a hypothesis concerning θ, then ψt given by ψt = E[φX T = t] is a test depending on T only and its power is identical with that of φx. First let us observe that since φ is a potentially randomized test, it means that φ [0, ]. Hence also ψ = E[φX T = ] [0, ] to be more precise: there exists a version of the conditional expectation with this property. Furthermore ψt is a well-defined statistic, since T is sufficient for θ and hence the conditional expectation E[φX T = t] = E θ [φx T = t] does not depend on θ. Now take any θ Ω and note that by the tower property iterated expectation we get: E θ [ψt ] = E θ [E θ [φx T ]] = E θ [φx] But the right-hand side is just the power function of the test φ. So in particular, if φx is a level α test, then so is ψt, i.e. if we let H Ω denote the parameters corresponding to the null hypothesis being tested, then: sup θ H E θ [ψt ] = sup E θ [φx] α θ H If we also let K Ω for the alternative, then for any θ K the two tests have the same power. 5