Autocovariance and Autocorrelation



Similar documents
Overview of Violations of the Basic Assumptions in the Classical Normal Linear Regression Model

The Bivariate Normal Distribution

1 Short Introduction to Time Series

Time Series Analysis

Sales forecasting # 2

Correlation in Random Variables

Chapter 1. Vector autoregressions. 1.1 VARs and the identi cation problem

Time Series Analysis

Equations, Inequalities & Partial Fractions

Summary of Formulas and Concepts. Descriptive Statistics (Ch. 1-4)

Lecture 2: ARMA(p,q) models (part 3)

MA107 Precalculus Algebra Exam 2 Review Solutions

Vieta s Formulas and the Identity Theorem

3.1. Solving linear equations. Introduction. Prerequisites. Learning Outcomes. Learning Style

Estimating an ARMA Process

Linear Equations and Inequalities

Covariance and Correlation

Some probability and statistics

Lesson19: Comparing Predictive Accuracy of two Forecasts: Th. Diebold-Mariano Test

Probability and Random Variables. Generation of random variables (r.v.)

An introduction to Value-at-Risk Learning Curve September 2003

Advanced Forecasting Techniques and Models: ARIMA

Financial Risk Management Exam Sample Questions/Answers

Wooldridge, Introductory Econometrics, 3d ed. Chapter 12: Serial correlation and heteroskedasticity in time series regressions

MULTIVARIATE PROBABILITY DISTRIBUTIONS

PITFALLS IN TIME SERIES ANALYSIS. Cliff Hurvich Stern School, NYU

Spatial Statistics Chapter 3 Basics of areal data and areal data modeling

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

Multivariate Analysis (Slides 13)

Probability and Statistics Prof. Dr. Somesh Kumar Department of Mathematics Indian Institute of Technology, Kharagpur

Analysis and Computation for Finance Time Series - An Introduction

Trend and Seasonal Components

Example: Credit card default, we may be more interested in predicting the probabilty of a default than classifying individuals as default or not.

Sections 2.11 and 5.8

CORRELATION ANALYSIS

Univariate Time Series Analysis; ARIMA Models

Math 151. Rumbos Spring Solutions to Assignment #22

1 Portfolio mean and variance

Least-Squares Intersection of Lines

SYSTEMS OF REGRESSION EQUATIONS

Math 431 An Introduction to Probability. Final Exam Solutions

SIMPLE LINEAR CORRELATION. r can range from -1 to 1, and is independent of units of measurement. Correlation can be done on two dependent variables.

Testing Random- Number Generators

Part 2: Analysis of Relationship Between Two Variables

Solution to HW - 1. Problem 1. [Points = 3] In September, Chapel Hill s daily high temperature has a mean

Understanding and Applying Kalman Filtering

Solving Systems of Linear Equations Using Matrices

Solutions to Exam in Speech Signal Processing EN2300

This unit will lay the groundwork for later units where the students will extend this knowledge to quadratic and exponential functions.

3.2. Solving quadratic equations. Introduction. Prerequisites. Learning Outcomes. Learning Style

Section 1.1 Linear Equations: Slope and Equations of Lines

Time Series and Forecasting

Univariate and Multivariate Methods PEARSON. Addison Wesley

Module 3: Correlation and Covariance

Chapter 10. Key Ideas Correlation, Correlation Coefficient (r),

CALCULATIONS & STATISTICS

4. Continuous Random Variables, the Pareto and Normal Distributions

Introduction to Matrix Algebra

Generating Random Numbers Variance Reduction Quasi-Monte Carlo. Simulation Methods. Leonid Kogan. MIT, Sloan , Fall 2010

Analysis of Bayesian Dynamic Linear Models

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

Vector and Matrix Norms

Introduction to General and Generalized Linear Models

Solving Linear Systems, Continued and The Inverse of a Matrix

Correlation key concepts:

ANALYZING INVESTMENT RETURN OF ASSET PORTFOLIOS WITH MULTIVARIATE ORNSTEIN-UHLENBECK PROCESSES

