Vous êtes sur la page 1sur 3

STATS 200 (Stanford University, Winter 2015)

Solutions to Homework 5
DeGroot & Schervish X.Y .Z means Exercise Z at the end of Section X.Y in our text,
Probability and Statistics (Fourth Edition) by Morris H. DeGroot and Mark J. Schervish.
1. DeGroot & Schervish 9.1.2.
Solution to (a): The power function of the test is
n

Power() = P (Yn 1.5) = P (max Xi 1.5) = P (Xi 1.5) = [P (X1 1.5)] = (


1in

i=1

for 1.5, and Power() = 1 for < 1.5.

1.5 n
)

Solution to (b): Power() is a non-increasing function of , so


sup Power() = Power(2) = (
2

1.5 n
3 n
) =( ) .
2
4

Thus, the size of the test is (3/4)n .

2. Let X be a single observation of an Exp() random variable, which has pdf

exp(x)
f (x) =

if x 0,
if x < 0.

Let 0 > 0 be fixed and known, and consider testing H0 0 versus H1 < 0 .
(a) Find the power function of the hypothesis test that rejects H0 if and only if X c.

Solution: Power() = P (X c) = c f (x) dx = exp(c).

(b) Let 0 < < 1. Find a value of c such that the test in part (a) has size .
Solution: Power() is a non-increasing function of , so
sup Power() = Power(0 ) = exp(0 c).
0

Thus, the size of the test is exp(0 c). Then the test has size if and only if
exp(0 c) = c =
noting that log is negative since 0 < < 1.

log
,
0

Solutions to Homework 5

(c) For what true values of is P (type II error) 1/2 for the test in part (a) with
size as in (b)?
Solution: P (type II error) 1/2 if and only if both < 0 and Power() 1/2.
The test in part (a) with size as in (b) has power function
Power() = exp[(

log
)] = /0 ,
0

and hence
Power() 1/2

0 log 2
,
log

again noting that log is negative. Thus, P (type II error) 1/2 if and only if

0 log 2
< 0 .
log

(Note that if 1/2, then there are no such values of .)

3. Let X1 , X2 iid Bin(1, ), and consider testing H0 = 1/3 versus H1 < 1/3.
(a) Find a test that has size 2/9 exactly.
Note: Your test must be based on a rejection region that is some set of possible
values of X1 and X2 . In other words, you cannot make up other data or use any
other random mechanism to make the decision about whether or not to reject H0 .
Solution: Note that there are only four possible values of (X1 , X2 ), i.e., the
sample space consists of only four points. If = 1/3, then

(0, 0)

(0, 1)
(X1 , X2 ) =

(1, 0)

(1, 1)

with
with
with
with

probability
probability
probability
probability

4/9,
2/9,
2/9,
1/9.

Thus, the only tests with size 2/9 exactly are the test that rejects H0 if and only if
(X1 , X2 ) = (0, 1) and the test that rejects H0 if and only if (X1 , X2 ) = (1, 0).

(b) Find the power function of the test from part (a), and use it to explain why this test
is not a good test of these hypotheses.
Solution: Power() = (1 ) for both of the tests from part (a). Note that
Power(1/3) > Power() for all < 1/3. Thus, these tests are more likely to reject H0
if it is true than if it is false, which is exactly the opposite of what a good hypothesis
test should do.

Solutions to Homework 5

4. DeGroot & Schervish 9.1.12.


Note: When DeGroot & Schervish write ( c ), they simply mean Power() for the
test c . Also, the cdf of X is F (x) = 1 arctan(x ) + 12 , noting that the arctan function is
strictly increasing and that the that appears in the pdf and cdf is the usual mathematical
constant, i.e., 3.14. You may use any of these facts without proof.
Solution to (a): Power() = P (X c) = 1 F (c) = 12 1 arctan(c ). Now note
that arctan(c ) is a decreasing function of since arctan itself is increasing. Then
Power() is an increasing function of .

Solution to (b): Since Power() is an increasing function of , the size of the test is
sup Power() = Power(0 ) =
0

1 1
arctan(c 0 ).
2

Then

1 1
1
arctan(c 0 ) c = 0 + tan[( )]
2
2
so the test has size if c is chosen as shown above.
=

Solution to (c): Since the test rejects H0 if and only if X c, the p-value of the test
when X = x is observed is
1 1
1 1
p(x) = sup P (X x) = sup[1 F (x)] = sup[ arctan(x )] = arctan(x 0 ),

2
0
0
0 2
noting that the expression in square brackets is an increasing function of .

5. DeGroot & Schervish 9.1.15.


Solution: First note that
x

P (X x) =

if 0 x ,
if x > .

Then

1 x
p(x) = sup P (X x) =

0
is the p-value if X = x is observed.

if x 1,
if x > 1

Vous aimerez peut-être aussi