Pavel Nazarov
Statements
“I have read and understood the instructions and policies for this assignment, including those
related to the use of AI and other external resources.”
“I completed this assignment independently.”
“I did not use AI on this assignment.”
Question 1
(a): Plot the dataset co2 and comment on its features.
The CO2 dataset has a very clear upward trend as evidenced by the red linear regression line in the left plot.
The linear regression line is of the form y = ax + b, where a = 1.31 and b = 311.61. X-axis is adjusted so that it
intercepts the y-axis at January 1959. It is evident to conclude that there is a strong upward trend with CO2
concentration increasing 1.31 ppm per year on average.
To demonstrate seasonality, the middle chart zooms into the overall dataset and plots 4 years of data. The
chart shows strong seasonality with CO2 concentration rising to reach the annual peak during the summer
months and dropping to the annual trough in late fall (October / November).
To analyze the local variance, I present a plot of the 5-year rolling standard deviation (right-hand chart). From
this chart, it seems that the local variance is non-constant. However, the standard deviation rises from
approximately 2 ppm to 3.5 ppm over the time frame. The magnitude of variability is increasing over time, but
2-3.5 ppm of standard deviation represents less than circ 1% of the CO2 concentration range over the 39-
year time period.
Pavel Nazarov
(b): Normalize the dataset to make it stationary.
Step 1: remove the trend from the time series X!
Because the trend is clearly linear (see left chart in 1(a)), we need to apply a differencing operation once to
the series X! such that ∇X! = X! − X!"# .
Step 2: remove seasonality from ∇X!
Because the seasonality is annual, we need to apply a lag-12 differencing operator to the trend-less time
series ∇X! .
∇∇#$ X! = X! − X!"# − X!"#$ + X!"#%
Step 3: check for stationarity
For a time series to be stationary, it needs to have an Auto-Correlation Function (𝜌 or “ACF”) that decays
towards zero as lag h increases, as per Formula 1.
Formula 1
For X! = W! + 𝜃W!"# with W! =
mean-zero white noise with finite
variance.
1, h=0
𝜃
𝜌& (h) = / , h = ±1
1 + 𝜃$
0, h≥2
When comparing the ACF plots for the original time series (ACF of CO2(original)) and the transformed time
series (ACF of CO2 (transformed)), it is clear that the original time series is not stationary. At the same time,
the ACF of the transformed time series stays near zero within the 95% confidence band when h > 1.
Therefore, the transformed time series is stationary.
Pavel Nazarov
Question 2 (a)
Goal:
Show that for any a, b ∈ ℝ and t ∈ ℤ, 𝜓(B)(a + tb) = a + tb, where B is a backshift operator and 𝜓(B) is a
filter of the form 𝜓(B) = ∑$'(-$ 𝜓' B' , where 𝜓' ∈ ℝ.
Proof:
The backshift operator satisfies B' X! = X!-' . Therefore, applying 𝜓(B) to time series X! satisfies:
$ $
'
𝜓(𝐵)X! = A 𝜓' B X! = A 𝜓' X!-'
'(-$ '(-$
Apply a linear trend for X! such that X! = a + tb for constants a, b ∈ ℝ. If X! = a + tb, then X!-' = a + (t − j)b,
and therefore:
$
𝜓(𝐵)(𝑎 + 𝑡𝑏) = A 𝜓' (𝑎 + (𝑡 − 𝑗)𝑏) =
'(-$
$
= A 𝜓' (𝑎 + 𝑡𝑏 − 𝑗𝑏) =
'(-$
$ $ $
= A 𝜓* 𝑎 + A 𝜓* 𝑡𝑏 − A 𝜓* 𝑗𝑏 =
'(-$ '(-$ '(-$
$ $ $
= 𝑎 A 𝜓* + 𝑡𝑏 A 𝜓* − 𝑏 A 𝜓* 𝑗
'(-$ '(-$ '(-$
Given that ∑$'(-$ 𝜓* = 1 and ∑$'(-$ 𝜓* 𝑗 = 0,
$ $ $
𝜓(𝑩)(𝒂 + 𝒕𝒃) = 𝑎 A 𝜓* + 𝑡𝑏 A 𝜓* − 𝑏 A 𝜓* 𝑗 = a × 1 + tb × 1 − b × 0 = 𝒂 + 𝒕𝒃
'(-$ '(-$ '(-$
Thus, applying the filter 𝜓(B) preserves the linear trend for all t ∈ ℤ.
Question 2 (b)
Let’s impose a condition of symmetry such that, 𝜓-$ = 𝜓$ = a, 𝜓-# = 𝜓# = b, and 𝜓+ = c. Given that
∑$'(-$ 𝜓* = 1, 2a +2b + c = 1. Because of symmetry, ∑$'(-$ 𝜓* 𝑗 = 0 for any choice of a, b and c:
−2 × 𝑎 + (−1 × 𝑏) + 0 × 𝑐 + 1 × 𝑏 + 2 × 𝑎 = 0
(−2a + 2a) + (−b + b) = 0
Let’s choose a = 0.1 and b = 0.2, then c = 1 – (2 x 0.1) – (2 x 0.2) = 0.4. So,
𝜓-$ = 0.1, 𝜓-# = 0.2, 𝜓+ = 0.4, 𝜓# = 0.2, 𝜓$ = 0.1
Therefore, the filter 𝜓(𝐵) = 0.1B-$ + 0.2B-# + 0.4 + 0.2B# + 0.1B$
Pavel Nazarov
Question 2 (c)
Let’s take a non-symmetric set of weights that add up to 1:
𝜓-$ = 0, 𝜓-# = 0, 𝜓+ = 0.2, 𝜓# = 0.3, 𝜓$ = 0.5
While these weights satisfy the sum condition, they fail to satisfy the linear term condition: ∑$'(-$ 𝜓* 𝑗 = 0
(-2) x 0 + (-1) x 0 + 0 x 0.2 + 1 x 0.3 + 2 x 0.5 = 1.3 ≠ 0
Example of a time series with the above weights failing a linear trend
Let X, = 𝑎 + 𝑡𝑏 with a = 1 and b = 1, resulting in X, = 1 + t
𝜓(𝐵)X! = A 𝜓' X!-' = 0 × X!-$ + 0 × X!-# + 0.2 × X! + 0.3 × X!-# + 0.5 × X!-$
'(-$
Given that a = 1 and b = 1,
X! = 1 + t
X!-# = 1 + (t − 1) = t
X!-$ = 1 + (t − 2) = t − 1
So,
𝜓(𝐵)X! = 0.2 × (1 + t) + 0.3 × t + 0.5 × (t − 1) = t − 0.3
Applying 𝜓(𝐵) filter to X! means:
𝜓(𝐵)X! = 𝜓(𝐵)(1 + t) = t − 0.3
Since t − 0.3 ≠ 1 + t, this filter does not pass the linear trend of 1 + t without distortion.
Pavel Nazarov
Question 3 (a)
Apply the backshift operator B to the given AR(2) equation to represent it as an autoregressive polynomial:
𝜙(B) = 1 − 0.8B + 0.2B$ = 0.2B$ − 0.8B + 1
Factor the polynomial:
𝜙(z) = 0.2z $ − 0.8z + 1 = 0
Multiply by 5 to simplify:
z $ − 4z + 5 = 0
Apply the quadratic formula to calculate the roots:
4 ± √16 − 20 4 ± √-4 4 ± 2i
z= = = =2±i
2 2 2
z# = 2 + i; z$ = 2 − i
Calculate the moduli of the roots:
|z# | = |z$ | = ^2$ + 1$ = √5 ≈ 2.236
Use the roots to factor:
𝜙(z) = 0.2(z − z# )(z − z$ ) = 0.2(z − (2 + i))(z − (2 − i))
Replace z with the backshift operator B to complete the factorization:
𝜙(B) = 0.2(B − (2 + i))(B − (2 − i))
The process is causal if and only if all roots of 𝜙(z) = 0 lie outside of the unit circle. Since both roots z1 and z2
have moduli greater than 1 (|z# | = |z$ | = 2.236), they lie outside the unit circle and, therefore, we can
conclude that the process is causal.
Question 3(b)
Write the given model in standard AR(2) form:
X! = 𝜙# X!"# + 𝜙$ X!"$ + W! , where 𝜙# = 0.8 and 𝜙$ = −0.2
Refer to answer in question 3(a).
Since the factored form of 𝜙(z) = 0.2z $ − 0.8z + 1 = 0 is 𝜙(z) = 0.2(z − (2 + i))(z − (2 − i)) and roots of
𝜙(z) are z# = 2 + i; z$ = 2 − i, the reciprocal roots are:
1 2−i 2 − i -# 2 + i
r#-# = = = , r$ =
2 + i (2 + i)(2 − i) 5 5
𝒓"𝟏
𝟏 = 𝟎. 𝟒 − 𝟎. 𝟐𝒊, 𝒓"𝟏
𝟐 = 𝟎. 𝟒 + 𝟎. 𝟐𝒊
Since the roots are complex conjugates with conjugate symmetry (i.e. c$ = ce# ), ACF has the form:
𝜌X(h) = 2Re(c# r#"0 )
Pavel Nazarov
Express c# and r#"# in the polar form:
c# = 𝛼e12 , r#"# = 𝛽e13 , where 𝛼, 𝛽 ≥ 0 and Θ, Φ ∈ [0, 2𝜋)
Where:
𝛽 = |r#"# | = ^0.4$ + 0.2$ ≈ 0.4472
−0.2
Φ = arg(r#"# ) = arctan p q = −0.4636 rad
0.4
Applying the Euler’s formula:
c# r#"0 = (𝛼e12 )( 𝛽e13 )0 = 𝛼𝛽0 [cos(Φh + Θ) + i sin(Φh + Θ)]
Taking the real part of c# r#"0 based on 𝜌X(h) = 2Re(c# r#"0 ):
𝜌X(h) = 2 𝛼𝛽0 [cos(Φh + Θ)]
And building a system of equations to solve for 𝛼 and Θ based on the autocorrelation function for a AR(2)
process:
If:
𝜙#
𝜌X(0) = 1 and 𝜌X(1) =
1 − 𝜙$
Then:
2 𝛼𝛽0 [cos(Φh + Θ)] = 𝟐𝜶 𝐜𝐨𝐬(𝚯) = 𝟏 for h = 0
And
0.8 𝟐
2 𝛼𝛽0 [cos(Φh + Θ)] = 𝟐𝜶𝜷 𝐜𝐨𝐬(𝚽 + 𝚯) = = for h = 1
1 − (−0.2) 𝟑
Solve a system of equations:
𝟐𝜶 𝐜𝐨𝐬(𝚯) = 𝟏
~ 𝟐
𝟐𝜶𝜷 𝐜𝐨𝐬(𝚽 + 𝚯) =
𝟑
1 𝛽 ≈ 0.4472
𝛼=
2cos(Θ) Φ = −0.4636 𝑟𝑎𝑑
1 2 cos Φ = 0.8944
2 𝛽 cos(Φ + Θ) = sin Φ = −0.4472
2cos(Θ) 3
𝛽 2
cos(Φ + Θ) = 2
cos(Θ) 3 𝛽 cos Φ −
2 3 = tan Θ = 4 (< -- plug in Φ)
𝛽(cos Φ cos Θ − sin Φ sin Θ) = cos Θ 𝛽 sin Φ 3
3 𝟒
2 𝚯 = 𝐚𝐫𝐜𝐭𝐚𝐧 p q = 𝟎. 𝟗𝟐𝟕𝟑 𝐫𝐚𝐝
𝛽 cos Φ cos Θ − cos Θ = 𝛽 sin Φ sin Θ 𝟑
3 𝟏 𝟏 𝟓
𝜶= = =
2 𝟐𝐜𝐨𝐬(𝚯) 𝟐𝐜𝐨𝐬(𝟎. 𝟗𝟐𝟕𝟑) 𝟔
cos Θ p𝛽 cos Φ − q = 𝛽 sin Φ sin Θ
3
2
𝛽 cos Φ − 3 sin Θ
= = tan Θ
𝛽 sin Φ cos Θ
Pavel Nazarov
Formula for the autocorrelation function of the form 𝜌X(h) = 2 𝛼𝛽0 [cos(Φh + Θ)] is as follows:
4
𝜌X(h) = 2 •5• ‘0.44720 ’[cos((−0.4636) h + 0.9273)] for h ≥ 0
𝟓
𝝆𝑿(𝒉) = • • ‘𝟎. 𝟒𝟒𝟕𝟐𝒉 ’[𝐜𝐨𝐬((−𝟎. 𝟒𝟔𝟑𝟔) 𝒉 + 𝟎. 𝟗𝟐𝟕𝟑)] for 𝒉 ≥ 𝟎
𝟑
Question 3(c)
INPUTS
OUTPUTS