# Stat 443 Assignment 4: Analysis in the Frequency Domain solution

\$30.00

Original Work ?

## Description

5/5 - (1 vote)

1. Consider the following stochastic process:
Xt = Zt + 0.7Zt−1 + 0.2Zt−2 − 0.1Zt−3, t ∈ Z,
where {Zt}t∈Z ∼ W N(0, 1).
(a) Derive the power spectral density function of {Xt}t∈Z.
(b) Write down the normalized spectral density function of {Xt}t∈Z.
(c) Plot the normalized spectral density and comment on its behaviour.

2. (a) Show that if {Xt}t∈Z and {Yt}t∈Z are independent, stationary processes with power spectral density functions fX(ω) and fY (ω), respectively, then the process {Wt}t∈Z with
Wt = Xt + Yt
is also stationary with power spectral density function
fW (ω) = fX(ω) + fY (ω), ω ∈ (0, π).

(b) Suppose {Xt}t∈Z is an AR(1) process with Xt = −0.5Xt−1 +Zt
, and {Yt}t∈Z and {Zt}t∈Z
are two independent white noise processes with mean zero and common variance σ
2
.
Derive the power spectral density function of {Wt}t∈Z, where Wt = Xt + Yt
.

3. (This question must be completed in R Markdown; display all the R code used to perform
The Southern Oscillation Index (SOI) measures the normalised pressure difference between
Tahiti and Darwin. The data file soi.txt gives the annual SOI between 1866 and 2010.

(a) Read the data into R and coerce the data into a time series object. Plot the resulting
time series and its sample acf. Comment on what you observe. (Make sure to properly
label the axes and provide titles for the plots.)

(b) Plot the periodogram with a logarithmic vertical scale for the series, and smooth the
periodogram by setting the argument spans = sqrt(2 * length(x)), where x is your
time series object. Comment on what you observe and estimate the wavelength and
angular frequency for the dominating frequency.

(c) Build a function in R that generates the Fourier frequency ωp for a given time series and
given constant p ∈ {0, 1, …, N/2}. Document the inputs and outputs of this function, so
that another person would be able to understand how to use your function. What is the
output of your function for p = 10?

(d) To determine which Fourier frequencies are “significant”, suppose we were to fit the linear
model
Yt = a0 + ap cos(ωpt) + bp sin(ωpt) + t
, t = 1, . . . , N,
where we assume t ∼ N(0, σ2
) for all t and are independent. Let {Yt}t=1,…,N be the
time series and ωp =
2πp
N
.

Note that the model will be fitted N/2 times for each p =
1, 2, …, N/2. On fitting the above model for a given p by least squares, a test of the
“significance” of the contribution of frequency ωp is a test with null hypothesis
H0 : ap = bp = 0,
that uses the F-test statistic
Fp =
1
k−1
PN
t=1(ˆyt,p − y)
2
1
N−k
PN
t=1(yt − yˆt,p)
2
,
where k is the number of estimated coefficients in the linear model, N is the number of
observations, ˆyt,p = ˆa0 + ˆap cos(ωpt) + ˆbp sin(ωpt) and y =
1
N
PN
t=1 yt
. Asymptotically,
Fp ∼ F2,N−3.

Find all values of p that give significant Fourier frequencies at the 5% confidence level.
Hint: Use function lm() to fit the linear model. The output of this function can also be
used to extract the value of the F-statistic, or compute it directly.

(e) Give the estimated coefficients for the linear model that results from using all significant
frequencies found in part (d).

(f) Plot the data and the estimated model’s fitted values on the same plot in R. Remember
to properly label the axes, specify a legend and title for the plot.