0% found this document useful (0 votes)
19 views6 pages

A3 Solution

The document provides suggested solutions for an assignment in a statistics course at the University of Hong Kong. It includes methods for constructing confidence intervals for variance, testing hypotheses about means, and deriving rejection regions for various statistical tests. Key concepts discussed involve the use of chi-squared distributions, t-tests, and likelihood ratio tests.

Uploaded by

Chan Hufflepuff
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views6 pages

A3 Solution

The document provides suggested solutions for an assignment in a statistics course at the University of Hong Kong. It includes methods for constructing confidence intervals for variance, testing hypotheses about means, and deriving rejection regions for various statistical tests. Key concepts discussed involve the use of chi-squared distributions, t-tests, and likelihood ratio tests.

Uploaded by

Chan Hufflepuff
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

THE UNIVERSITY OF HONG KONG

DEPARTMENT OF STATISTICS AND ACTUARIAL SCIENCE

STAT1302/2602 Probability and Statistics II (1st semester, 2016-2017)


Suggested solutions for Assignment 3

Q1. Let X1 , X2 , . . . , Xn be an independent random sample from N (µ, σ 2 ) with known mean µ. Describe
how you would construct a confidence interval for the unknown variancePσ 2 . (5 marks)
n 2 2
(X i − X̄) nS
Solution: Method 1: To construct the confidence interval for σ 2 , we use i=1 2 = 2 ∼ χ2n−1
σ σ
which is a pivotal quantity involving σ 2 . Let α be the significance level, then

nS 2
 
2 2
1 − α = P χ1−α/2,n−1 6 2 6 χα/2,n−1
σ
!
nS 2 2 nS 2
= P 6σ 6 2 ,
χ2α/2,n−1 χ1−α/2,n−1

where χ2α,n satisfies P (T > χ2α,n ) = α for T ∼ χ2n . So, a 1 − α confidence interval of σ 2 is given by
!
nS 2 nS 2
, .
χ2α/2,n−1 χ21−α/2,n−1

Method 2: Since Pn
i=1 (Xi − µ)2
∼ χ2 (n),
σ2
a 1 − α confidence interval of σ 2 is given by
Pn Pn !
2 2
i=1 (Xi − µ) i=1 (Xi − µ)
, .
χ2α/2,n χ21−α/2,n

Q2. Let X̄ and S 2 be the mean and the variance of a random sample of size n = 17 from a distribution
N (µ, σ 2 ). Find the constant c such that
 
4(X̄ − µ)
P −c < < c = 0.95.
S

(5 marks)
Solution: We have
X̄ − µ 4(X̄ − µ)
T = √ = ∼ tn−1 ,
S/ n − 1 S

1
and  
4(X̄ − µ)
P −t0.025,17−1 < < t0.025,17−1 = 0.95.
S
Thus
c = t0.025,17−1 = 2.1199.

Q3. Let X1 , X2 , · · · , Xn be an independent random sample from N (µ, σ 2 ), where µ and σ 2 ae unknown.
Suppose that √ √ 
nS nS
1−α=P √ 6σ6 √ .
b a
√ √ 
nS nS
Hence, √ , √ is the 1 − α confidence interval of σ, and it has the length
b a
√ √
nS nS
k= √ − √ .
a b
Show that the values of a and b for σ of minimum length satisfy the following equations:

(i) G(b) − G(a) = 1 − α;

(ii) an/2 e−a/2 − bn/2 e−b/2 = 0,

where G(·) is the c.d.f. of χ2n−1 . (10 marks)


Solution: (i) First we have
nS 2
∼ χ2n−1 ,
σ2
then
√ √ 
nS nS
1−α = P √ 6σ6 √
b a
2
 
nS
= P a6 2 6b
σ
= G(b) − G(a).
√ √
nS nS √ 1 1
(ii) The length of the interval is k = √ − √ = nS( √ − √ ), denote
a b a b
1 1
f (a, b) = √ − √ .
a b
We need to minimize f (a, b) with the constrain G(b) − G(a) = (1 − α). Set
1 1
L(a, b, λ) = √ − √ − λ [G(b) − G(a) − (1 − α)] .
a b

2
Then we have
1 3
L0a (a, b, λ) = − a− 2 + λg(a),
2
1 3
L0b (a, b, λ) = b− 2 − λg(b),
2
where g(·) is the p.d.f. of χ2n−1 . For X ∼ χ2k , the p.d.f is given by
1 k x
g(x) = k k
 x 2 −1 e− 2 .
2 Γ2
2

It follows that
1 2g(a) 2g(b)
= −3 = −3 .
λ a 2 b 2
Substitute g(a) and g(b) into the above equations, we have

an/2 e−a/2 − bn/2 e−b/2 = 0.

Q4. Let X be N (µ, 100).


(i) To test H0 : µ = 230 versus H1 : µ > 230, what is the rejection region specified by the generalized
likelihood ratio test? (5 marks)
(ii) Is this test uniformly most powerful? (5 marks)
(iii) If a random sample of n = 16 yielded x̄ = 232.6, is H0 accepted at a significance level of
α = 0.10? (5 marks)
Solution: (i) First we have

Ω = {µ: µ > 230} ,

Ω0 = {µ: µ = 230} ,

Ω1 = {µ: µ > 230} .

The likelihood function of the sample is


 n " n
#
1 1 X
L(µ) = √ exp − (Xi − µ)2 .
10 2π 200 i=1

On Ω0 , the likelihood function is


 n " n
#
1 1 X
L(Ω0 ) = √ exp − (Xi − 230)2 .
10 2π 200 i=1

3
On Ω, the maximum value of L(µ) is L(µ̂), where

X̄, if X̄ > 230,
µ̃ =
230, if X̄ < 230.

