Sunteți pe pagina 1din 5

STATS 200 (Stanford University, Summer 2015)

Solutions to Extra Homework A


This document contains some questions on the material not covered by Homeworks 15 to
help you prepare for the final exam.
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. Let X1 , . . . , Xn be iid discrete random variables with pmf

(x)x1 exp(x)

x!
f (x) =

if x {1, 2, . . .},
otherwise,

where is unknown and 0 < < 1. Consider testing H0 = 0 versus H1 0 .


Note: You may use without proof the fact that E (X1 ) = 1/(1 ).
(a) Find the score function.
Solution: The score function is
`Xn () =
=
where X n =

1
n

n
n
n
[(Xi 1) log(Xi ) Xi log(Xi !)]
i=1
i=1
i=1
n
Xn 1
1 n
(X

1)

X n ),
i
Xi = n(
i=1

i=1

i=1 Xi .

(b) Find the Fisher information.


Solution: The second derivative of the log-likelihood is
`Xn () =

n
( X n 1),
2

so the Fisher information is


In () = E [`Xn ()] =

n
1
n
(
1) =
.
2
1
(1 )

Equivalently, the Fisher information per observation is I1 () = 1/[(1 )].

(c) Find the maximum likelihood estimator.


Solution: Setting the score function equal to zero yields
n(

Xn 1
Xn 1
,
X n ) = 0 =

Xn

and it is clear from the form of the log-likelihood that this point is indeed a maximizer. Thus, the maximum likelihood estimator of is n = ( X n 1)/ X n .

Solutions to Extra Homework A

(d) Find the likelihood ratio test of these hypotheses. (You do not need to state how
to choose the critical value to give the test a particular size for this part of the
question.)
Solution: Evaluating the likelihood at 0 and at n yields
n

LXn (0 ) =
i=1
n

LXn (n ) =

n
n
X Xi 1 ni=1 Xi n
(0 Xi )Xi 1 exp(0 Xi )
= ( i
) 0
exp(0 Xi ),
Xi !
i=1 Xi !
i=1
X
1

i
(n Xi )
exp(n Xi )

i=1

Xi !

n
i=1 Xi n

X Xi 1
Xn 1
= ( i
)
)(
Xn
i=1 Xi !
n

exp[(

Xn 1 n
) Xi ].
Xn
i=1

Then the likelihood ratio statistic is


n Xi n

i=1
0 X n
LXn (0 )
=(
exp{n[(1 0 )X n 1]}
)
(Xn ) =

Xn 1
LXn ()
n

X n 1

0 X n

)
= (
exp[(1 0 )X n 1] ,

and we reject H0 if and only if (Xn ) k for some k.

(e) State how the critical value of the likelihood ratio test in part (d) can be chosen to
give the test approximate size .
Solution: To give the likelihood ratio test in part (d) approximate size , we
reject H0 if and only if
2 log (Xn ) w ,
or equivalently, if and only if
(Xn ) exp(

w
),
2

where w is the number such that P (W w ) = for a 21 random variable W .

(f) Find the Wald test of these hypotheses that is based on In (n ), and state how to
choose the critical value to give the test approximate size .
Solution: The Wald test statistic based on In (n ) is

In (n ) n 0 =

n
n (1 n )

Xn
Xn 1
n

0
Xn 1 Xn

n
(1 0 )X n 1,
=
Xn 1

n 0 =

and we reject H0 if and only if this test statistic is at least z/2 , where z/2 is the
number such that P (Z z/2 ) = for a standard normal random variable Z.

Solutions to Extra Homework A

(g) Find the Wald test of these hypotheses that is based on Jn , and state how to choose
the critical value to give the test approximate size .
Solution: The Wald test statistic based on Jn is

n( X n 1)

Xn
Xn 1

n 0 = n

0
Jn n 0 =
2

n
Xn 1 Xn

n
(1 0 )X n 1,
=
Xn 1
and we reject H0 if and only if this test statistic is at least z/2 , where z/2 is the
number such that P (Z z/2 ) = for a standard normal random variable Z.

(h) Find the score test of these hypotheses, and state how to choose the critical value to
give the test approximate size .
Solution: The score test statistic is

(1

)
X

1
n(1 0 )
0
0
n
(1 0 )X n 1,
`Xn (0 ) =

n(
X n ) =
n
0
0
In (0 )
and we reject H0 if and only if this test statistic is at least z/2 , where z/2 is the
number such that P (Z z/2 ) = for a standard normal random variable Z.

(i) Find a Wald confidence interval for with approximate confidence level 1 .
Note: You may find the Wald confidence interval based on either In (n ) or Jn .
Solution: Note from parts (f) and (g) that In (n ) = Jn , so both forms of the
Wald confidence interval with approximate confidence level 1 are

X n 1 z/2
Xn 1
X n 1 z/2
Xn 1

+
< 0 <
,
0 (0, 1)

n
n
X
X
X
X

n
n
n
n

where z/2 is the number such that P (Z z/2 ) = for a standard normal random
variable Z.

Solutions to Extra Homework A

2. Let X1 , . . . , Xn be iid continuous random variables with pdf


f (x) =

exp(x )

2,

[1 + exp(x )]

where R is unknown. Let 0 R be fixed and known, and consider testing H0 = 0


versus H1 0 . Let
n denote the maximum likelihood estimator of . (You do not
need to find it, and if your answers involve
n , then you may leave it as simply
n .)
Note: You may use without proof the fact that E [f (X1 )] = 1/6 for all R, i.e., the
random variable constructed by evaluating the pdf f at X1 has expectation 1/6 no matter
the value of .
(a) Find the score test of these hypotheses, and state how to choose the critical value to
give the test approximate size .
Solution: The score function is
`Xn () =

n
n
exp(Xi )
n
((Xi ) 2 log[1 + exp(Xi )]) = n + 2
i=1
i=1
i=1 1 + exp(Xi )
n
exp(Xi ) 1
=
.
i=1 exp(Xi ) + 1

To find the Fisher information, note that the second derivative of the log-likelihood
for the first observation is
`X1 () =

2
2 exp(X1 )
(X1 2 log[1 + exp(X1 )]) =
[
]
2

1 + exp(X1 )

2
[
]
1 + exp( X1 )
2 exp( X1 )
=
2
[1 + exp( X1 )]
2 exp(X1 )
=
2 = 2 f (X1 ).
[1 + exp(X1 )]
=

Then I1 () = E [`X1 ()] = 2 E [f (X1 )] = 1/3, and In () = n/3. Then the score
test rejects H0 if and only if

3 n exp(Xi 0 ) 1

z/2 ,
n i=1 exp(Xi 0 ) + 1
where z/2 is the number such that P (Z z/2 ) = for a standard normal random
variable Z.

Solutions to Extra Homework A

(b) Find the Wald test of these hypotheses that is based on In (


n ), and state how to
choose the critical value to give the test approximate size .
Solution: Since In (
n ) = n/3, the Wald test based on In (
n ) rejects H0 if and
only if

n 0 z/2 ,
3
where z/2 is the number such that P (Z z/2 ) = for a standard normal random
variable Z.

(c) Find the Wald confidence interval for based on In (


n ) with approximate confidence
level 1 .
Solution: Since In (
n ) = n/3, the Wald confidence interval for based on In (
n )
with approximate confidence level 1 is

3
3

0 R
n z/2
< 0 <
n + z/2
,

n
n

where z/2 is the number such that P (Z z/2 ) = for a standard normal random
variable Z.

3. Let X Bin(n, ), where is unknown and 0 < < 1. Consider testing H0 = 1/2 versus
H1 1/2. Find the likelihood ratio test of these hypotheses, and state how to give the
test approximate size .
Note: The maximum likelihood estimator of is n = X/n. You may use this fact without
proof. You also may ignore any issues that might arise from observing X = 0 or X = n.
Solution: Evaluating the likelihood at 1/2 and at n yields
1 nX
n 1
n 1 X
= ( ) n,
LX (1/2) = ( ) ( ) (1 )
2
X 2
X 2
X
nX
n X
X
n 1
LX (n ) = ( ) ( ) (1 )
= ( ) n X X (n X)nX .
X
n
n
X n
Then the likelihood ratio statistic is
1
LX (0 )
n n
(X) =
=( )
,
2 X X (n X)nX
LX (n )
and we reject H0 if and only if (X) k for some k. To give the test approximate size ,
we reject H0 if and only if
2 log (X) w ,
or equivalently, if and only if
(X) exp(

w
),
2

where w is the number such that P (W w ) = for a 21 random variable W .

S-ar putea să vă placă și