STAT 443 Lab 10: Spectral density estimation solution

$30.00

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (1 vote)

We have met the idea of the spectral density function, f (ω), of a stochastic process, this being
the Fourier transform of the autocovariance function for the process. As we will see, there is a
tool known as the periodogram which can estimate the spectral density function given a sample
from the stochastic process.

In effect, the periodogram is a histogram, and can be created in
R using the command spec.pgram(). By default, this command plots the periodogram on the
log scale, so in the following use the option log=”no” for better comparisons. R uses ω/2π as
frequency (per unit time), so the horizontal axis in the plot of the periodogram ranges from 0 to
0.5 rather than 0 to π.

Moreover, as an estimate of the spectral density, the periodogram from R
should be divided by π to be consistent with definitions provided in class. In what follows though
it is the shape of the periodogram that is of most interest.

In the following, suppose that {Zt}t∈Z is white noise with variance 4.

1. Here we will compare the spectral density of white noise with the periodograms obtained
from simulated white noise samples.
(a) Plot the spectral density function for {Zt}t∈Z.

(b) Use the arima.sim() command, or otherwise, to simulate a series of length 100
from {Zt}t∈Z. Use spec.pgram() to create and plot the periodogram for your sample.
Comment on what you observe in regard to the true spectrum and its estimate here.

(c) Now simulate a series of length 1000 from {Zt}t∈Z. Use spec.pgram() to create and
plot the periodogram for your sample. Comment on what you observe in regard to
the true spectrum and its estimate here.

(d) Repeat parts (b) and (c) several times. Comment on how the periodogram from R
behaves as an estimator of the spectral density function based on what you have
observed.

2. Let {Xt}t∈Z be defined by
Xt = Zt − 0.9Zt−1.
(a) Plot the spectral density function for {Xt}t∈Z; see in-class activity “Examples of Spectral Densities” (Question 1).

(b) Use the arima.sim() command to simulate a series of length 100 from {Xt}t∈Z. Use
spec.pgram() to create and plot the periodogram for your sample. Comment on what
you observe in regard to the true spectrum and its estimate here.

(c) Use the arima.sim command to simulate a series of length 1000 from {Xt}t∈Z.Use
spec.pgram() to create and plot the periodogram for your sample. Comment on what
you observe in regard to the true spectrum and its estimate here.

(d) Repeat parts (b) and (c) several times. Comment on how the periodogram from R
behaves as an estimator of the spectral density function based on what you have
observed.

3. The process
Xt = 0.8Xt−1 + Zt
has spectral density function
f (ω) = 2
2
π (1 − 1.6 cos (ω) + 0.8
2
)
, ω ∈ (0, π).

(a) Plot the spectral density function for {Xt}t∈Z.

(b) Use the arima.sim() command to simulate a series of length 100 from {Xt}t∈Z. Use
spec.pgram() to create and plot the periodogram for your sample. Comment on what
you observe in regard to the true spectrum and its estimate here.

(c) Use the arima.sim() command to simulate a series of length 1000 from {Xt}t∈Z.
Use spec.pgram() to create and plot the periodogram for your sample. Comment on
what you observe in regard to the true spectrum and its estimate here.

(d) Repeat parts (b) and (c) several times. Comment on how the periodogram from R
behaves as an estimator of the spectral density function, based on what you have
observed.