Fitting Sine Waves and Computing the Periodogram Flashcards
frequency, aliasing, the DFT, spectral density and periodogram
What is spectral analysis?
-in spectral analysis, a time series is analysed by decomposing it into sine waves of different amplitude and frequency
Spectral Analysis
Low Frequency
-slowly changing trends
Spectral Analysis
High Frequency
-rapid changes (noise)
Spectral Analysis Model
-if the data have a periodic component of known frequency, we can fit the following model:
Xt = B sin[2πf (t-to)] + μ + εt
-where:
μ is the baseline/mean
f is the frequency (in cycles per unit time)
to is the start time of one period
B is the amplitude
Spectral Analysis Model in Terms of Sine and Cosine
Xt = Acos(2πft) + Bsin(2πft) + μ + εt
-therefore only two parameters (A,B) are required per frequency
Aliasing
Definition
-two frequencies that are indistinguishable from each other are aliases of each other
Nyquist Frequency
Definition
- assume that the observations are given at times 0, Δ, 2Δ 3Δ, …
- we have a sampling frequency of 1/Δ
- the frequency f=1/2Δ is called the Nyquist frequency for the sampling frequency 1/Δ
- this is the fastest possible oscillation that can be recognised when we have a sampling frequency of 1/Δ
Nyquist Frequency
Explaination
-assume that the observations are given at times 0, Δ, 2Δ 3Δ, …
-we have a sampling frequency of 1/Δ
-a component with frequency f will be observed as:
Xk = Acos(2πfkΔ) + Bsin(2πfkΔ)
-the bigger f, the faster Xk oscillates until when f=1/2Δ, then:
Xk = A (-1)^k
-this is the fastest possible oscillation that can be recognised when we have a sampling frequency of 1/Δ
-for f>1/2Δ we only have aliases
What are Discrete Fourier Transforms?
-a method for decomposing a time series into periodic components
Fourier Frequencies
Definition
- if we have observations Xt at t=0,1,2,…,n-1
- frequencies fj = j/n are called Fourier frequencies
The Discrete Fourier Transform
Definition
-the DFT of Xo,…,Xn-1 is given by:
Xj^ = 1/√n Σ Xt exp(-2πifjt)
-sum from t=0 to t=n-1, for j=0,…,n-1
-here ^ indicates a DFT, not an estimate
Xj^ = 1/√n Σ Xt[cos(2πifjt) - isin(2πifjt)]
Inverse DFT Lemma
Σ exp(2πifjt) exp(-2πifkt)
= n, j=k or 0, else
-sum from t=0 to t=n-1
The Inverse DFT
Xt = 1/√n Σ Xj^ exp(2πifjt)
-sum from j=0 to j=n-1
Properties of the DFT
1) linearity
2) conservation of energy
3) time shifts (cyclic shift)
4) time shifts (linear shift)
Linearity of the DFT
-let Yt=cXt :
Yj^ = cXj^
-let Zt = Xt + Yt :
Zj^ = Xj^ + Yj^