Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Math 152. Rumbos Fall 2009 1 Solutions to Assignment #10 1. We wish to determine whether a given coin is fair or not. Thus, we test the 1 1 null hypothesis Hπ : π = versus the alternative hypothesis H1 : π β= . 2 2 An experiment consisting of 10 independent ο¬ips of the coin and observing the number of heads, π , in the 10 trials. The statistic π is the test statistic for the test. The following rejection criterion is set: Reject Hπ is either π = 0 or π = 10. (a) What is the signiο¬cance level of the test? Solution: The signiο¬cance level, πΌ, of a test is the largest probability of rejecting the null hypothesis when it is in fact true. In this case, if Hπ is true, the test statistic, π , has binomial(10, 0.5) distribution. Thus, the probability of rejecting the null hypothesis if it is true is ( )10 ( )10 1 1 1 + = 9, πΌ = P(π = 0) + P(π = 10) = 2 2 2 or πΌ= 1 . 512 β‘ (b) If the coin is in fact loaded, with the probability of a head being 3/4, what is the power of the test? Solution: The power of a test is the probability of rejecting the null hypothesis when it is false. In this case it is πΎ = P(π = 0) + P(π = 10), where π βΌ binomial(10, 3/4). Thus, )10 ( )10 ( 3 1 + 310 3 πΎ = 1β + = β 0.0563. 4 4 410 β‘ 2. Suppose that π βΌ binomial(100, π) consider a test that rejects Hπ : π = 0.5 in favor of the alternative hypothesis H1 : π β= 0.5 provided that β£π β 50β£ > 10. Use the Central Limit Theorem to answer the following questions: Math 152. Rumbos Fall 2009 (a) Determine πΌ for this test. Solution: The signiο¬cance level of the test, πΌ, is the largest probability that the the tests rejects the null hypothesis when it is in fact true. In this case, the null hypothesis consists of the single value 0.5. It then follows that πΌ = P(β£π β 50β£ > 10), where π βΌ binomial(100, 0.5). We may use the Central Limit Theorem to approximate this value as follows. πΌ = 1 β P (β£π β 50β£ β©½ 10) = 1 β P (40 β©½ π β©½ 60) = 1 β P (39.5 < π β©½ 60.5) , where we have used the continuity correction, since we are going to use the Central Limit Theorem to approximate a discrete distribution; namely, π has an approximate normal(50, 25) distribution in this case. We then have that πΌ β 1 β P (39.5 < π β©½ 60.5) , where π βΌ normal(50, 25). Consequently, πΌ β 1 β (πΉπ (60.5) β πΉπ (39.5)), where πΉπ is cdf of π βΌ normal(50, 25). We then have that πΌ β 0.0357. β‘ (b) Estimate the power of the test as a function of π and graph it. Solution: The power of a test is the probability that null hypothesis will be rejected when it is false. In this case, Hπ is false when π β= 0.5. Thus, for each π β= 0.5, the power of the test is a function of π given by πΎ(π) = P(β£π β 50β£ > 10), where 1 π βΌ binomial(100, π) for π β= . 2 2 Math 152. Rumbos Fall 2009 3 We then have that πΎ(π) = P(β£π β 50β£ > 10) = 1 β P(β£π β 50β£ β©½ 10) = 1 β P(40 β©½ π β©½ 60) = 1 β P(39.5 < π β©½ 60.5), where we have used again the continuity correction, since we are going to be applying the Central Limit Theorem to approximate the distribution of π by that of a normal(100π, 100π(1 β π)) random variable. We then have that πΎ(π) β 1 β P(39.5 < ππ β©½ 60.5), where ππ denotes a normal(100π, 100π(1 β π)) random variable. Thus, πΎ(π) β 1 β (πΉππ (60.5) β πΉππ (39.5)), (1) where πΉππ denotes the cdf of ππ βΌ normal(100π, 100π(1 β π)). The formula in (1) can be input into R by typing the following commands: p <- seq(0.01,0.99, by=0.01) which sets up and array of values of π from 0.01 to 0.99 in steps of 1/100, gammap <- 1-(pnorm(60.5,100*p,sqrt(100*p*(1-p))) -pnorm(39.5,100*p,sqrt(100*p*(1-p)))) which computes the approximate values of πΎ(π) according to formula (1), and stores then in an array called gammap. We can then use the plot function in R by typing plot(p,gammap,type=βlβ,ylab="Power at p") The last R command generates a sketch of the graph of πΎ(π) as a function of π shown in Figure 1 on page 4. β‘ Fall 2009 0.6 0.4 0.0 0.2 Power at p 0.8 1.0 Math 152. Rumbos 0.0 0.2 0.4 0.6 0.8 1.0 p Figure 1: Sketch of graph of power function for test in Problem 2 4 Math 152. Rumbos Fall 2009 5 3. Let π1 , π2 , . . . , π8 denote a random sample of size π = 8 from a Poissonπ 8 β distribution and put π = ππ . Reject the null hypothesis Hπ : π = 0.5 in π=1 favor of the alternative H1 : π > 0.5 provided that π β©Ύ 8. (a) Compute the signiο¬cance level, πΌ, of the test. Solution: The signiο¬cance level, πΌ, is the largest probability that the test will reject Hπ when it is in fact true. Since, Hπ is true only when π = 0.5, we get that πΌ = P(π β©Ύ 8), where π βΌ Poisson(8(0.5)), since π is the sum of 8 independent Poisson(0.5) random variables if Hπ is true. It then follows that πΌ = β β 4π π=8 π! = 1βπ πβ4 β4 ( ) 47 42 43 + + β β β + 1+4+ 2 3! 7! β 0.0511. β‘ (b) Determine the power function, πΎ, as a function of π. Solution: The power of the test is the probability of the test will reject Hπ when it is false. Thus, πΎ(π) = P(π β©Ύ 8), where π βΌ Poisson(8π), where π β= 0.5. Thus, ( ) (8π)2 (8π)3 (8π)7 β8π πΎ(π) = 1 β π 1 + 8π + + + β β β + . 2 3! 7! β‘ 4. Let π1 , π2 , . . . , ππ denote a random sample of size π = 25 from a Normal(π, 100). Reject the null hypothesis Hπ : π = 0 in favor of the alternative H1 : π = 1.5 provided that π π > 0.64. Math 152. Rumbos Fall 2009 6 (a) Compute the signiο¬cance level, πΌ, of the test. Solution: The signiο¬cance level, πΌ, is the probability that the test will reject the null hypothesis when in fact Hπ is true. Thus, πΌ = P(π π > 0.64), where π π βΌ normal(0, 100/25), or π π βΌ normal(0, 4). We then have that πΌ = 1 β P(π π β©½ 0.64) = 1 β πΉπ π (0.64), where π π βΌ normal(0, 4); thus, πΌ β 0.3745. β‘ (b) What is the power of the test? Solution: The power of the test is the probability that the test will reject the null hypothesis when it is false. In this case, the power, πΎ, is πΎ = P(π π > 0.64), where π π βΌ normal(1.5, 4), or πΎ = 1 β P(π π β©½ 0.64) = 1 β πΉπ π (0.64), where π π βΌ normal(1.5, 4); thus, πΎ β 0.6664. β‘ 5. Let π1 , π2 , . . . , ππ denote a random sample from a Normal(π, π 2 ). Consider testing the null hypothesis Hπ : π = ππ (2) against the alternative H1 : π β= ππ . Suppose that the test rejects Hπ provided that β£π π β ππ β£ > π for some π > 0. (a) If the signiο¬cance level of the test is πΌ, determine the value of π. Suggestion: Use the π‘(π β 1) distribution. Solution: Consider the ππ statistic deο¬ned by ππ = π π β ππ β , ππ / π where ππ2 is the sample variance. Then, the rejection region, π , is deο¬ned by the condition β π β£ππ β£ > π. ππ Math 152. Rumbos Fall 2009 7 Now, if the null hypothesis is true, it follows that ππ βΌ π‘(π β 1), and ( β ) π P β£ππ β£ > π = πΌ. ππ We therefore want where π‘πΌ/2,πβ1 β π π = π‘πΌ/2,πβ1 , ππ has the property that P(β£ππ β£ > π‘πΌ/2,πβ1 ) = πΌ, We then have that where ππ βΌ π‘(π β 1). ππ π = π‘πΌ/2,πβ1 β . π β‘ (b) Using the value of π found in part (b), obtain a range of values, depending on the sample mean and standard deviation, π π and ππ , respectively, for ππ such that the null hypothesis, Hπ , in (2) is not rejected. Solution: The null hypothesis, Hπ : π = ππ , is not rejected if ππ β£π π β ππ β£ β©½ π‘πΌ/2,πβ1 β , π or ππ β£ππ β π π β£ β©½ π‘πΌ/2,πβ1 β . π Hence, Hπ : π = ππ is not rejected if ππ ππ π π β π‘πΌ/2,πβ1 β β©½ ππ β©½ π π + π‘πΌ/2,πβ1 β . π π In other words, Hπ : π = ππ is not rejected if ππ lies in the interval ] [ ππ ππ π π β π‘πΌ/2,πβ1 β , π π + π‘πΌ/2,πβ1 β , π π which is a 100(1 β πΌ)% conο¬dence interval for the mean, ππ , of the distribution. β‘