Homework 4 - KEY. Jeff Brenion. June 16, Note: Many problems can be solved in more than one way; we present only a single solution here.

Life Table Analysis using Weighted Survey Data

Binomial Sampling and the Binomial Distribution

Hypothesis testing - Steps

CORRELATED TO THE SOUTH CAROLINA COLLEGE AND CAREER-READY FOUNDATIONS IN ALGEBRA

Chapter 13 Introduction to Nonlinear Regression( 非 線 性 迴 歸 )

1 Determinants and the Solvability of Linear Systems

Solving Systems of Linear Equations

Discrete Time Series Analysis with ARMA Models

Chapter 3 RANDOM VARIATE GENERATION

Time Series Analysis of GPS Observables

Chapter 4: Vector Autoregressive Models

4. Association between and within the time series

MATH4427 Notebook 2 Spring MATH4427 Notebook Definitions and Examples Performance Measures for Estimators...

Univariate Time Series Analysis; ARIMA Models

Econometrics Simple Linear Regression

Quadratic forms Cochran s theorem, degrees of freedom, and all that

1 Another method of estimation: least squares

Data Mining: Algorithms and Applications Matrix Math Review

Simple Regression Theory II 2010 Samuel L. Baker

Chicago Booth BUSINESS STATISTICS Final Exam Fall 2011

Time Series Analysis

Impulse Response Functions

MISSING DATA TECHNIQUES WITH SAS. IDRE Statistical Consulting Group

Variance Reduction. Pricing American Options. Monte Carlo Option Pricing. Delta and Common Random Numbers

Linear Regression. Guy Lebanon

Efficiency and the Cramér-Rao Inequality

problem arises when only a non-random sample is available differs from censored regression model in that x i is also unobserved

Auxiliary Variables in Mixture Modeling: 3-Step Approaches Using Mplus

Joint Exam 1/P Sample Exam 1

Solving Systems of Linear Equations Graphing

For a partition B 1,..., B n, where B i B j = for i. A = (A B 1 ) (A B 2 ),..., (A B n ) and thus. P (A) = P (A B i ) = P (A B i )P (B i )

Probability Calculator

5.5. Solving linear systems by the elimination method

Transcription:

Chapter 3 Autocovariance and Autocorrelation If the {X n } process is weakly stationary, the covariance of X n and X n+k depends only on the lag k. This leads to the following definition of the autocovariance of the process: Questions: γ(k) = cov(x n+k, X n ) (3.). What is the variance of the process in terms of γ(k)? 2. Show γ(0) γ(k) for all k. 3. Show γ(k) is an even function i.e. γ( k) = γ(k). The autocorrelation function, ρ(k), is defined by ρ(k) = γ(k) γ(0) (3.2) This is simply the correlation between X n and X n+k. Another interpretation of ρ(k) is the optimal weight for scaling X n into a prediction of X n+k i.e. the weight, a say, that minimizes E(X n+k ax n ) 2. 8

There are additional constraints on γ(k) beyond symmetry and maximum value at zero lag. To illustrate, assume X n and X n+ are perfectly correlated, X n+ and X n+2 perfectly correlated. It is clearly nonsensical to set the correlation between X n and X n+2 to zero. To obtain the additional constraints define the p vector and a set of constants X = [X n+, X n+2,..., X n+p ] a = [a, a 2,... a p ] Consider now the following linear combination of the elements of X: Z = a i X i = a X The variance of Z is a Σ XX a where Σ XX is the p p covariance matrix of the random vector X. (I ll discuss this in class.) If {X n } is a stationary random process Σ XX has the following special form: Σ XX = σ 2 ρ() ρ(2)... ρ(p ) ρ() ρ()... ρ(p 2) ρ(2) ρ()....... ρ() ρ(p ) ρ() The variance of Z cannot be negative and so a Σ XX a 0 for all nonzero a. We say Σ XX is a positive semi-definite. This implies n n r= s= a r a s ρ(r s) 0 We will return to this condition later in the course after we have discussed power spectra. 9

