Statistics 153 (Time Series) : Lecture Three

Similar documents
STAT 153: Introduction to Time Series

Time Series Analysis -- An Introduction -- AMS 586

STAT Financial Time Series

Statistics of stochastic processes

Part 1. Multiple Choice (50 questions, 1 point each) Part 2. Problems/Short Answer (10 questions, 5 points each)

Applied Time Series Topics

Basics: Definitions and Notation. Stationarity. A More Formal Definition

3 Time Series Regression

Part II. Time Series

TIME SERIES ANALYSIS AND FORECASTING USING THE STATISTICAL MODEL ARIMA

Based on the original slides from Levine, et. all, First Edition, Prentice Hall, Inc

Time Series Analysis. Smoothing Time Series. 2) assessment of/accounting for seasonality. 3) assessment of/exploiting "serial correlation"

Lecture 02 Linear classification methods I

Empirical Models Interpolation Polynomial Models

FORECASTING COARSE RICE PRICES IN BANGLADESH

1 + lim. n n+1. f(x) = x + 1, x 1. and we check that f is increasing, instead. Using the quotient rule, we easily find that. 1 (x + 1) 1 x (x + 1) 2 =

STAT 436 / Lecture 16: Key

Time series and Forecasting

Forecasting. BUS 735: Business Decision Making and Research. exercises. Assess what we have learned

THE ROYAL STATISTICAL SOCIETY 2009 EXAMINATIONS SOLUTIONS GRADUATE DIPLOMA MODULAR FORMAT MODULE 3 STOCHASTIC PROCESSES AND TIME SERIES

STOR 356: Summary Course Notes

Next, we ll use all of the tools we ve covered in our study of trigonometry to solve some equations.

Lecture 1 Notes: 06 / 27. The first part of this class will primarily cover oscillating systems (harmonic oscillators and waves).

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

FastTrack - MA109. Exponents and Review of Polynomials

Forecasting. Chapter Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

DIFFERENCE EQUATIONS

Precalculus Lesson 4.1 Polynomial Functions and Models Mrs. Snow, Instructor

Time Series and Forecasting

To factor an expression means to write it as a product of factors instead of a sum of terms. The expression 3x

Solution of ODEs using Laplace Transforms. Process Dynamics and Control

Classical Decomposition Model Revisited: I

Chapter 13 - Inverse Functions

From Data To Functions Howdowegofrom. Basis Expansions From multiple linear regression: The Monomial Basis. The Monomial Basis

Modified Holt s Linear Trend Method

5 Transfer function modelling

Exponential Functions:

Precalculus Graphical, Numerical, Algebraic Media Update 7th Edition 2010, (Demana, et al)

MATHEMATICS Lecture. 4 Chapter.8 TECHNIQUES OF INTEGRATION By Dr. Mohammed Ramidh

Time Series and Forecasting

In Z: x + 3 = 2 3x = 2 x = 1 No solution In Q: 3x = 2 x 2 = 2. x = 2 No solution. In R: x 2 = 2 x = 0 x = ± 2 No solution Z Q.

Fitting Linear Statistical Models to Data by Least Squares I: Introduction

Communication Engineering Prof. Surendra Prasad Department of Electrical Engineering Indian Institute of Technology, Delhi

Candidates are expected to have available a calculator. Only division by (x + a) or (x a) will be required.

8.8. Applications of Taylor Polynomials. Infinite Sequences and Series 8

Unit 5 Exponential Functions. I know the laws of exponents and can apply them to simplify expressions that use powers with the same base.

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

Time Series Outlier Detection

Math Lecture 4 Limit Laws

Automatic Forecasting

Applied Time Series Analysis FISH 507. Eric Ward Mark Scheuerell Eli Holmes

Time Series. Anthony Davison. c

Economic Forecasting Lecture 9: Smoothing Methods

Nonlinear Regression Section 3 Quadratic Modeling

ECON 343 Lecture 4 : Smoothing and Extrapolation of Time Series. Jad Chaaban Spring

Factoring. there exists some 1 i < j l such that x i x j (mod p). (1) p gcd(x i x j, n).

Forecasting. Simon Shaw 2005/06 Semester II

Fitting Linear Statistical Models to Data by Least Squares I: Introduction

Ch 9. FORECASTING. Time Series Analysis

Often, in this class, we will analyze a closed-loop feedback control system, and end up with an equation of the form

MA094 Part 2 - Beginning Algebra Summary

1. Graph each of the given equations, state the domain and range, and specify all intercepts and symmetry. a) y 3x

Gradient descent. Barnabas Poczos & Ryan Tibshirani Convex Optimization /36-725

Algebra 1 Seamless Curriculum Guide

