Sie sind auf Seite 1von 2

# Spring 2015 Statistics 153 (Time Series) : Lecture four

10 November 2016

## The sinusoid can be represented in the following three equivalent ways:

1. R cos (2πf t + Φ). The following terminology is standard. R is called the amplitude, f is called the
frequency and Φ is called the phase. The quantity 1/f is called the period and 2πf is termed the
angular frequency.
2. The sinusoid can also be written as A cos 2πf t + B sin 2πf t where A = R cos Φ and B = R sin Φ.
3. Yet another way of representing the sinusoid is to use complex exponentials:

## exp(2πif t) = cos(2πf t) + i sin(2πf t).

Therefore
exp(2πif t) + exp(−2πif t) exp(2πif t) − exp(−2πif t)
cos(2πf t) = and sin(2πf t) = .
2 2i
Thus A cos 2πf t+B sin 2πf t can also be written as a linear combination of exp(2πif t) and exp(−2πif t).

## 1.2 The two most important properties of Sinusoids

Frequency domain analysis of time series is all based on the following two most important properties of
sinusoids:

1. Every data set x0 , . . . , xn−1 can be represented via sinusoids. We call this data representation.
2. Every stationary process Xt , t = . . . , −2, −1, 0, 1, 2, . . . can be represented via sinusoids. We call
this stationary process representation.

## 1.3 Data Representation

Let us first focus on data representation. We will study stationary process representation in days to
come.

Suppose we have a dataset x0 , . . . , xn−1 of size n. We can represent this dataset via a vector
(x0 , . . . , xn−1 ) of size n. How does one represent this via sinusoids? We will use what are called Fourier

1
Frequencies. A frequency f of the form f = j/n for 0 ≤ j ≤ (n − 1) is called a Fourier Frequency.
There are n Fourier frequencies (n here is the size of the dataset): 0, 1/n, . . . , (n − 1)/n. Given a Fourier
frequency j/n, let us define the vector

## uj = (1, exp(2πij/n), exp(2πi2j/n), . . . , exp(2πi(n − 1)j/n)).

This is the sinusoid with frequency j/n evaluated at the time points t = 0, 1, . . . , (n − 1).

It turns out that every vector (x0 , . . . , xn−1 ) can be written as a linear combination of u0 , u1 , . . . , un .
This is what we called data representation. The proof of this fact is quite simple and uses basic linear
algebra. Indeed one only needs to observe that u0 , u1 , u2 , . . . , un−1 are orthogonal i.e., the dot product
between uk and ul is zero if k 6= l. Recall that the dot product between two complex-valued vectors
(a1 , . . . , an ) and (b1 , . . . , bn ) equals
n
X
ha, bi = aj b¯j .
j=1

Can you prove that the dot product between u and ul is zero for k 6= l?
k

## 2 The Discrete Fourier Transform

The fact that every vector (x0 , . . . , xn−1 ) can be written as a linear combination of u0 , u1 , . . . , un motivates
the definition of the Discrete Fourier Transform (DFT).

## The DFT of x0 , . . . , xn−1 is given by bj , j = 0, 1, . . . , n − 1, where

n−1  
X 2πijt
bj = xt exp − for j = 0, . . . , n − 1.
t=0
n
P
Therefore, b0 = xt . Also for 1 ≤ j ≤ n − 1,
  X  
X 2πi(n − j)t 2πijt
bn−j = xt exp − = xt exp exp (−2πit) = b̄j .
t
n t
n

Note that this relation only holds if x0 , . . . , xn−1 are real numbers.

## and for n = 12, it is

b0 , b1 , b2 , b3 , b4 , b5 , b6 = b̄6 , b̄5 , b̄4 , b̄3 , b̄2 , b̄1 .
Note that b6 is necessarily real because b6 = b̄6 .

## The DFT is calculated by the R function fft().

The original data x0 , . . . , xn−1 can be recovered from the DFT using:
n−1  
1X 2πijt
xt = bj exp for t = 0, . . . , n − 1.
n j=0 n

Thus for n = 11, one can think of the data as the 11 real numbers x0 , x1 , . . . , x10 or, equivalently, as
one real number b0 along with 5 complex numbers b1 , . . . , b5 .

For n = 12, one can think of the data as the 12 real numbers x0 , . . . , x11 or, equivalenlty, as two real
numbers, b0 and b6 , along with the 5 complex numbers b1 , . . . , b5 .