3. Autocovariances of Some Special Processes. The Purely Random Process: This process has uncorrelated, zero-mean, random variables with constant variance. It is usually denoted by {ɛ n } and its mean, variance and autocovariance are given by E(ɛ n ) = 0 var(ɛ n ) = σ 2 ρ(k) = 0 k 0 X n =! n 0 0 20 30 40 50 60 Time index, n Figure 3.: Five realizations from a purely random (Gaussian) process. 20

2. The AR() Process: This is the skater example with a purely random process for the forcing. The mean is zero, the variance is σ 2 /( a 2 ) and the autocorrelation is a k. 3. Sums and Differences Question: What is the variance and autocorrelation of X n +X n and X n X n if {X n } is a stationary random process with variance σ 2 and autocorrelation ρ(k)? Interpret for the special case of an AR() process as a. 4. The Moving Average Process, MA(q): This is just a weighted average of a purely random process: X n = b 0 ɛ n + b ɛ n +... + b q ɛ n q The mean, variance and autocorrelation of the MA(p) process are given by and E(X n ) = 0 var(x n ) = σ 2 (b 2 0 + b 2 +... b 2 q) ρ(k) = b 0b k + b b k+ +... b q k b q b 2 0 + b 2 +... b 2 q k q and zero otherwise (see page 26, 04 of Shumway and Stoffer). Question: What is the variance and autocorrelation of the MA(q) process when the weights are equal? Plot the autocorrelation function. 2

3.2 Estimation of Autocovariance Assume we have 2N + observations of the stationary random process {X n }: X N, X N+,... X, X 0, X,... X N, X N The natural estimate of autocovariance is based on replacing ensemble averaging by time averaging: ˆγ XX (k) = 2N + N k n= N (X n+k X)(X n X) k 0 (3.3) To simplify the following discussion of the properties of this estimator, assume the process has zero mean and use the following simplified estimator: ˆγ(k) = 2N + N n= N X n+k X n (3.4) Question: Show E ˆγ(k) = γ(k) i.e. the estimator is unbiased. The covariance between the estimator for lag k and k 2 is cov(ˆγ(k ), ˆγ(k 2 )) = E(ˆγ(k )ˆγ(k 2 )) γ(k )γ(k 2 ) (3.5) of The first term on the right hand-side of (3.5) is the expected value ˆγ(k )ˆγ(k 2 ) = (2N + ) 2 N N u= N v= N X u+k X u X v+k2 X v We assume an odd number of observations because it makes the math easier in the frequency domain. 22

How do we deal with these messy, quadruple products? Turns out that if the process is normal (i.e. any collection of {X n } has a multivariate normal distribution - see page 550 of Shumway and Stoffer - I ll discuss in class) we can take advantage of the following result: If Z through Z 4 have a multivariate normal distribution with zero mean: E(Z Z 2 Z 3 Z 4 ) = E(Z Z 2 )E(Z 3 Z 4 )+E(Z Z 3 )E(Z 2 Z 4 )+E(Z Z 4 )E(Z 2 Z 3 ) Using this result the quadruple product breaks down into simpler terms that can be described with autocovariance functions. It is then possible (see page 55 of Shumway and Stoffer, page 326 of Priestley)) to obtain the following approximation for large sample sizes: cov(ˆγ(k ), ˆγ(k 2 )) 2N + s= γ(s)γ(s + k k 2 ) + γ(k + s)γ(k 2 s) (3.6) Setting k = k 2 we get the variance of the sample autocovariance: var(ˆγ(k)) 2N + s= γ 2 (s) + γ(k + s)γ(k s) (3.7) These are extremely useful formulae that allows us to estimate variance and covariances of the sample autocovariance functions. As we will see on the next page, they will help us avoid over-interpreting sample autocovariance functions. 23