Lecture 19 - Decomposing a Time Series into its Trend and Cyclical Components

Something that can have different values at different times. A variable is usually represented by a letter in algebraic expressions.

STATS24x7.com 2010 ADI NV, INC.

EXAMINATIONS OF THE ROYAL STATISTICAL SOCIETY

1 Implicit Differentiation

15-451/651: Design & Analysis of Algorithms October 31, 2013 Lecture #20 last changed: October 31, 2013

PLC Papers. Created For:

TAKEHOME FINAL EXAM e iω e 2iω e iω e 2iω

Cathedral Catholic High School Course Catalog

1 Random walks and data

q 1 q 2 q M 1 p 0 p 1 p M 1

Chetek-Weyerhaeuser High School

TIMES SERIES INTRODUCTION INTRODUCTION. Page 1. A time series is a set of observations made sequentially through time

increasing interval inequality interquartile range input interval irrational number

Physics 342 Lecture 23. Radial Separation. Lecture 23. Physics 342 Quantum Mechanics I

Simple Descriptive Techniques

Advanced Mathematics Unit 2 Limits and Continuity

Advanced Mathematics Unit 2 Limits and Continuity

Principles of Mathematics 12: Explained!

Problem Set 2 Solution Sketches Time Series Analysis Spring 2010

1.1 Basic Algebra. 1.2 Equations and Inequalities. 1.3 Systems of Equations

Nonhomogeneous Linear Differential Equations with Constant Coefficients - (3.4) Method of Undetermined Coefficients

Lecture 2: Linear regression

Instructor (Brad Osgood)

DEPARTMENT OF QUANTITATIVE METHODS & INFORMATION SYSTEMS

PRECALCULUS BISHOP KELLY HIGH SCHOOL BOISE, IDAHO. Prepared by Kristina L. Gazdik. March 2005

Theory of Computation

THE POLYNOMIAL X3 8 IS EQUAL TO EBOOK

Classic Time Series Analysis

Lesson 13: Box-Jenkins Modeling Strategy for building ARMA models

Energy Consumption Anomaly Monitoring Model

Data Mining Techniques

Exponential and logarithm functions

5.1 Polynomial Functions

Announcements. CSE332: Data Abstractions Lecture 2: Math Review; Algorithm Analysis. Today. Mathematical induction. Dan Grossman Spring 2010

Dinwiddie County Subject: Trigonometry Scope and Sequence

Transcription:

Statistics 153 (Time Series) : Lecture Three Aditya Guntuboyina 24 January 2012 1 Plan 1. In the last class, we looked at two ways of dealing with trend in time series data sets - Fitting parametric curves and smoothing. 2. Today, we will finish the story on trend by looking at Filtering (Section 2.5.2) and Differencing (Section 2.5.3). 3. A very common feature of weekly/monthly/quarterly time series data is seasonality. Seasonality is dealt with in the same way as trend (Section 2.6): (a) Fitting parametric seasonal functions (sines and cosines). (b) Smoothing. (c) Differencing. 2 More General Filtering for Trend Estimation The smoothing method described in the last class (19 Jan) for estimating the trend function m t is a special case of linear filtering. A linear filter converts the observed time series X t into an estimate of the trend ˆm t via the linear operation: ˆm t = s a X t+. = q The numbers a q, a q+1,..., a 1, a 0, a 1,..., a s are called the weights of the filter. The Smoothing method is clearly a special instance of filtering with s = q and a = 1/(2q + 1) for q and 0 otherwise. One can think of the filter as a (linear) system which takes the observed series X t as input and produces the estimate of trend, ˆm t as output. 1

In addition to the choice a = 1/(2q + 1) for q, there are other choice of filters that people commonly use. (1) Binomial Weights: Based on the following idea. When we are estimating the value of the trend m t at t, it makes sense to give a higher weight to X t compared to X t±1 and a higher weight to X t±1 compared to X t±2 and so on. An example of such weights are: ( ) q a = 2 q for = q/2, q/2 + 1,..., 1, 0, 1,..., q/2. q/2 + As in usual smoothing, choice of q is an issue here. (2) Spencer s 15 point moving average: We have seen that simple moving average filter leaves linear functions untouched. Is it possible to design a filter which leaves higher order polynomials untouched? For example, can we come up with a filter which leaves all quadratic polynomials untouched. Yes! For a filter with weights a to leave all quadratic polynomials untouched, we need the following to be satisfied for every quadratic polynomial m t : a m t+ = m t for all t In other words, if m t = αt 2 + βt + γ, we need ( a α(t + ) 2 + β(t + ) + γ ) = αt 2 + βt + γ for all t. Simplify to get αt 2 + βt + γ = (αt 2 + βt + γ) a + (2αt + β) a + α 2 a for all t. This will clearly be satisfied if a = 1 a = 0 2 a = 0. (1) An example of such a filter is Spencer s 15 point moving average defined by a 0 = 74 320, a 1 = 67 320, a 2 = 46 320, a 3 = 21 320, a 4 = 3 320, a 5 = 5 320, a 6 = 6 320, a 7 = 3 320 and a = 0 for > 7. Also the filter is symmetric in the sense that a 1 = a 1, a 2 = a 2 and so on. Check that this filter satisfies the condition (1). Because this is a symmetric filter, it can be checked that it allows all cubic polynomials to pass unscathed as well. 2

