Frequency Domain Analysis¶
Spectral Analysis¶
Spectral analysis involves decomposing a Time Series (TS) into \(\sin\) and \(\cos\) functions of different frequencies. This approach is particularly appropriate when you observe cycle dynamics, such as periodicity or cyclicity.
Examples:
- Infectious disease data: Identifying the periodicity of immunity.
- Business cycles: Identifying the periodicity of economic cycles.
The goal is to decompose a stationary TS \(\{ Y_{t} \}\) into a combination of sinusoids1 with uncorrelated random coefficients:
where \(A_{1}\) and \(A_{2}\) are frequencies. Our task is to identify those frequencies which are particularly important or "strong" in the data.
Time Domain vs. Frequency Domain¶
- Time Domain approach: Focuses on regression on past values of TS (\(y_{t-i}\)) and shocks (\(e_{t}\)).
- Frequency Domain (Spectral) approach: Considers regression on sinusoids. To do this, a spectral density function is required.
Trigonometry Refresher¶
To work effectively in the frequency domain, we utilize several key trigonometric identities:
- \(\sin A \pm \sin B = 2 \sin \dfrac{A\pm B}{2} \cos \dfrac{A\mp B}{2}\)
- \(\cos A + \cos B = 2 \cos \dfrac{A+ B}{2} \cos \dfrac{A- B}{2}\)
- \(\cos A - \cos B = -2 \sin \dfrac{A+ B}{2} \sin \dfrac{A- B}{2}\)
- \(\sin k\pi = 0\) for all \(k = \pm 1,\pm 2,\dots\)
- \(\cos k\pi = (-1)^{|k-1|}\) for all \(k = \pm 1,\pm 2,\dots\)
- \(\sin(-A) = -\sin A\)
- \(\cos (-A) = \cos A\)
Fourier and Inverse Fourier Transforms¶
The Discrete Fourier Transform (DFT) of a function \(h(t)\) for \(t \in \{ \dots, -1, 0, 1,\dots \}\) is:
The Inverse Fourier Transform of \(H(\omega)\) is given by:
Properties¶
If the function is symmetric, \(h(t) = h(-t)\), the transform simplifies:
Consequently, \(h(t) = \dfrac{1}{\pi} \int_{0}^{\pi}H(\omega) \cos(\omega t)\ d\omega\).
Notation for a Periodic Process¶
A typical periodic process can be represented as:
$\(y_{t} = R \cos (\omega t + \nu) + u_{t}\)$
- \(\omega\): Frequency of periodic variation \((0 \leq \omega \leq 2\pi)\).
- \(R\): Amplitude of variation.
- \(\nu\): Phase.
- \(\{ u_{t} \}\): Purely random process.
Stationarity Note:
- If \(R\) and \(\nu\) are constants, \(E(y_{t}) = R \cos (\omega t + \nu)\), which is \(t\)-dependent and thus becomes non-stationary.
- However, if we assume \(R\) has a 0 mean and finite variance, or if the phase \(\nu \sim \text{Uniform}(0,2\pi)\), then \(E(y_{t})=0\). In this specific case, the process becomes stationary.
Practical Applications of Fourier Transform¶
- Signal Processing
- Audio processing: Noise reduction, equalization (adjusting the balance of frequency components), and compression (representing signals compactly by prioritizing significant frequencies).
- Image processing: Edge detection (detecting outliers) and image compression (JPEG uses the Discrete Cosine Transform/DCT).
- Communications
- Modulation and Demodulation.
- Spectrum Analysis.
- Physics and Engineering
- Wave Analysis.
- Optics.
- Structural Analysis (e.g., studying vibrations).
-
Sine and cosine function together are called sinusoids ↩