f13hw2 Solutions
f13hw2 Solutions
1.
2.7.(a) Since {Yt } is a stationary process, it has constant mean µ over
time and autocovariance function γk which is free of t. Letting Wt = ∇Yt =
Yt − Yt−1 , we obtain the mean function of {Wt }
1
The autocovariance function of {Wt }
Cov(Wt , Wt−k ) = Cov(Yt − Yt−1 , Yt−k − Yt−k−1 )
= Cov{β0 + β1 t + Xt − [β0 + β1 (t − 1) + Xt−1 ],
β0 + β1 (t − k) + Xt−k − [β0 + β1 (t − k − 1) + Xt−k−1 ]}
= Cov(Xt − Xt−1 , Xt−k − Xt−k−1 )
= Cov(Xt , Xt−k ) + Cov(Xt , −Xt−k−1 ) + Cov(−Xt−1 , Xt−k ) + Cov(−Xt−1 , −Xt−k−1 )
= Cov(Xt , Xt−k ) − Cov(Xt , Xt−k−1 ) − Cov(Xt−1 , Xt−k ) + Cov(Xt−1 , Xt−k−1 )
= γk − γk+1 − γk−1 + γk = −γk+1 + 2γk − γk−1
only depends on time lag k. We conclude that {Wt } is stationary.
only depends on time lag k. However, {Yt } is not stationary because the
mean function µt is not constant over time t.
2
2.10.(c) If we change the setting such that µt = µ which is constant over
time t, then Wt = µ+σt Xt has constant mean function µ and autocovariance
function Cov(Wt , Wt−k ) = σt σt−k ρk by similar calculation above. Since the
autocovariance function depends on time t, then {Wt } is not stationary.
However, it has constant mean µ over time t.
If k = 0,
If k = 1,
3
Then the autocovariance function
{ 2
σe + 2θ2 σe4 for k = 0
γk = Cov(Yt , Yt−k ) =
0 for k ≥ 1
which only depends on time lag k. And the autocorrelation function
{
1 for k = 0
ρk = .
0 for k ≥ 1
4
which is free of time t. And the autocovariance function
Cov(Wt , Wt−k ) = Cov(tet − (t − 1)et−1 , (t − k)et−k − (t − k − 1)et−k−1 )
= Cov(tet , (t − k)et−k ) + Cov(tet , −(t − k − 1)et−k−1 )
+Cov(−(t − 1)et−1 , (t − k)et−k ) + Cov(−(t − 1)et−1 , −(t − k − 1)et−k−1 )
= t(t − k)Cov(et , et−k ) − t(t − k − 1)Cov(et , et−k−1 )
−(t − 1)(t − k)Cov(et−1 , et−k ) + (t − 1)(t − k − 1)Cov(et−1 , et−k−1 ).
If k = 0,
Cov(Wt , Wt )
= t(t)Cov(et , et ) − t(t − 1)Cov(et , et−1 )
−(t − 1)(t)Cov(et−1 , et ) + (t − 1)(t − 1)Cov(et−1 , et−1 )
= t2 V ar(et ) − 0 − 0 + (t − 1)2 V ar(et−1 )
= t2 σe2 + (t − 1)2 σe2 = (2t2 − 2t + 1)σe2 .
If k = 1,
Cov(Wt , Wt−1 )
= t(t − 1)Cov(et , et−1 ) − t(t − 2)Cov(et , et−2 )
−(t − 1)(t − 1)Cov(et−1 , et−1 ) + (t − 1)(t − 2)Cov(et−1 , et−2 )
= 0 − 0 − (t − 1)2 V ar(et−1 ) + 0 = −(t − 1)2 σe2 .
If k > 1,
Cov(Wt , Wt−k )
= t(t − k)Cov(et , et−k ) − t(t − k − 1)Cov(et , et−k−1 )
−(t − 1)(t − k)Cov(et−1 , et−k ) + (t − 1)(t − k − 1)Cov(et−1 , et−k−1 )
= 0 − 0 − 0 + 0 = 0.
Then we obtain the autocovariance function
(2t2 − 2t + 1)σe2 for k = 0
Cov(Wt , Wt−k ) = −(t − 1)2 σe2 for k = 1
0 for k > 1
which depends on time t. So we conclude that {Wt } is not stationary.
2.14.(c) For Yt = et et−1 , we have the mean function
E(Yt ) = E(et et−1 ) = E(et )E(et−1 ) = 0(0) = 0
5
which is free of time t.
And the autocovariance function
Cov(Yt , Yt−k ) = Cov(et et−1 , et−k et−k−1 )
= E(et et−1 et−k et−k−1 ) − E(et et−1 )E(et−k et−k−1 ).
If k = 0,
Cov(Yt , Yt ) = E(et et−1 et et−1 ) − E(et et−1 )E(et et−1 )
= E(e2t e2t−1 ) − [E(et et−1 )]2
= E(e2t )E(e2t−1 ) − [E(et et−1 )]2
= σe2 σe2 − [E(et )E(et−1 )]2 = σe4 − 02
= σe4 .
since σe2 = V ar(et ) = E(e2t ) − [E(et )]2 = E(e2t ) − 0 = E(e2t ) for all time t.
If k = 1,
Cov(Yt , Yt−1 ) = E(et et−1 et−1 et−2 ) − E(et et−1 )E(et−1 et−2 )
= E(et e2t−1 et−2 ) − E(et et−1 )E(et−1 et−2 )
= E(et )E(e2t−1 )E(et−2 ) − E(et )E(et−1 )E(et−1 )E(et−2 )
= 0(σe2 )(0) − 0(0)(0)(0) = 0 − 0
= 0.
If k > 0,
Cov(Yt , Yt−k ) = E(et et−1 et−k et−k−1 ) − E(et et−1 )E(et−k et−k−1 )
= E(et )E(et−1 )E(et−k )E(et−k−1 ) − E(et )E(tet−1 )E(et−k )E(et−k−1 )
= 0.
Then we obtain the autocovariance function
{ 4
σe for k = 0
Cov(Yt , Yt−k ) =
0 for k ≥ 1
which only depends on time lag k.
From previous results, we know that {Yt } has constant mean function
and autocovariance function which only depends on time lag k. Then we
conclude that {Yt } is stationary.
6
2.19. Let Y1 = θ0 + e1 , and then for t > 1, define Yt recursively by
Yt = θ0 + Yt−1 + et . Here θ0 is constant.
2.19.(a) Here we expand Yt for three times,
Yt = tθ0 + et + · · · + e1 .
For k = 0,
For k ≥ 1,
which depends on time t and time lag k. Then we conclude that {Yt } is not
stationary.
7
2.(a) First, we obtain the mean function
E(Yt ) = E(Z1 cos(wt) + Z2 sin(wt) + et )
= E(Z1 ) cos(wt) + E(Z2 ) sin(wt) + E(et )
= 0+0+0=0
which is constant over time t.
Then we divide the autocovariance function into three parts
Cov(Yt , Yt−k )
= Cov(Z1 cos(wt) + Z2 sin(wt) + et , Z1 cos(w(t − k)) + Z2 sin(w(t − k)) + et−k )
= Cov(Z1 cos(wt), Z1 cos(w(t − k)) + Z2 sin(w(t − k)) + et−k ) (1)
+Cov(Z2 sin(wt), Z1 cos(w(t − k)) + Z2 sin(w(t − k)) + et−k ) (2)
+Cov(et , Z1 cos(w(t − k)) + Z2 sin(w(t − k)) + et−k ). (3)
For part (1),
Cov(Z1 cos(wt), Z1 cos(w(t − k)) + Z2 sin(w(t − k)) + et−k )
= Cov(Z1 cos(wt), Z1 cos(w(t − k))) + Cov(Z1 cos(wt), Z2 sin(w(t − k)))
+Cov(Z1 cos(wt), et−k )
= cos(wt) cos(w(t − k))Cov(Z1 , Z1 ) + cos(wt) sin(w(t − k))Cov(Z1 , Z2 )
+ cos(wt)Cov(Z1 , et−k )
= cos(wt) cos(w(t − k))V ar(Z1 ) + 0 + 0 = cos(wt) cos(w(t − k)).
For part (2),
Cov(Z2 sin(wt), Z1 cos(w(t − k)) + Z2 sin(w(t − k)) + et−k )
= Cov(Z2 sin(wt), Z1 cos(w(t − k))) + Cov(Z2 sin(wt), Z2 sin(w(t − k)))
+Cov(Z2 sin(wt), +et−k )
= sin(wt) cos(w(t − k))Cov(Z2 , Z1 ) + sin(wt) sin(w(t − k))Cov(Z2 , Z2 )
+ sin(wt)Cov(Z2 , +et−k )
= 0 + sin(wt) sin(w(t − k))V ar(Z2 ) + 0 = sin(wt) sin(w(t − k)).
For part (3),
Cov(et , Z1 cos(w(t − k)) + Z2 sin(w(t − k)) + et−k )
= Cov(et , Z1 cos(w(t − k)) + Cov(et , Z2 sin(w(t − k))) + Cov(et , et−k )
= 0 + 0 + Cov(et , et−k ) = Cov(et , et−k ).
8
Then we combine the results of all three parts and obtain the autocovari-
ance function
Cov(Yt , Yt−k ) = cos(wt) cos(w(t − k)) + sin(wt) sin(w(t − k)) + Cov(et , et−k )
= cos(wt − w(t − k)) = cos(wk) + Cov(et , et−k )
{
1 + σe2 for k = 0
=
cos(wk) for k ≥ 1.
According to calculations above, {Yt } has zero mean and autocovariance
function which is only depends on k. Then we conclude that {Yt } is station-
ary.
2.(b)
Please see Figure 1. There is trend in this graph. The observations
oscillate around zero between −4 to 4.
3
2
1
Trigonometric process
0
−1
−2
−3
Time
9
omega = 0.5
Z = rnorm(2,0.1)
e.t = rnorm(250,0,1)
Y.t = e.t*0
for (i in 1:length(e.t)){
Y.t[i] = Z[1]*cos(omega*i) + Z[2]*sin(omega*i) + e.t[i]}
plot(Y.t,ylab="Trigonometric process", xlab="Time", type="o")
2.(c) There is an increasing trend of the time series plot because of
adding the linear trend term β0 + β1 t to model. So we can see that the mean
function is not constant over time t and {Yt } appears not to be stationary.
115
110
Trig process with linear trend
105
100
Time
10
plot(Y.tilde, ylab="Trig process with linear trend", xlab="Time", type="o")
2.(d) The first differences process {∇Ỹt } looks to have trend. From
Problem 2.9, we know that this process must be stationary.
2
First differences of Y.tilde
0
−2
Time
diff.Y.tilde = diff(Y.tilde)
plot(diff.Y.tilde, ylab="First differences of Y.tilde", xlab="Time", type="o")
11
3.(i) Here we give an example of a process {Yt } with constant mean
but variance that increases with time. So we consider Yt = tet with mean
function
12
which is not free of time t. Then {Yt } is not stationary. Furthermore, we
obtain the autocovariance function
13