Name: ID: Homework for 2/17 1. [§9-1] A coin is thrown independently 10 times to test the hypothesis that the probability of heads is 12 versus the alternative that the probability is not 12 . The test rejects if either 0 or 10 heads are observed. a. What is the significance level of the test? b. If in fact the probability of heads is .1, what is the power of the test? a. Let H0 denote the hypothesis that the probability of heads is 21 and HA denote the alternative. Let X be the number of heads after 10 tosses. Then X ∼ Bin(10, 0.5) under H0 . The significance level of the test is α = P(reject H0 | H0 ) = P(X = 0 or X = 10 | H0 ) 10 10 = 0.50 (1 − 0.5)10 + 0.510 (1 − 0.5)0 0 10 = 0.00195. b. If in fact the probability of heads is p = .1, then the power of the test is 1 − β = P(reject H0 | p = 0.1) = P(X = 0 or X = 10 | p = 0.1) 10 10 0 10 = 0.1 (1 − 0.1) + 0.110 (1 − 0.1)0 0 10 = 0.349. 2. [§9-3] Suppose that X ∼ bin(100, p). Consider the test that rejects H0 : p = .5 in favor of HA : p 6= .5 for |X − 50| > 10. Use the normal approximation to the binomial distribution to answer the following: a. What is α? b. Graph the power as a function of p. a. The significance α of the test is α = P(reject H0 | H0 ) = P(|X − 50| > 10 | H0 ) = P(X − 50 > 10 or X − 50 < −10 | H0 ) = P(X > 60 | H0 ) + P(X < 40 | H0 ) =P X − 100(0.5) ! 60 − 100(0.5) p >p 100(0.5)(1 − 0.5) 100(0.5)(1 − 0.5) +P p ! 40 − 100(0.5) X − 100(0.5) 100(0.5)(1 − 0.5) ≈ P(Z > 2) + P(Z < −2) <p 100(0.5)(1 − 0.5) (by CLT X approx. ∼ N (np, np(1 − p))) = 0.0455. b. The power of the test is 1 − β = P(reject H0 | p) = P(|X − 50| > 10 | p) = P(X − 50 > 10 or X − 50 < −10 | p) = P(X > 60 | p) + P(X < 40 | p) =P 60 − 100p X − 100p p >p 100p(1 − p) 100p(1 − p) ! ! X − 100p 40 − 100p +P p <p 100p(1 − p) 100p(1 − p) ! ! 6 − 10p 4 − 10p ≈P Z> p +P Z < p . p(1 − p) p(1 − p) 2 3. [§9-4] Let X have one of the following distributions: X x1 x2 x3 x4 H0 .2 .3 .3 .2 HA .1 .4 .1 .4 a. Compare the likelihood ratio, Λ, for each possible value X and order the xi according to Λ. b. What is the likelihood ratio test of H0 versus HA at level α = .2? What is the test at level α = .5? a. The likelihood ratio Λ is .2 .1 .3 P(X = xi |H0 ) .4 Λ= .3 P(X = xi |HA ) .1 .2 .4 = 2, X = x1 = .75, X = x2 . = 3, X = x3 = .5, X = x4 The order xi ’s in ascending order of Λ is x4 , x2 , x1 , x3 . b. When the likelihood ration Λ is small, we should reject H0 . Let (0, c] be the rejection region. Then α = P(reject H0 | H0 ) = P(Λ ≤ c|H0 ) Thus for α = .2 the rejection region is (0, c] with 0.5 ≤ c < 0.75; and for α = .5 the rejection region is (0, c] with 0.75 ≤ c < 2. 4. [§9-5] True or false, and state why: a. The significance level of a statistical test is equal to the probability that the null hypothesis is true. b. If the significance level of a test is decreased, the power would be expected to increase. c. If a test is rejected at the significance level α, the probability that the null hypothesis is true equals α. 3 d. The probability that the null hypothesis is falsely rejected is equal to the power of the test. e. A type I error occurs when the test statistic falls in the rejection region of the test. f. A type II error is more serious than a type I error. g. The power of a test is determined by the null distribution of the test statistic. h. The likelihood ratio is a random variable. a. False. The significance level of a statistical test is equal to the probability that the null hypothesis is rejected based on the sample while the null hypothesis is true. b. False. If the significance level of a test is decreased, the power would be expected to decrease. c. False. Same as (a). d. False. The probability that the null hypothesis is correctly rejected is equal to the power of the test. e. False. A type I error occurs when the test statistic falls in the rejection region of the test while the null hypothesis is true. f. False. Not always. g. False. The power of a test is determined by the alternative distribution of the test statistic. h. True. 4 Name: ID: Homework for 2/19 1. [§9-2] Which of the following hypotheses are simple, and which are composite? a. X follows a uniform distribution on [0, 1]. b. A die is unbiased. c. X follows a normal distribution with mean 0 and variance σ 2 > 10. d. X follows a normal distribution with mean µ = 0. a. “X follows a uniform distribution on [0, 1].” This is a simple hypothesis since the distribution of X is completely specified. b. “A die is unbiased.” This is a simple hypothesis since the distribution of X, the outcome of one toss, is completely specified. c. “X follows a normal distribution with mean 0 and variance σ 2 > 10.” This is a composite hypothesis since the distribution of X is not completely specified. d. “X follows a normal distribution with mean µ = 0.” This is a composite hypothesis since the distribution of X is not completely specified. 2. [§9-7] Let X1 , . . . , Xn be a sample from a Poisson distribution. Find the likelihood ratio for testing H0 : λ = λ0 versus HA : λ = λ1 , where λ1 > λ0 . Use the fact that the sum of independent Poisson random variables follows a Poisson distribution to explain how to determine a rejection region for a test at level α. The likelihood ratio is n Y Λ= f (X1 , . . . , Xn |λ0 ) lik(λ0 ) = = i=1 n Y lik(λ1 ) f (X1 , . . . , Xn |λ1 ) −nλ0 = e Pn λ0 i=1 Xi Pn e−nλ1 λ1 i=1 Xi Since λ0 /λ1 < 1, large values of = en(λ1 −λ0 ) n X e−λ0 i λX 0 Xi ! e−λ1 i λX 1 Xi ! i=1 Pn λ0 λ1 i=1 Xi . Xi corresponds to small values of Λ, i=1 which in turn favors HA . Thus we will reject H0 with n X Xi > c, where i=1 c is determined by the significance level α. n X Since Xi ∼ Poi(nλ), we have i=1 n X α = P(reject H0 | H0 ) = P i=1 ! Xi > cλ = λ0 = 1 − F (c), where F (y) = P(Y ≤ y) is the cdf of a Poisson random variable Y with parameter nλ0 . 6 Homework for 2/21 1. [§9-9] Let X1 , . . . , X25 be a sample from a normal distribution having a variance of 100. Find the rejection region for a test at level α = .10 of H0 : µ = 0 versus HA : µ = 1.5. What is the power of the test? Repeat for α = .01. The likelihood ratio is 25 Y Λ= f (X1 , . . . , X25 |µ0 ) lik(µ0 ) = = i=1 25 lik(µ1 ) f (X1 , . . . , X25 |µ1 ) Y i=1 ( = exp ( = exp ( = exp 1 200 1 200 1 200 √ √ 2 1 e−(Xi −µ0 ) /200 2π · 100 2 1 e−(Xi −µ1 ) /200 2π · 100 !) 25 25 X X 2 (Xi − µ1 ) − (Xi − µ0 )2 i=1 i=1 25 25 X X [(Xi − µ0 ) + (µ0 − µ1 )]2 − (Xi − µ0 )2 i=1 !) i=1 25 X [(Xi − µ0 )2 + 2(Xi − µ0 )(µ0 − µ1 ) + (µ0 − µ1 )2 ] i=1 25 X (Xi − µ0 )2 − !) i=1 ( = exp 1 200 25 25 X X (Xi − µ0 )2 + 2(µ0 − µ1 ) (Xi − µ0 ) i=1 + i=1 25 X 2 (µ0 − µ1 ) − i=1 ( = exp 1 200 25 X (Xi − µ0 ) !) 2 i=1 25(µ0 − µ1 )2 − 50µ0 (µ0 − µ1 ) + 2(µ0 − µ1 ) 25 X !) Xi i=1 (µ0 = 0, µ1 = 1.5) ) ( 25 9 3 X 9 3 = exp − Xi = exp − X 32 200 i=1 32 8 We will reject H0 if Λ is small, or equivalently, X is large. Thus the rejection region is of the form X ≥ c. Since X ∼ N (0, 4) under H0 , we 7 have α = P(reject H0 | H0 ) = P X ≥ c|µ = 0 c−0 =P Z≥ √ (Z ∼ N (0, 1)) 4 c c =1−Φ , =P Z≥ 2 2 where Φ(z) is the cdf of standard normal distribution. Moreover, the power of the test is 1 − β = P(reject H0 | H1 ) = P X ≥ c|µ = 1.5 c − 1.5 =P Z≥ √ (Z ∼ N (0, 1)) 4 c − 1.5 c − 1.5 =1−Φ , =P Z≥ 2 2 Thus for α = .1, we have c = 2z(α) = 2(1.28) = 2.56, that is the rejection region is {X ≥ 2.56}, and the power is 2.56 − 1.5 = 0.298; 1−β =1−Φ 2 for α = .01, we have c = 2z(α) = 2(2.33) = 4.66, that is the rejection region is {X ≥ 4.66}, and the power is 4.66 − 1.5 1−β =1−Φ = 0.0571. 2 8 2. [§9-12] Let X1 , . . . , Xn be a random sample from an exponential distribution with the density function f (x|θ) = θ exp[−θx]. Derive a likelihood ratio test of H0 : θ = θ0 versus HA : θ 6= θ0 , and show that the rejection region is of the form {X exp[−θ0 X] ≤ c}. The likelihood ratio for H0 : θ = θ0 versus HA : θ = θ1 is n Y f (X1 , . . . , Xn |θ0 ) Λ= = i=1 n Y f (X1 , . . . , Xn |θ1 ) = = θ0 θ1 n θ0 θ1 n ( θ0 e−θ0 Xi θ1 e−θ1 Xi i=1 n X exp (θ1 − θ0 ) ) Xi i=1 en(θ1 −θ0 )X . We will reject H0 if Λ is small. However, Λ not only depends on X, but also depends on the sign of θ1 − θ0 . In particular, when θ1 > θ0 , large X favors H1 ; on the other hand, when θ1 < θ0 , large X favors HA . The generalized likelihood ratio for H0 : θ = θ0 versus HA : θ 6= θ0 is n Y θ0 e−θ0 Xi f (X1 , . . . , Xn |θ0 ) 1 Λ= = i=1 (MLE for θ : θ̂ = ) n Y 1 max(X1 , . . . , Xn |θ) X 1 θ>0 e − X Xi X i=1 !n ( ) X n n 1 θ0 1 exp − θ0 Xi = Xθ0 exp n − θ0 X = 1 X X i=1 X n n n = θ0n X en−nθ0 X = (eθ0 ) Xe−θX . We will reject H0 if Λ is small, or equivalently, when Xe−θ0 X is small. Therefore, the rejection region is {X exp[−θ0 X] ≤ c}. 9

Download
# Homework for 2/17 - Department of Statistics and Probability