Você está na página 1de 13

TUTORIAL 7 SOLUTIONS

#9.11.2 Which of the following hypothe-


ses 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.

Solution
a. This is a simple hypothesis.
b. This is another simple hypothesis.
c. This is a composite hypothesis.
d. This is another composite hypothesis
as the variance is unknown.

1
#9.11.6 Consider the coin tossing exam-
ple of Section 9.1. Suppose that instead of
tossing the coin 10 times, the coin was tossed
until a head came up and the total number
of tosses, X, was recorded.
a. If the prior probabilities are equal, which
outcomes favor H0 and which outcomes
favor H1?
b. Suppose P (H0)/P (H1) = 10. What out-
comes favor H0?
c. What is the significance level of a test
that rejects H0 if X 8?
d. What is the power of this test?

Solution
From Chapter 9.1, we have
H0 : probability of heads is 0.5 versus
H1 : probability of heads is 0.7.

2
The following is a Bayesian hypothesis test-
ing approach (in contrast to the Neyman-
Pearson approach).
Let P (H0) be the prior probability that
H0 is true and P (H1) be the prior probabil-
ity that H1 is true. Clearly
P (H0) + P (H1) = 1.
After observing the number of heads, X, in
10 tosses of a coin, the posterior probability
that H0 is true is given by
P (H0, x)
P (H0|x) =
P (x)
P (x|H0)P (H0)
= .
P (x)
Here
P (x) = P (x|H0)P (H0) + P (x|H1)P (H1).

3
Likewise, the posterior probability that H1
is true is given by
P (H1, x)
P (H1|x) =
P (x)
P (x|H1)P (H1)
= .
P (x)
This implies that we reject H0 if
P (H0|x) P (H0) P (x|H0)
= < 1,
P (H1|x) P (H1) P (x|H1)
and accept H0 if
P (H0|x) P (H0) P (x|H0)
= > 1.
P (H1|x) P (H1) P (x|H1)

Note In the Bayesian hypothesis testing


approach, there is a symmetry between the
null hypothesis H0 and the alternative hy-
pothesis H1.

4
Note that X has the geometric distribu-
tion with probability of heads equals p where
p = 0.5 under H0 and p = 0.7 under H1.
The pdf of X is
P (X = k) = (1 p)k1p, k = 1, 2, . . .

a. If P (H0) = P (H1) = 0.5, then


P (H1|x) P (x|H1)
= .
P (H0|x) P (x|H0)
We observe that
x 1 2 3 4 5
P (x|H1)
P (x|H0)
1.4 0.84 0.504 0.302 0.181
x 6 7 8 9 10
P (x|H1)
P (x|H0)
0.109 0.065 0.039 0.024 0.014

P (x|H )
Since P (x|H1) > 1 if and only if x 1, we
0
conclude that X 1 heads would favor H1
while X 2 heads would favor H0.
5
b. If P (H0)/P (H1) = 10, then we would
reject H0 if and only if
P (H1|x) P (H1) P (x|H1)
=
P (H0|x) P (H0) P (x|H0)
P (x|H1)
= > 1.
10P (x|H0)
This is equivalent to rejecting H0 if and only
if
P (x|H1)
> 10.
P (x|H0)
From the table of ratios of posterior proba-
bilities, we shall always accept H0.

c. The significance level of the test that


rejects H0 when X 8 is
= P (X 8|H0)

X
= (0.5)i
i=8
= 0.0078.

6
d. The power of the test in c. is given by
power = P (RejectH0|H1)
= P (X 8|H1)

X
= (0.7) (0.3)i
i=7
= 0.0002187.

7
#9.11.10 Suppose that X1, . . . , Xn form
a random sample from a density function,
f (x|), for which T is a sufficient statistic
for . Show that the likelihood ratio test of
H0 : = 0 versus H1 : = 1
is a function of T . Explain how, if the distri-
bution of T is known under H0, the rejection
region of the test may be chosen so that the
test has level .

Solution The likelihood ratio test rejects


H0 if
f (x|0)
<c
f (x|1)
for some constant c. Since T is a sufficient
statistic, by the factorization theorem in Chap-
ter 8.8.1, we have
f (x|0) g[T (x), 0]h(x) g[T (x), 0]
= = .
f (x|1) g[T (x), 1]h(x) g[T (x), 1]

8
This implies that the likelihood ratio test
is a function of T .
Suppose now that the distribution of T is
known under H0 and is, say, T F .
We further assume that g[T (x), 0]/g[T (x), 1]
is a strictly increasing function of T . Then
g[T (x), 0]
<c
g[T (x), 1]
if and only if T < c0 for some constant c0.
Then at level , the critical constant can
be chosen to be c0 = F (1 ) where F (1
) is the 100th percentile of F since under
H0 ,
P (T < F (1 )) = .

9
#9.11.17 Let X N (0, 2) and con-
sider testing H0 : = 0 versus HA : =
1, where 1 > 0. The values 0 and 1
are fixed.
a. What is the likelihood ratio as a function
of x? What values favor H0? What is
the rejection region of a level test?
b. For a sample, X1, X2, . . . , Xn, distributed
as above, repeat the previous question.
c. Is the test in the previous question uni-
formly most powerful for testing H0 : =
0 versus H1 : > 0?

10
Solution
a. The likelihood ratio is given by
1 x2/(2 2 )
2 1/2 e 0
f (x|0) (20 )
= 2/(2 2 )
f (x|1) 1 e x 1
2
(21 ) 1/2

1 x2 1 1
= exp[ ( 2 2 )].
0 2 1 0
Since 1 > 0, small values of x2 would
favor H0. I.e., we reject H0 if X 2 > c for
some constant c.
Note that under H0, X 2/02 21 distri-
bution.
Consequently at significance level , we re-
ject H0 if
X 2 > 0221()
where 21() is the 100(1 )th percentile
of the 21 distribution.

11
b. For a sample, X1, X2, . . . , Xn, dis-
tributed as above, the likelihood ratio is
Yn
f (xi|0)
f (xi|1)
i=1
1 x2/(2 2 )
n
Y 2 1/2 e i 0
(20 )
= 2/(2 2 )
1 x
i=1 (2 2)1/2 e i 1
1 P
n 2
1 n x
i=1 i 1 1
= ( ) exp[ ( 2 2 )].
0 2 1 0
Thus the likelihood
Pn ratio2 test rejects H0
for large values of i=1 Xi . I.e., reject H0
if
Xn
Xi2 > c
i=1
for some constant c.
Pn 2 / 2 2
Note that under H0, X
i=1 i 0 n
distribution.

12
Consequently at significance level , we re-
ject H0 if
Xn
Xi2 > 022n()
i=1
where 2n() is the 100(1 )th percentile
of the 2n distribution.

c. Yes, the test in the previous question


is uniformly most powerful for testing H0 :
= 0 versus H1 : > 0 because the test
statistic as well as the critical value do not
depend on 1 > 0.

13

Você também pode gostar