STAT 248: EDA & Stationarity Handout 3

Similar documents
Stat 248 Lab 2: Stationarity, More EDA, Basic TS Models

LECTURES 2-3 : Stochastic Processes, Autocorrelation function. Stationarity.

STA 6857 Autocorrelation and Cross-Correlation & Stationary Time Series ( 1.4, 1.5)

Econometría 2: Análisis de series de Tiempo

Nonlinear time series

On 1.9, you will need to use the facts that, for any x and y, sin(x+y) = sin(x) cos(y) + cos(x) sin(y). cos(x+y) = cos(x) cos(y) - sin(x) sin(y).

STAT Financial Time Series

TIME SERIES AND FORECASTING. Luca Gambetti UAB, Barcelona GSE Master in Macroeconomic Policy and Financial Markets

Part II. Time Series

ELEG 3143 Probability & Stochastic Process Ch. 6 Stochastic Process

A time series is called strictly stationary if the joint distribution of every collection (Y t

Stochastic Processes. A stochastic process is a function of two variables:

Econ 424 Time Series Concepts

Time Series I Time Domain Methods

Module 9: Stationary Processes

Multivariate Time Series

Time Series Analysis -- An Introduction -- AMS 586

Some Time-Series Models

Applied time-series analysis

Reliability and Risk Analysis. Time Series, Types of Trend Functions and Estimates of Trends

Stochastic Processes: I. consider bowl of worms model for oscilloscope experiment:

For a stochastic process {Y t : t = 0, ±1, ±2, ±3, }, the mean function is defined by (2.2.1) ± 2..., γ t,

Statistics of stochastic processes

STAT 443 Final Exam Review. 1 Basic Definitions. 2 Statistical Tests. L A TEXer: W. Kong

Lecture 2: Univariate Time Series

Lesson 4: Stationary stochastic processes

Lesson 7: Estimation of Autocorrelation and Partial Autocorrela

1. Stochastic Processes and Stationarity

white noise Time moving average

ENSC327 Communications Systems 19: Random Processes. Jie Liang School of Engineering Science Simon Fraser University

Prof. Dr. Roland Füss Lecture Series in Applied Econometrics Summer Term Introduction to Time Series Analysis

{ } Stochastic processes. Models for time series. Specification of a process. Specification of a process. , X t3. ,...X tn }

ECON 616: Lecture 1: Time Series Basics

IV. Covariance Analysis

Introduction to Stochastic processes

AR, MA and ARMA models

Econ 623 Econometrics II Topic 2: Stationary Time Series

Class 1: Stationary Time Series Analysis

Spectral representations and ergodic theorems for stationary stochastic processes

STOR 356: Summary Course Notes

Gaussian processes. Basic Properties VAG002-

STAT 520: Forecasting and Time Series. David B. Hitchcock University of South Carolina Department of Statistics

A time series is a set of observations made sequentially in time.

3. ARMA Modeling. Now: Important class of stationary processes

Lecture 1: Brief Review on Stochastic Processes

Time series and spectral analysis. Peter F. Craigmile

Autoregressive Moving Average (ARMA) Models and their Practical Applications

University of Regina. Lecture Notes. Michael Kozdron

Notes on Random Processes

Review Session: Econometrics - CLEFIN (20192)

1 Linear Difference Equations

Characteristics of Time Series

Akaike criterion: Kullback-Leibler discrepancy

Stochastic process for macro

Covariances of ARMA Processes

Ch3. TRENDS. Time Series Analysis

Lecture 1: Fundamental concepts in Time Series Analysis (part 2)

Chapter 12: An introduction to Time Series Analysis. Chapter 12: An introduction to Time Series Analysis

Financial Time Series Analysis Week 5

Time Series 2. Robert Almgren. Sept. 21, 2009

Stochastic Processes

Lecture 3 Stationary Processes and the Ergodic LLN (Reference Section 2.2, Hayashi)

1. Fundamental concepts

Discrete time processes

If we want to analyze experimental or simulated data we might encounter the following tasks:

Introduction to Economic Time Series

16.584: Random (Stochastic) Processes

1 Introduction to Generalized Least Squares

Lecture 22: Variance and Covariance

Module 3. Descriptive Time Series Statistics and Introduction to Time Series Models

X random; interested in impact of X on Y. Time series analogue of regression.

9. Multivariate Linear Time Series (II). MA6622, Ernesto Mordecki, CityU, HK, 2006.

Time Series Analysis - Part 1

Minitab Project Report Assignment 3

Advanced Econometrics

Time Series: Theory and Methods

Deterministic. Deterministic data are those can be described by an explicit mathematical relationship

EAS 305 Random Processes Viewgraph 1 of 10. Random Processes

Chapter 2. Some basic tools. 2.1 Time series: Theory Stochastic processes

Probability and Statistics for Final Year Engineering Students

Master Thesis. Change Detection in Telecommunication Data using Time Series Analysis and Statistical Hypothesis Testing.

