SDSC6012 - Assignment 1

#assignment #sdsc6012

Question 1

  1. Trend Component Extraction (Moving Average Method)

    The trend component is extracted using the centered moving average method:

    Trendt=1ki=tmt+mxi\text{Trend}_t = \frac{1}{k} \sum_{i=t-m}^{t+m} x_i

    Where:

    • kk is the window size (here set to 12, corresponding to the annual cycle)

    • m=k/2m = \lfloor k/2 \rfloor (half-window width for centered moving average)

    • Boundary handling: when t<mt < m or t>nmt > n-m, calculate the mean using available data

  2. Seasonal Component Extraction (Periodic Average Method)

    1. Calculate the detrended series: dt=xtTrendtd_t = x_t - \text{Trend}_t

    2. For each periodic position jj (j=0,1,,11j=0,1,\ldots,11), compute the average:

      sj=1Njk=0Nj1dj+12ks_j = \frac{1}{N_j} \sum_{k=0}^{N_j-1} d_{j+12k}

      where NjN_j is the number of occurrences of periodic position jj

    3. Zero-mean adjustment:

      Seasonalj=sjsˉ,sˉ=112j=011sj\text{Seasonal}_j = s_j - \bar{s}, \quad \bar{s} = \frac{1}{12}\sum_{j=0}^{11} s_j

    4. Construct the complete seasonal series: Seasonalt=Seasonaltmod12\text{Seasonal}_t = \text{Seasonal}_{t \mod 12}

  3. Residual Calculation

    εt=xtTrendtSeasonalt\varepsilon_t = x_t - \text{Trend}_t - \text{Seasonal}_t

  1. Time Series Equation

    xt=Trendt+Seasonaltmod12+εtx_t = \text{Trend}_t + \text{Seasonal}_{t \mod 12} + \varepsilon_t

    where εt\varepsilon_t is random noise with mean 0.

Question 2

Consider the time series

xt=β1+β2t+wtx_t = \beta_1 + \beta_2 t + w_t

where β1\beta_1 and β2\beta_2 are known constants and w_t is a white noise process with variance σw2\sigma_w^2.
(a) Determine whether xtx_t is stationary.
(b) Show that the process yt=xtxt1y_t = x_t - x_{t-1} is stationary.
© Show that the mean of the moving average

vt=12q+1j=qqxtjv_t = \frac{1}{2q+1} \sum_{j=-q}^{q} x_{t-j}

is β1\beta_1 + β2\beta_2 t, and give a simplified expression for the autocovariance function.

(a) Determining the Stationarity of xtx_t

xtx_t is not a stationary process.

  • Mean function: E[xt]=β1+β2tE[x_t] = \beta_1 + \beta_2 t (varies with time)

  • Autocovariance function: γx(h)={σw2h=00h0\gamma_x(h) = \begin{cases} \sigma_w^2 & h=0 \\ 0 & h \neq 0 \end{cases}
    Although the autocovariance depends only on the time difference hh, the mean is not constant, thus failing to satisfy the stationarity condition.

(b) Proving yt=xtxt1y_t = x_t - x_{t-1} is Stationary

yt=β2+wtwt1y_t = \beta_2 + w_t - w_{t-1} is a stationary process.

  1. Mean:
    E[yt]=β2E[y_t] = \beta_2 (constant)

  2. Autocovariance Function:
    γy(h)={2σw2h=0σw2h=10h>1\gamma_y(h) = \begin{cases} 2\sigma_w^2 & h=0 \\ -\sigma_w^2 & |h|=1 \\ 0 & |h|>1 \end{cases}
    Depends only on the time difference hh, satisfying the stationarity condition.

© Mean and Autocovariance of the Moving Average vtv_t

vt=12q+1j=qqxtjv_t = \frac{1}{2q+1} \sum_{j=-q}^{q} x_{t-j}

j=qqE[xtj]=(β1+β2(tj))=(2q+1)(β1+β2t)\sum_{j=-q}^{q} E[x_{t-j}] = \sum (\beta_1 + \beta_2(t-j)) = (2q+1)(\beta_1 + \beta_2 t)

Autocovariance Function:

  • Number of non-zero terms N(h)=2q+1hN(h) = 2q+1 - |h| (when h2q|h|\leq 2q)

  • Each term’s covariance is σw2\sigma_w^2, denominator is (2q+1)2(2q+1)^2

γv(h)={2q+1h(2q+1)2σw2h2q0h>2q\gamma_v(h) = \begin{cases} \frac{2q+1-|h|}{(2q+1)^2} \sigma_w^2 & |h| \leq 2q \\ 0 & |h| > 2q \end{cases}