(3) Exponential Smoothing: Quite a popular method of smoothing (wikipedia has a big page on this). It is also used as a forecasting technique. To obtain ˆm t in this method, one uses only the previous observations X t 1, X t 2, X t 3,.... The weights assigned to these observations exponentially decrease the further one goes back in time. Specifically, ˆm t := αx t 1 +α(1 α)x t 2 +α(1 α) 2 X t 3 + +α(1 α) t 2 X 1 +(1 α) t 1 X 0. Check that the weights add up to 1. α is a parameter that determines the amount of smoothing (α here is analogous to q in smoothing). If α is close to 1, there is very little smoothing and vice versa. 3 Differencing for Trend Elimination The residuals obtained after fitting the trend function m t in the model X t = m t + W t are studied to see if they are purely random or have some dependence structure that can be exploited for prediction. Differencing is a much simpler technique which produces such de-trended residuals. One ust looks at Y t = X t X t 1, t = 2,..., n. If the trend m t in X t = m t + W t is linear, then this operation simply removes it because if m t = αt + b, then m t m t 1 = α so that Y t = α + W t W t 1. Suppose that the first differenced series Y t appears purely random. What then would be a reasonable forecast for the original series: X n+1? Because Y t is purely random, we forecast Y n+1 by the sample mean Ȳ := (Y 2+ +Y n )/(n 1). But since Y n+1 = X n+1 X n, this results in the forecast X n + Ȳ for X n+1. Sometimes, even after differencing, one can notice a trend in the data. In that case, ust difference again. It is useful to follow the notation for differencing: X t = X t X t 1 for t = 2,..., n and second differencing corresponds to 2 X t = ( X t ) = X t X t 1 = X t 2X t 1 + X t 2 for t = 3,..., n. It can be shown that quadratic trends simply disappear with the operation 2. Suppose the data 2 X t appear purely random, how would you obtain a forecast for X n+1? Differencing is a quick and easy way to produce detrended residuals and is a key component in the ARIMA forecasting models (later). A problem however is that it does not result in any estimate for the trend function m t. 3

4 Seasonality In this section, we shall discuss fitting models of the form X t = s t + W t to the data where s t is a periodic function of a known period d i.e., s t+d = s t for all t. Such a function s models seasonality. These models are appropriate to monthly or quarterly data sets that have a seasonal pattern to them. This model, however, will not be applicable for datasets having both trend and seasonality which is the more realistic situation. These will be focussed a little later. Just like the trend case, there are three different approaches to dealing with seasonality: fitting parametric functions, smoothing and differencing. 4.1 Fitting a parametric seasonality function The simplest periodic functions of period d are: a cos(2πft/d) and a sin(2πft/d). Here f is a positive integer that is called frequency. The higher f is, the more rapid the oscillations in the function are. More generally, k s t = a 0 + (a cos(2πft/d) + b sin(2πft/d)) is a periodic function. f=1 Choose a value of k (not too large) and fit this to the data. 4.2 Smoothing Because of periodicity, the function s t only depends on the d values s 1, s 2,..., s d. Clearly s 1 can be estimated by the average of X 1, X 1+d, X 1+2d,.... For example, for monthly data, this corresponds to estimating the mean term for January by averaging all January observations. Thus ŝ i := average of X i, X i+d, X i+2d,... Note that here, we are fitting 12 parameters (one each for s 1,..., s d ) from n observations. If n is not that big, fitting 12 parameters might lead to overfitting. 4.3 Differencing How can we obtain residuals adusted for seasonality from the data without explicitly fitting a seasonality function? Recall that a function s is a periodic 4

function of period d if s t+d = s t for all t. The model that we have in mind here is: X t = s t + W t. Clearly X t X t d = s t s t d + W t W t d = W t W t d. Therefore, the lad-d differenced data X t X t d do not display any seasonal trend. This method of producing deseasonalized residuals is called Seasonal Differencing. 5 Next Class 1. Dealing with both trend and seasonality (Section 2.6). 2. Transformations (Section 2.4) 5