STAT STOCHASTIC PROCESSES. Contents

Stochastic Processes. Monday, November 14, 11

Contents. 1 Time Series Analysis Introduction Stationary Processes State Space Modesl Stationary Processes 8

8.2 Harmonic Regression and the Periodogram

The distribution inherited by Y is called the Cauchy distribution. Using that. d dy ln(1 + y2 ) = 1 arctan(y)

STAT 153, FALL 2015 HOMEWORK 1 SOLUTIONS

University of Oxford. Statistical Methods Autocorrelation. Identification and Estimation

Long-range dependence

What s for today. Random Fields Autocovariance Stationarity, Isotropy. c Mikyoung Jun (Texas A&M) stat647 Lecture 2 August 30, / 13

Stochastic Processes. M. Sami Fadali Professor of Electrical Engineering University of Nevada, Reno

Lecture 4a: ARMA Model

Stationary Stochastic Time Series Models

Communication Theory II

ECON3327: Financial Econometrics, Spring 2016

Chapter 3: Regression Methods for Trends

Classic Time Series Analysis

Nonlinear Time Series Modeling

Time Series Examples Sheet

Statistical signal processing

Transcription:

STAT 248: EDA & Stationarity Handout 3 GSI: Gido van de Ven September 17th, 2010 1 Introduction Today s section we will deal with the following topics: the mean function, the auto- and crosscovariance function, stationarity, the sample acf and the correlogram. Useful readings are chapters 1 and 2 from Shumway and Stoffer s book, and chapters 2 and 3 from Cryer and Chan s book. Note that both books are freely online available through the university library-system. 2 Stationarity Sometimes we may wish to specify the collection of joint distributions to all finite dimensional vectors (X t1, X t2,.., X tn ), t = (t 1,..., t n ) T n, n {1, 2,..., n}. In such a case we need to be sure that a stochastic process with the specified distributions really does exist. Kolmogorov s theorem guarantees that this is true under minimal conditions on the specified distribution functions. We are going to look for describing a time series by its first and second moments, the mean function and the covariance function respectively. You can think of the covariance function as the average cross-product relative to the joint distribution f(x r, X s ). Definition: [mean function] The mean function, provided it exists, is defined as: µ Xt = E(X t ) = where F t (x) = P (X t x) and f t (x) = Ft(x) x. xf t (x)dx (1) Definition: [autocovariance function (acvf)] If {X t, t T } is a process s.t. V ar(x t ) < for each t T, then its autocovariance function γ X (.,.) is defined as: γ X (r, s) = Cov(X r, X s ) = E[(X r E(X r ))(X s E(X s ))] r, s T (2) The autocovariance function measures the linear dependence between two points on the same series observed at different times. If X s and X r are independent then γ X (r, s) = 0. However, if γ X (r, s) = 0 then X s and X r are NOT necessarily independent. Remark: What happens when s=r? 1

Definition: [(weak) stationarity]: The time series {X t, t Z} with index set Z = {0, ±1, ±2,...} is said to be (weakly) stationary if: 1. E X t 2 < t Z 2. E(X t ) = µ t Z 3. γ X (r, s) = γ X (r + t, s + t) r, s, t Z Intuitively a time series is stationary if it has a finite variance such that the mean value is constant and doesn t depend on time. The covariance function depends on s and t only through the difference s t. Stationary processes play a crucial role in the analysis of time series. Of course many observed time series are decidedly non-stationary in appearance. Frequently such data sets can be transformed into series which can reasonably be modelled as realizations of some stationary process. The theory of stationary processes is then used for the analysis, fitting and prediction of the resulting series. In all of this the autocovariance function is a primary tool. Remark 1: Stationarity as defined is frequently referred to in the literature as weak stationarity, covariance stationarity, stationarity in the wide sense or second-order stationarity. For us when we refer to stationarity we will think about the three properties mentioned in the definition above. Remark 2: If {X t, t Z} is stationary then γ X (r, s) = γ X (r s, 0) for all r, s Z. It is therefore convenient to redefine the autocovariance function of a stationary process as the function of just one variable: γ X (h) = γ x (h, 0) = Cov(X t+h, X t ) t, h Z (3) The function γ X (.) will be referred as the autocovariance function of {X t } and γ X (h) as its value at lag h. Note that γ X (s, t) = γ X (t, s) for all points s and t. Elementary properties covariance function. If γ(.) is the autocovariance function of a stationary process {X t, t Z}, then: γ(0) 0 γ(h) γ(0) γ(h) = γ( h) h Z h Z Definition: [strict stationarity] The time series {X t, t Z} is said to be strictly stationary if the joint distributions of (X t1,..., X tk ) and (X t1 +h,..., X tk +h) are the same for all positive integers k and for all t 1,..., t k, h Z. Strict stationarity means intuitively that the graphs over two equal-length time intervals of a realization of the time series should exhibit similar statistical characteristics. For example, the proportion of ordinates not exceeding a given level x should be roughly the same for both intervals. Remark 1 The previous definition is equivalent to the statement that (X 1,..., X k ) and (X 1+h,..., X k+h ) have the same joint distribution for all positive integers k and integers h. Remark 2 A strictly stationary process with finite second moments is stationary. The inverse is not necessarily true. 2