Therefore,   n
1
 1 Pn 2

 √ exp − 200 i=1 (X i − X̄) , if X̄ > 230,
L(Ω) =  10 2π n
1
 1
P n 2

 √
10 2π
exp − 200 i=1 (Xi − 230) , if X̄ < 230.

Then   1 Pn Pn 
L(Ω0 ) 2 2
exp − 200 i=1 (X i − 230) − i=1 (X i − X̄) , if X̄ > 230,
Λ= =
L(Ω) 1, if X̄ < 230.
The rejection region is {Λ 6 k} for some constant k ∈ (0, 1). Then {Λ 6 k} ⊆ X̄ > 230 is equivalent to

n(X̄ − 230)2
 
exp − 6 k,
200

or
X̄ − 230 > k 0 .

Let √ √ 0
0
 n(X̄ − 230) nk
α = P X̄ − 230 > k =P > ,
10 10

nk0
so we should set 10
= zα . Hence, the generalized likelihood ratio test has the rejection region
√ 
n(X̄ − 230)
> zα
10

at the significance level α.


(ii) The most powerful test for H0 : µ = 230 against H1 : µ = µ1 > 230 having significance level
α∗ 6 α is the one having the rejection region
√ 
n(X̄ − 230)
> zα .
10

Since this rejection region does not depend on the value of µ1 , we know immediately that the uniformly
most powerful test with significance level for testing H0 : µ = 230 against H1 : µ > 230 has the same
n√ o
n(X̄−230)
rejection region 10
> zα . Thus, we can conclude that this test is most powerful test.
(iii) Critical region method: When α = 0.10, the rejection region is
(√ )
16(X̄ − 230) 
C= > z0.10 = 1.282 = X̄ > 233.203 .
10

4
The observed x̄ = 232.6 ∈
/ C, thus H0 cannot be rejected at α = 0.10.
p-value method:
√ √ !
16(X̄ − 230) 16(232.6 − 230)
p − value = P > = P (Z > 1.04) = 0.14917 > 0.10,
10 10

thus, H0 cannot be rejected at α = 0.10.

Q5. To test H0 : µ = 335 versus H1 : µ < 335, under normal assumptions, a random sample of size 17
yielded x̄ = 324.8 and s = 40. Is H0 accepted at an α = 0.10 significance level? (5 marks)
Solution: Critical region method: The rejection region is

X̄ − µ
C = {X̄ : √ < −tα,n−1 }.
S/ n − 1
x̄ − µ 324.8 − 335
The realized test statistic = √ = √ = −1.02 > −t0.10,16 = −1.337. Thus x̄ = 324.8 ∈
/
s/ n − 1 40/ 17 − 1
C, we cannot reject H0 at α = 0.10 significance level.

Q6. Let X1 , · · · , Xn be an independent random sample from N (µ, σ 2 ) with unknown mean µ and
σ 2 . Show the details to find the generalized likelihood ratio test for hypotheses H0 : µ > µ0 versus
H1 : µ < µ0 . (10 marks)
Solution: First, we have

Ω = {(µ, σ): − ∞ < µ < ∞, σ > 0} ,

Ω0 = {(µ, σ): µ > µ0 , σ > 0} ,

Ω1 = {(µ, σ): µ < µ0 , σ > 0} .

The likelihood function of the sample is


 n "n
#
1 1 X
L(µ, σ) = √ exp − 2 (Xi − µ)2 .
σ 2π 2σ i=1

On Ω, the maximum value of L(µ, σ) is L(µ̂, σ̂), where


n
1X2
µ̂ = X̄ and σ̂ = (Xi − X̄)2 .
n i=1

Therefore,  n
1  n
L(Ω) = L(µ̂, σ̂) = √ exp − .
σ̂ 2π 2

5
On Ω0 , the maximum value of L(µ, σ) is L(µ̃, σ̃), where

X̄, if X̄ > µ0 ,
µ̃ =
µ0 , if X̄ < µ0 ,

∂`(µ, σ) ∂`(µ, σ)
since > 0 when µ < X̄ and < 0 when µ > X̄. And
∂µ ∂µ
n
1X
σ̃ 2 = (Xi − µ̃)2 .
n i=1

Therefore,  n
1  n
L(Ω0 ) = L(µ̃, σ̃) = √ exp − .
σ̃ 2π 2
Then the generalized likelihood ratio statistic is

 2 n/2  1, if X̄ > µ0 ,
L(Ω0 ) σ̂  Pn 2
n/2
Λ= = = (X − X̄)
L(Ω) σ̃ 2  Pni=1 i 2
, if X̄ < µ0 .
i=1 (Xi − µ0 )

The rejection region is {Λ > k} for some constant k ∈ (0, 1). Then {λ > k} ⊆ X̄ < µ0 } and Λ 6 k is
equivalent to
Pn Pn
(Xi − X̄)2 i=1 (Xi − X̄)
2
1
i=1
Pn 2
= Pn = n(X̄−µ0 )2
6 k 2/n ,
i=1 (Xi − µ0 )
2 2
i=1 (Xi − X̄) + n(X̄ − µ0 ) 1+ Pn 2
i=1 (Xi −X̄)

that is
(X̄ − µ0 )2 n(X̄ − µ0 )2
= P n > k −2/n − 1,
S2 i=1 (X i − X̄) 2

or
X̄ − µ0
√ 6 c,
S/ n − 1
p
where c = − (n − 1)(k −2/n − 1). To determine the value of c, set the significance level is α, we have
 
X̄ − µ0
P √ 6 c = α,
S/ n − 1

thus we should let c = −tα,n−1 . Hence, the generalized likelihood ratio test has the rejection region
 
X̄ − µ0
√ 6 −tα,n−1
S/ n − 1

at the significance level α.

You might also like