Download Math 152. Rumbos Fall 2009 1 Solutions to Assignment #10 1. We

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
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 flips 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 significance level of the test?
Solution: The significance 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 significance 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 significance level, 𝛼, of the test.
Solution: The significance 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 significance level, 𝛼, of the test.
Solution: The significance 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 significance level of the test is 𝛼, determine the value of 𝑏. Suggestion:
Use the 𝑑(𝑛 βˆ’ 1) distribution.
Solution: Consider the 𝑇𝑛 statistic defined by
𝑇𝑛 =
𝑋 𝑛 βˆ’ πœ‡π‘œ
√ ,
𝑆𝑛 / 𝑛
where 𝑆𝑛2 is the sample variance. Then, the rejection region, 𝑅, is
defined 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 βˆ’ 𝛼)% confidence interval for the mean, πœ‡π‘œ , of
the distribution.
β–‘
Related documents