Remark 3 If {X t, t Z} is stationary Gaussian process then {X t } is strictly stationary, since for all {1, 2,...} and for all h, t 1, t 2,..., Z the random vectors (X t1,..., X tn ) and (X t1 +h,..., X tn+h) have the same mean and covariance matrix and hence the same distribution. Definition: [autocorrelation function (acf)] The autocorrelation function of a stationary time series is the function whose value at lag h is: ρ X (h) = γ x(h) γ x (0) = Corr(X t+h, X t ) t, h Z The Cauchy-Schwarz inequality shows that 1 ρ(h) 1 for all h. Further, ρ X (h) = 0 if X t and X t+h are not correlated, and ρ X (h) = ±1 if X t+h = α 0 + α 1 X t. The value ρ X (h) is a rough measure of the ability to forecast the series at time t + h from the value at time t. Definition: [cross-covariance function (ccvf)] If {X t, t T } and {Y t, t T } are processes s.t. V ar(x t ) < & V ar(y t ) < for each t T, then the cross-covariance function γ XY (.,.) is defined as: γ XY (r, s) = Cov(X r, Y s ) = E[(X r E(X r ))(Y s E(Y s ))] r, s T (4) Of course there is also a scaled version of the cross-covariance function: Definition: [cross-correlation function (ccf)] The cross-correlation function of {X t, t T } and {Y t, t T } is defined as: ρ XY (s, t) = γ XY (s, t) γx (s, s)γ Y (t, t) s, t Z 3 Estimation of Mean and Correlation Function As we just have one realization of our time series, the assumption of stationarity becomes critical. Somehow, we must use averages over this single realization to estimate the population means and covariance functions. If a time series is stationary, the mean function is constant µ t = µ. In that case we can estimate it by the sample mean: ˆµ = x t = 1 n Assuming stationarity, the autocovariance and autocorrelation function can be estimated using: n t=1 x t 3

Definition: The sample autocovariance function is defined as: n h ˆγ(h) = n 1 (x t+h x)(x t x)) t=1 with ˆγ( h) = ˆγ(h) for h = 0, 1,..., n 1. Dividing by n h ensures that the function is nonnegative definite although it is not an unbiased estimate of γ(h). Definition: The sample autocorrelation function is defined, analogously, as: ˆρ(h) = ˆγ(h) ˆγ(0) Correlogram of 'white noise' Correlogram of 'white noise with trend' ACF 0.2 0.0 0.2 0.4 0.6 0.8 1.0 ACF 0.2 0.0 0.2 0.4 0.6 0.8 1.0 0 5 10 15 20 Lag 0 5 10 15 20 Lag Figure 1: Left: Sample acf of Gaussian white noise. Right: Sample acf of the series generated by X t = t + Z t, where Z t is Gaussian white noise (i.e. X t is white noise with a deterministic trend t). > white.noise = as.ts(rnorm(100)) > acf(white.noise, main = "Correlogram of white noise ") > t = 1:100 > Xt = t + white.noise > acf(xt, main = "Correlogram of white noise with trend ") The sample autocorrelation function has a sampling distribution that allows us to assess whether the data comes from a completely random or white series, or whether correlations are statistically significant at some lags. Large sample distribution of the acf Under general conditions, if x t is white noise, then for large n, the sample acf, ˆρ X (h) for h = 1, 2,..., H, where H is fixed but arbitrary, is approximately normally distributed with zero mean and standard deviation given by: σˆρx(h) = 1 n Remark 1 Based on this result, we obtain a rough method of assessing whether peaks in ˆρ(h) are significant by determining whether the observed peak is outside the interval ±2/ n; for a white noise 4

sequence, approximately 95% of the sample acf s should be within these limits. After trying to reduce a time series to a white noise series the acf s of the residuals should then lie roughly within the limits given above. Remark 2 The sample autocovariance and autocorrelation functions can be computed for nonstationary process. For data containing a trend, ˆρ(h) will exhibit slow decay as h increases, and for data with a substantial deterministic periodic, ˆρ(h) will exhibit similar behaviour with the same periodicity. Remark 3 The sample cross-covariance and sample cross-correlation function are defined analogously to the sample autocovariance and sample autocorrelation function. 3.1 R functions mean(), acf(), acf(type = "covariance"), ccf(), ccf(type = "covariance"). 4 Bibliography This handout is based on handouts prepared by Irma Hernandez-Magallanes, previous GSI for this course. Additional sources that are used, and that could be useful for you: Time Series: Data Analysis and Theory by David R. Brillinger Time Series: Theory and Methods by Peter Brockwell & Richard Davis Time Series Analysis and Its Applications: With R Examples by Robert Schumway & David Stoffer 5