Don t Over Interpret Wiggles in the Tails The (asymptotic) covariance of the sample autocovariance is cov(ˆγ(k+m), ˆγ(k)) 2N + s= γ(s)γ(s + m) + γ(k + m + s)γ(k s) Assume γ(k) = 0 for k > K, i.e. the system has limited memory. As we move into the tails (k, m > 0) it is straightforward to show that the second product drops out (I ll draw some pictures in class) to give cov(ˆγ(k + m), ˆγ(k)) 2N + s= γ(s + m)γ(s) Thus neighboring sample covariances will, in general, be correlated, even at lags where the true autocovariance is zero i.e. k > K. In other words we can expect the structure in ˆγ(k) to damp out less quickly than γ(k). If we put m = 0 in this formula we obtain the (asymptotic) variance of the sample autocovariance in the tails. Note it too does not go to zero. (What does it tend to?) Bottom line: Watch out for those wiggly tails in the autocovariancethey may not be real! The following Matlab code generates a realization of length N = 500 from an AR() process with an autoregressive coefficient a = 0.6. The sample and theoretical autocovariances are then plot over each other. Use the above results to interpret this figure. 24

a=0.6; N=500; Nlags=50; x=randn(); X=[x]; for n=:n x=a*x+randn()*sqrt(-a^2); X=[X; x ]; end [Acf,lags]=xcov(X,Nlags, biased ); plot(lags,acf, k-,lags,a.^abs(lags), r- ) xlabel( Lags ); legend( Sample AutoCovariance, True AutoCovariance ) grid &'%.+/0234567879+:;+<=2 >:52345673879+:;+<=2 & "') "'( "'# "'% "!"'%!!"!#"!$"!%"!&" " &" %" $" #"!" *+,- Figure 3.2: Sample and theoretical autocovariance functions for an AR() process with a = 0.6. The realization is of length N = 500. The important point to note is that the wiggles in the tails are due entirely to sampling variability - they are not real in the sense they do not reflect wiggles in the tails of the true autocovariance function, γ(k). 25

3.3 Estimation of the Autocorrelation Function The estimator for the theoretical autocorrelation, ρ(k), is ˆρ(k) = ˆγ(k) ˆγ(0) where ˆγ(k) is the sample autocovariance function discussed above. This estimator is the ratio of two random quantities, ˆγ(k) and ˆγ(0), and so it should be no surprise that its sampling distribution is more complicated than that of ˆγ(k). If the process is Gaussian process and the sample size is large, it can be shown (page 59 of Shumway and Stoffer) cov [ˆρ(k + m), ˆρ(k)] 2N + s= ρ(s)ρ(s+m)+ρ(s+k+m)ρ(s k)+2ρ(k)ρ(k+m)ρ 2 (s) 2ρ(k)ρ(s)ρ(s k m) 2ρ(k + m)ρ(s)ρ(s k) This is a messy formula (don t bother copying onto you exam cheat sheets) but it yields useful information, particularly when we make some simplifying assumptions. Question: if {X n } is a purely random process show that for large sample sizes varˆρ(k) 2N + 26

It can be shown more generally that, for large sample size, the sampling distribution of ˆρ(k) is approximately normal with mean ρ(k) (the estimator is unbiased) and variance by the above equation with m = 0. If we evaluate the variance of ˆρ(k) by substituting the sample autocorrelation or a fitted model, we can calculate confidence intervals for ρ(k) in the usual way. We can also calculate approximate 5% significance levels for zero correlation using ±.96/ 2N +. (Be careful of the problems of multiple testing however.) #'$ #.+/023+4535673+30872937+:;6/307642--3<-+/023-=>23653"!!?.+/023@8A6B6C+7=+:42 D7823@8A63B6C+7=+:42 "E3-=,:=5=4+:4232C2-!')!'(!'&!'$!!!'$! " #! #" $! $" %! %" &! &" "! *+,- Figure 3.3: Sample auto correlation functions for a purely random process. The realization is of length 500. The dotted lines show the 5% significance levels of zero correlation. 27