Math 6010 Solutions to homework 4

advertisement
Math 6010
Solutions to homework 4
1, p. 113. First let us start with some probability theory: Suppose a/b > 0, and
define the function
g(x) := 1 −
1
1 + x(a/b)
(x ≥ 0).
The question we ask is, what is the distribution of g(X) when X ∼ Fa,b ?
As in 5010, we begin by first computing the cdf of g(X). Note that
0 ≤ g(X) ≤ 1. Therefore, we need only to compute the following for
0 ≤ y ≤ 1:
1
P {g(X) ≤ y} = P 1 −
≤y
1 + X(a/b)
1
=P
≥1−y
1 + X(a/b)
a
1
=P 1+X
≤
b
1−y
a
y
=P X
≤
b
1−y
y
b
=P X≤
·
.
1−y
a
We differentiate [d/dy] to find the pdf of g(X):
y
b
d
y
b
fg(X) (y) = fX
×
1−y
a
dy 1 − y
a
y
b
1
b
= fX
×
.
1−y
a
(1 − y)2 a
Recall from your 5080 text that
a −(a+b)/2
fX (x) ∝ x(a/2)−1 1 + x
.
b
1
In particular,
fX
y
1−y
(a/2)−1 −(a+b)/2
b
y
y
∝
1+
a
1−y
1−y
−(a+b)/2
y (a/2)−1
1
=
·
1−y
(1 − y)(a/2)−1
= y (a/2)−1 (1 − y)(b/2)+1 .
This tells us that
fg(X) (y) ∝ y (a/2)−1 (1 − y)(b/2)−1
and hence
g(X) ∼ Beta
a b
,
2 2
(0 ≤ y ≤ 1),
.
(∗)
Now we can solve our problem.
Recall that under H0 : β1 = · · · − = βp−1 = 0,
F :=
R2 n − p
∼ Fp−1,n−p .
1 − R2 p − 1
We write R2 in terms of F :
p−1
p−1
p−1
p−1
2
2
2
2
(1 − R )F
= R =⇒ F
=R +R F
=R 1+F
n−p
n−p
n−p
n−p
p−1
F
1
n−p
2
=1−
= g(F ),
=⇒ R =
p−1
p−1
1+F
1+F
n−p
n−p
2
with a := p − 1 and b := n − p. Thanks to (∗), we have
p−1 n−p
H
R2 ∼0 Beta
,
.
2
2
2, p. 113. This is an easy but important exercise, as it tells us that our estimators
R2 and F are unit free. To be concrete, suppose the Yi ’s are measured
in pounds. Because Y − Ŷ = (I − H)Y , the coordinates of Y − Ŷ are
also measured in pounds. In particular, RSS = kY − Ŷ k2 is measured in
(pounds)2 . Similarly, RSSH0 is measured in (pounds)2 . This shows that
Pn
F has no units. Because i=1 (Yi − Ȳ )2 is also measured in (pounds)2 , it
follows also that R2 has no units.
2
2, p. 117. Define

Y1,1
 .. 
 . 


Y1,n 
,

Y := 

 Y2,1 
 . 
 .. 
Y2,n


x1
 ..
 .

xn
X := 
0

 .
 ..
β1
β :=
,
β2
0

0
.. 
. 

0
,
x1 

.. 
. 
xn

ε1,1
 .. 
 . 


ε1,n 
.

ε := 

 ε2,1 
 . 
 .. 
ε2,n

Then we have
Y = Xβ + ε.
In other words, our problem is a generalized linear model with p = 2.
Now,
Pn
0
XX=
i=1
0
x2i
Pn0
2
i=1 xi
=
n
X
x2i I
=⇒
1
(X 0 X)−1 = Pn
i=1
i=1
x2i
I.
We are testing H0 : β1 − β2 = 0. That is, q = 1, A = (1 , −1) and c = 0.
Since
2
A(X 0 X)−1 A0 = Pn
2,
i=1 xi
it follows that
h
i0 i
−1 h
RSSH0 = RSS + c − Aβ̂ A(X 0 X)−1 A0
c − Aβ̂
Pn
x2
= RSS + (β̂1 − β̂2 ) i=1 i (β̂1 − β̂2 )
2
Pn
2
x (β̂2 − β̂2 )2
= RSS + i=1 i
.
2
This yields the formula for RSS − RSSH0 . Also,
F =
(RSSH0 − RSS)/q
=
S2
Pn
i=1
x2i (β̂2 − β̂2 )2
(β̂2 − β̂2 )2
Pn
.
=
2
2
2S
2S ( I=1 x2i )−1
Under H0 , F ∼ F1,n−2 . Therefore, our F -test can also be written as a
t-test:
β̂1 − β̂2
H0
T = s
∼ tn−2 .
2
S Pn
2
i=1 xi
3
Download