The Periodogram Recall: the discrete Fourier transform n = n 1 / 2 - - PowerPoint PPT Presentation

the periodogram recall the discrete fourier transform
SMART_READER_LITE
LIVE PREVIEW

The Periodogram Recall: the discrete Fourier transform n = n 1 / 2 - - PowerPoint PPT Presentation

The Periodogram Recall: the discrete Fourier transform n = n 1 / 2 x t e 2 i j t , d j j = 0 , 1 , . . . , n 1 , t =1 and the periodogram 2 , j = 0 , 1 , . . . , n 1 , I


slide-1
SLIDE 1

The Periodogram

  • Recall: the discrete Fourier transform

d

  • ωj
  • = n−1/2

n

  • t=1

xte−2πiωjt, j = 0, 1, . . . , n − 1,

  • and the periodogram

I

  • ωj
  • =
  • d
  • ωj
  • 2 , j = 0, 1, . . . , n − 1,
  • where ωj is one of the Fourier frequencies

ωj = j n.

1

slide-2
SLIDE 2

Sine and Cosine Transforms

  • For j = 0, 1, . . . , n − 1,

d

  • ωj
  • = n−1/2

n

  • t=1

xte−2πiωjt = n−1/2

n

  • t=1

xt cos

  • 2πωjt
  • − i × n−1/2

n

  • t=1

xt sin

  • 2πωjt
  • = dc
  • ωj
  • − i × ds
  • ωj
  • .
  • dc
  • ωj
  • and ds
  • ωj
  • are the cosine transform and sine trans-

form, respectively, of x1, x2, . . . , xn.

  • The periodogram is I
  • ωj
  • = dc
  • ωj

2 + ds

  • ωj

2.

2

slide-3
SLIDE 3

Sampling Distributions

  • For convenience, suppose that n is odd: n = 2m + 1.
  • White noise:
  • rthogonality properties of sines and cosines

mean that dc(ω1), ds(ω1), dc(ω2), ds(ω2), . . . , dc(ωm), ds(ωm) have zero mean, variance 1

2σ2 w, and are uncorrelated.

  • Gaussian white noise:

dc(ω1), ds(ω1), dc(ω2), ds(ω2), . . . , dc(ωm), ds(ωm) are i.i.d. N

  • 0, 1

2σ2 w

  • .
  • So for Gaussian white noise, I
  • ωj
  • ∼ 1

2σ2 w × χ2 2.

3

slide-4
SLIDE 4
  • General case:

dc(ω1), ds(ω1), dc(ω2), ds(ω2), . . . , dc(ωm), ds(ωm) have zero mean and are approximately uncorrelated, and var

  • dc
  • ωj
  • ≈ var
  • ds
  • ωj
  • ≈ 1

2fx

  • ωj
  • ,

where fx

  • ωj
  • is the spectral density function.
  • If xt is Gaussian,

Ix

  • ωj
  • 1

2fx

  • ωj

=

dc

  • ωj

2 + ds

  • ωj

2

1 2fx

  • ωj
  • ∼ approximately χ2

2,

and Ix(ω1), Ix(ω2), . . . , Ix(ωm) are approximately indepen- dent.

4

slide-5
SLIDE 5

Spectral ANOVA

  • For odd n = 2m + 1, the inverse transform can be written

xt − ¯ x = 2 √n

m

  • j=1
  • dc
  • ωj
  • cos
  • 2πωjt
  • + ds
  • ωj
  • sin
  • 2πωjt
  • .
  • Square and sum over t; orthogonality of sines and cosines

implies that

n

  • t=1

(xt − ¯ x)2 = 2

m

  • j=1
  • dc
  • ωj

2 + ds

  • ωj

2

= 2

m

  • j=1

I

  • ωj
  • .

5

slide-6
SLIDE 6

ANOVA table: Source df SS MS ω1 2 2I(ω1) I(ω1) ω2 2 2I(ω2) I(ω2) . . . . . . . . . . . . ωm 2 2I(ωm) I(ωm) Total 2m = n − 1

(xt − ¯

x)2

6

slide-7
SLIDE 7

Hypothesis Testing

  • Consider the model

xt = A cos

  • 2πωjt + φ
  • + wt.
  • Hypotheses:

– H0 : A = 0 ⇒ xt = wt, white noise; – H1 : A > 0, white noise plus a sine wave.

  • Note: no autocorrelation in either case.

7

slide-8
SLIDE 8
  • Two cases:

– ωj known: use Fj = I

  • ωj
  • (m − 1)−1

j′=j I

  • ωj′
  • which is F2,2(m−1) under H0.

– ωj unknown: use max(F1, F2, . . . , Fm), or equivalently κ = max

  • I
  • ωj
  • , j = 1, 2, . . . , n
  • m−1

j I

  • ωj
  • and

P(κ > ξ) ≈ 1 − exp

  • −m exp
  • −ξ(m − 1 − log m)

m − ξ

  • .

8

slide-9
SLIDE 9

Example: the Southern Oscillation Index

  • Using SAS: proc spectra program and output.
  • Using R:

par(mfcol = c(2, 1)) # Use fft() to calculate the periodogram directly; note that # frequencies are expressed in cycles per year, and the # periodogram values are similarly scaled by 12: freq = 12 * (0:(length(soi) - 1)) / length(soi) plotit = (freq > 0) & (freq <= 6) soifft = fft(soi) / sqrt(length(soi)) plot(freq[plotit], Mod(soifft[plotit])^2 / 12, type = "l") # Use spectrum(); override some defaults to make it match: spectrum(soi, log = "no", fast = FALSE, taper = 0, detrend = FALSE)

9