Download Document

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

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

Document related concepts
no text concepts found
Transcript
TUTORIAL 8 SOLUTIONS
#9.11.21 Suppose that a single observation X is taken from a uniform density on
[0, θ], and consider testing
H0 : θ = 1 versus H1 : θ = 2.
(a) Find a test that has significance level α =
0. What is its power?
(b) For 0 < α < 1, consider the test that
rejects when X ∈ [0, α]. What is its significance level and power?
(c) What is the significance level and power
of the test that rejects when X ∈ [1 −
α, 1]?
(d) Find another test that has the same significance level and power as the previous
one.
(e) Does the likelihood ratio test determine
a unique rejection region?
1
(f) What happens if the null and alternative
hypotheses are interchanged –
H0 : θ = 2 versus H1 : θ = 1 ?
Solution
a. Such a test is to reject H0 if X > 1
and do not reject H0 otherwise. Here
α = P (X > 1|H0) = 0,
and
Power = P (X > 1|H1) = 0.5.
b. For this test, the significance level is
P (0 < X < α|H0) = α,
and the power is
α
P (0 < X < α|H1) = .
2
2
c. For this test, the significance level is
P (1 − α < X < 1|H0) = α,
and the power is
α
P (1 − α < X < 1|H1) = .
2
d. The tests in b. and c. are two different tests with the same significance level
and power.
e. The likelihood ratio statistic is
I{0 < x < 1}
f0(x)
=
f1(x)
(1/2)I{0 < x < 2}
2 if 0 < x < 1,
=
0 if 1 < x < 2,
where
1 if 0 < x < 1,
I{0 < x < 1} =
0 otherwise,
and
1 if 0 < x < 2,
I{0 < x < 2} =
0 otherwise.
3
This likelihood ratio statistic takes only
values 0 and 2. Note that f0(x)/f1(x) = 2
if and only if 0 < x < 1. Hence if α > 0,
the rejection region is not unique since the
set 0 < x < 1 needs to be “broken up” in
order to obtain a likelihood ratio test with
such an α. For example, b. and c. are likelihood ratio tests with the same significance
level α.
f. If the null and alternative hypotheses
are interchanged, i.e.
H0 : θ = 2 versus H1 : θ = 1,
then the significance level and power of the
tests in a., b. and c. will be correspondingly different.
4
Now the likelihood ratio test statistic is
(1/2)I{0 < x < 2}
f0(x)
=
f1(x)
I{0 < x < 1}
1/2 if 0 < x < 1,
=
∞ if 1 < x < 2,
which takes values 1/2 and ∞.
Given 0 < α < 1/2, a likelihood ratio test
is: we reject H0 if and only if X < 2α since
P (0 < X < 2α|H0) = 2α(1/2) = α.
This test will have power
P (0 < X < 2α|H1) = 2α.
The likelihood ratio test is again not unique.
Another likelihood ratio test with the same
significance level and power is: Reject H0 if
and only if 1 − 2α < X < 1.
5
#9.11.24 Let X be a binomial random
variable with n trials and probability p of
success.
a. What is the generalized likelihood ratio
for testing
H0 : p = 0.5 versus HA : p 6= 0.5?
b. Show that the test rejects for large values
of |X − n/2|.
c. Using the null distribution of X, show
how the significance level corresponding
to a rejection region |X − n/2| > k can
be determined.
d. If n = 10 and k = 2, what is the significance level of the test?
e. Use the normal approximation to the binomial distribution to find the significance
level if n = 100 and k = 10.
Solution
6
a. The generalized likelihood ratio test
statistic is
n
n
(1/2)
x Λ=
.
n x
n−x
max0<p<1 x p (1 − p)
The denominator is maximized when p =
x/n, the mle of p under Ω. Hence
n/2 x n/2 n−x
) (
)
Λ=(
.
x
n−x
b.
Λ =
=
=
=
n/2 x n/2 n−x
(
) (
)
x
n−x
2x −2+2x/n n/2
2x −2x/n
[( )
(2 − )
]
n
n
[y −y (2 − y)−(2−y)]n/2
[(1 + v)−(1+v)(1 − v)−(1−v)]n/2,
where y = 2x/n = 1 + v.
The last expression is symmetric about v =
0 and is a maximum at v = 0.
7
Since the test rejects H0 when Λ is small, it
rejects H0 if and the only if |v| = |1 − 2x/n|
is large. This is equivalent to |X − n/2| is
large.
c. The significance level α of the test that
rejects H0 when |X − n/2| > k is given by
P (|X − n/2| > k|H0).
This probability can be determined using
the pmf of the B(n, 0.5) distribution.
d. If n = 10 and k = 2,
P (|X − n/2| > k|H0)
= P (|X − 5| > 2|H0)
= P (X = 0|H0) + P (X = 1|H0)
+P (X = 2|H0) + P (X = 8|H0)
+P (X = 9|H0) + P (X = 10|H0)
= 0.11.
8
e. Using the normal approximation to the
binomial distribution B(100, 0.5), X is approximately normally distributed with mean
50 and variance np(1 − p) = 25. Thus the
significance level of the test is
P (|X − 50| > 10) ≈ P (|Z| > 2) = 0.046.
Here Z ∼ N (0, 1).
9
#9.11.30 Suppose that the null hypothesis is true, that the distribution of the test
statistic, T say, is continuous with cdf F
and that the test rejects for large values of
T . Let V denote the p-value of the test.
a. Show that V = 1 − F (T ).
b. Conclude that the null distribution of V
is uniform.(Hint: See Proposition C of
Section 2.3.)
c. If the null hypothesis is true, what is the
probability that the p-value is greater than
0.1?
d. Show that the test rejects if V < α has
significance level α.
10
Solution
a. Let the value of the observed T statistic
be T = t. Under H0,
p-value = P (T > t)
= 1 − P (T ≤ t)
= 1 − F (t).
Hence V = 1 − F (T ).
b. From Proposition C of Section 2.3,
F (T ) has the uniform distribution on [0, 1].
The cdf’s of F (T ) and 1 − F (T ) are the
same and so 1 − F (T ) also has a uniform
distribution on [0, 1].
Hence it follows from a. that V has the
uniform distribution on [0, 1].
c. It follows from b. that under H0,
P (V > 0.1) = 0.9.
11
d. Consider a test that rejects H0 if V <
α. Then the significance level of this test is
P (V < α|H0) = α
since V has the uniform distribution on [0, 1]
under H0.
12
#9.11.40 Consider testing goodness of fit
for a multinomial distribution with two cells.
Denote the number of observations in each
cell by X1 and X2 and let the hypothesized
probabilities be p1 and p2.
Pearson’s chi-square statistic is equal to
2
X
(Xi − npi)2
i=1
npi
.
Show that this may be expressed as
(X1 − np1)2
.
np1(1 − p1)
Because X1 is binomially distributed, the
following holds approximately under the null
hypothesis:
X1 − np1
p
∼ N (0, 1).
np1(1 − p1)
13
Thus, the square of the quantity on the
left-hand side is approximately distributed
as a chi-square random variable with 1 degree of freedom.
Solution Observe that p1 + p2 = 1 and
X1 + X2 = n. Then Pearson’s chi-square
statistic is equal to
(X1 − np1)2 (X2 − np2)2
+
np1
np2
(X1 − np1)2 (n − X1 − n(1 − p1))2
=
+
np1
n(1 − p1)
(X1 − np1)2
=
.
np1(1 − p1)
14
Related documents