15
Chapt14 14 14 14 M l i l R i M l i l R i M l i l R i M l i l R i er 14 14 14 14 Multiple Regression Multiple Regression Multiple Regression Multiple Regression Ti S i C t Ti S i C t Time Series Components Time Series Components Trend Fitting Trend Fitting Assessing Fit Assessing Fit Moving Averages Moving Averages Moving Averages Moving Averages Exponential Smoothing Exponential Smoothing Seasonality Seasonality Seasonality Seasonality Forecasting: Final Thoughts Forecasting: Final Thoughts Time Series Components Time Series Components Time Series Components Time Series Components Time Series Components Time Series Components Time Series Components Time Series Components Time Series Data Time Series Data A A time series variable time series variable (Y) consists of data ) consists of data observed over observed over n periods of time periods of time Time Series Data Time Series Data observed over observed over n periods of time. periods of time. Businesses use time series data Businesses use time series data - to monitor a process to determine if it is stable to monitor a process to determine if it is stable to monitor a process to determine if it is stable to monitor a process to determine if it is stable - to predict the future (forecasting) to predict the future (forecasting) Time series data can also be used to understand Time series data can also be used to understand Time series data can also be used to understand Time series data can also be used to understand economic, population, health, crime, sports, and economic, population, health, crime, sports, and social problems. social problems. McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved. Time Series Components Time Series Components Time Series Components Time Series Components Time Series Components Time Series Components Time Series Components Time Series Components Time Series Data Time Series Data Time series data are Time series data are usually plotted as a line usually plotted as a line b h b h Time Series Data Time Series Data or bar graph. or bar graph. Time is on the Time is on the horizontal ( horizontal (X) axis ) axis horizontal ( horizontal (X) axis. ) axis. This reveals how a This reveals how a variable changes over variable changes over time. time. Fluctuations are easier Fluctuations are easier t li h t li h to see on a line graph. to see on a line graph. McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Time Series Components - @@ Home - KKU Web Hosting · Trend Forecasting Linear Trend: Calculating R2 • R2 can be calculated as Linear Trend: Calculating R • An R2 close to close

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Time Series Components - @@ Home - KKU Web Hosting · Trend Forecasting Linear Trend: Calculating R2 • R2 can be calculated as Linear Trend: Calculating R • An R2 close to close

Chapte14141414

M l i l R iM l i l R iM l i l R iM l i l R i

er14141414Multiple RegressionMultiple RegressionMultiple RegressionMultiple Regression

Ti S i C tTi S i C tTime Series ComponentsTime Series ComponentsTrend FittingTrend FittingAssessing FitAssessing Fit

Moving AveragesMoving AveragesMoving AveragesMoving AveragesExponential SmoothingExponential Smoothing

SeasonalitySeasonalitySeasonalitySeasonalityForecasting: Final ThoughtsForecasting: Final Thoughts

Time Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series Components

Time Series DataTime Series Data•• A A time series variabletime series variable ((YY) consists of data ) consists of data

observed overobserved over nn periods of timeperiods of time

Time Series DataTime Series Data

observed over observed over nn periods of time.periods of time.•• Businesses use time series data Businesses use time series data

-- to monitor a process to determine if it is stableto monitor a process to determine if it is stableto monitor a process to determine if it is stableto monitor a process to determine if it is stable-- to predict the future (forecasting)to predict the future (forecasting)

•• Time series data can also be used to understandTime series data can also be used to understandTime series data can also be used to understand Time series data can also be used to understand economic, population, health, crime, sports, and economic, population, health, crime, sports, and social problems.social problems.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Time Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series Components

Time Series DataTime Series Data•• Time series data are Time series data are

usually plotted as a line usually plotted as a line b hb h

Time Series DataTime Series Data

or bar graph.or bar graph.•• Time is on the Time is on the

horizontal (horizontal (XX) axis) axishorizontal (horizontal (XX) axis.) axis.•• This reveals how a This reveals how a

variable changes over variable changes over ggtime.time.

•• Fluctuations are easier Fluctuations are easier t li ht li hto see on a line graph.to see on a line graph.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Page 2: Time Series Components - @@ Home - KKU Web Hosting · Trend Forecasting Linear Trend: Calculating R2 • R2 can be calculated as Linear Trend: Calculating R • An R2 close to close

Time Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series Components

Time Series DataTime Series Data•• The following notation is used:The following notation is used:

yytt is the value of the time series in period is the value of the time series in period tt

Time Series DataTime Series Data

yytt pptt is an index denoting the time period is an index denoting the time period ((tt = = 11, , 22, …, , …, nn))

nn is the number of time periodsis the number of time periodsyy11, , yy22, …, , …, yynn is the data set for analysisis the data set for analysis

•• To distinguish time series data from crossTo distinguish time series data from cross--sectional data usesectional data use yy instead ofinstead of xx for anfor ansectional data, use sectional data, use yytt instead of instead of xxii for an for an individual observation.individual observation.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Time Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series Components

Stocks and FlowsStocks and Flows•• A A stockstock is time series data that have been is time series data that have been

measured measured at aat a point in timepoint in time. .

Stocks and FlowsStocks and Flows

pp•• For example, For example, prime rate of interestprime rate of interest is measured is measured

at a particular point in time.at a particular point in time.•• A A flowflow is time series data that have been is time series data that have been

measured measured over an interval of timeover an interval of time..•• For example, For example, Gross Domestic Product Gross Domestic Product ((GDPGDP) is a ) is a

flow of goods and services measured over an flow of goods and services measured over an i t l f tii t l f tiinterval of time.interval of time.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Time Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series Components

PeriodicityPeriodicity•• The The PeriodicityPeriodicity is the time interval over which is the time interval over which

data are collected.data are collected.

PeriodicityPeriodicity

•• Data can be collected once every Data can be collected once every -- decadedecade-- year (e.g., year (e.g., 1 1 observation per year)observation per year)-- quarter (e.g., quarter (e.g., 4 4 observations per year)observations per year)

month (e gmonth (e g 1212 obser ations per ear)obser ations per ear)-- month (e.g., month (e.g., 12 12 observations per year) observations per year) -- weekweek-- daydaydayday-- hourhour

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Time Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series Components

Additive versus Multiplicative ModelsAdditive versus Multiplicative Models•• Time series Time series decompositiondecomposition seeks to separate a seeks to separate a

time series time series YY into four components:into four components:

Additive versus Multiplicative ModelsAdditive versus Multiplicative Models

pp-- Trend (Trend (TT))-- Cycle (Cycle (CC))

S l (S l (SS))-- Seasonal (Seasonal (SS))-- Irregular (Irregular (II))These components are ass med to follo eitherThese components are ass med to follo either•• These components are assumed to follow either These components are assumed to follow either an additive or a multiplicative model.an additive or a multiplicative model.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Page 3: Time Series Components - @@ Home - KKU Web Hosting · Trend Forecasting Linear Trend: Calculating R2 • R2 can be calculated as Linear Trend: Calculating R • An R2 close to close

Time Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series Components

Additive versus Multiplicative ModelsAdditive versus Multiplicative ModelsAdditive versus Multiplicative ModelsAdditive versus Multiplicative Models

•• The multiplicative model becomes additive is The multiplicative model becomes additive is logarithms are taken (for nonnegative data):logarithms are taken (for nonnegative data):

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Time Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series Components

A Graphical ViewA Graphical View•• Here is a Here is a

graphicalgraphical

A Graphical ViewA Graphical View

graphical graphical view of the view of the 4 4 components components of a of a hypothetical hypothetical ti iti itime series.time series.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Time Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series Components

TrendTrend•• TrendTrend ((TT) is the general ) is the general

movement over all years movement over all years

TrendTrend

((tt = = 11, , 22, ..., , ..., nn).).•• Trends may be steady and Trends may be steady and

predictable increasingpredictable increasingpredictable, increasing, predictable, increasing, decreasing, or staying the decreasing, or staying the same. same. A th ti l t dA th ti l t d•• A mathematical trend can A mathematical trend can be fitted to any data but may be fitted to any data but may or may not be useful for or may not be useful for predictions.predictions.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Time Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series Components

TrendTrendSteady TrendSteady Trend

TrendTrend

Erratic PatternErratic PatternErratic PatternErratic Pattern

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Page 4: Time Series Components - @@ Home - KKU Web Hosting · Trend Forecasting Linear Trend: Calculating R2 • R2 can be calculated as Linear Trend: Calculating R • An R2 close to close

Time Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series Components

CycleCycle•• CycleCycle ((CC) is a repetitive ) is a repetitive

upup andand downdown

CycleCycle

upup--andand--down down movement movement about a about a trendtrend that covers that covers several years.several years.

•• Over a small number of Over a small number of time periods, cycles time periods, cycles are undetectable or are undetectable or

bl t dbl t dmay resemble a trend.may resemble a trend.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Time Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series Components

SeasonalSeasonal•• SeasonalSeasonal ((SS) is a ) is a

repetitive cyclical pattern repetitive cyclical pattern

SeasonalSeasonal

p y pp y pwithin a yearwithin a year (or within a (or within a week, day, or other time week, day, or other time period)period)period). period).

•• Over a small number of Over a small number of time periods, cycles aretime periods, cycles aretime periods, cycles are time periods, cycles are undetectable or may undetectable or may resemble a trend.resemble a trend.

•• By definition, annual data By definition, annual data have no seasonality.have no seasonality.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Time Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series ComponentsTime Series Components

IrregularIrregular•• IrregularIrregular ((II) is a random ) is a random

disturbance that follows disturbance that follows

IrregularIrregular

no pattern.no pattern.•• It is also called the It is also called the error error

component or component or random random noisenoise reflecting all factors reflecting all factors other than trend, cycleother than trend, cycleother than trend, cycle other than trend, cycle and seasonality.and seasonality.

•• Short run forecasts are Short run forecasts are best if data are irregular.best if data are irregular.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Trend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend Forecasting

•• The main categories of forecasting models are:The main categories of forecasting models are:The main categories of forecasting models are:The main categories of forecasting models are:

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Page 5: Time Series Components - @@ Home - KKU Web Hosting · Trend Forecasting Linear Trend: Calculating R2 • R2 can be calculated as Linear Trend: Calculating R • An R2 close to close

Trend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend Forecasting

Three Trend ModelsThree Trend Models•• The following three trend models are especially The following three trend models are especially

useful in business applications:useful in business applications:

Three Trend ModelsThree Trend Models

useful in business applications:useful in business applications:

•• All three models can be fitted by Excel, All three models can be fitted by Excel,

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

MegaStat, or MINITAB.MegaStat, or MINITAB.

Trend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend Forecasting

Linear Trend ModelLinear Trend Model•• The The linearlinear trend model has the formtrend model has the form

yytt = = aa + + btbt

Linear Trend ModelLinear Trend Model

yytt

•• It is the simplest model and may suffice for shortIt is the simplest model and may suffice for short--run forecasting or as a baseline model.run forecasting or as a baseline model.gg

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Trend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend Forecasting

Linear Trend CalculationsLinear Trend Calculations•• Linear trend is fitted by using ordinary least Linear trend is fitted by using ordinary least

squares formulassquares formulas

Linear Trend CalculationsLinear Trend Calculations

squares formulas.squares formulas.•• Note: instead of using the actual time values Note: instead of using the actual time values

(e.g., years), use an index(e.g., years), use an index xxtt == 11,, 22,, 33, …., ….(e.g., years), use an index (e.g., years), use an index xxtt 11, , 22, , 33, …., ….

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Trend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend Forecasting

Forecasting a Linear TrendForecasting a Linear Trend•• Once the slope and intercept have been Once the slope and intercept have been

calculated, a forecast can be made for any future calculated, a forecast can be made for any future

Forecasting a Linear TrendForecasting a Linear Trend

, y, ytime period (e.g., year) by using the fitted model.time period (e.g., year) by using the fitted model.

•• For example, For example,

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Page 6: Time Series Components - @@ Home - KKU Web Hosting · Trend Forecasting Linear Trend: Calculating R2 • R2 can be calculated as Linear Trend: Calculating R • An R2 close to close

Trend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend Forecasting

Linear Trend: Calculating RLinear Trend: Calculating R22

•• RR22 can be calculated ascan be calculated asLinear Trend: Calculating RLinear Trend: Calculating R

•• An An RR22 close to close to 11..0 0 would indicate a good fit to the would indicate a good fit to the pastpast datadatapastpast data.data.

•• However, more information is needed since the However, more information is needed since the forecast is simply a projection of current trendforecast is simply a projection of current trend

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

forecast is simply a projection of current trend forecast is simply a projection of current trend assuming that nothing changes.assuming that nothing changes.

Trend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend Forecasting

Exponential Trend ModelExponential Trend Model•• The The exponential trendexponential trend model has the formmodel has the form

yytt = = aeaebtbt

Exponential Trend ModelExponential Trend Model

yytt

•• Useful for a time series that grows or declines at Useful for a time series that grows or declines at the same the same raterate ((bb) in each time period.) in each time period.(( ))

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Trend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend Forecasting

When to Use the Exponential ModelWhen to Use the Exponential Model•• This model is often preferred for financial data or This model is often preferred for financial data or

data that covers a longer period of time.data that covers a longer period of time.

When to Use the Exponential ModelWhen to Use the Exponential Model

g pg p•• You can compare two growth rates in two time You can compare two growth rates in two time

series variables with dissimilar data units (i.e., a series variables with dissimilar data units (i.e., a ((percent growth rate is percent growth rate is unitunit--freefree))

•• There may not be much difference between a There may not be much difference between a linear and exponential model when the growth linear and exponential model when the growth rate is small and the data set covers only a few rate is small and the data set covers only a few time periodstime periodstime periods.time periods.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Trend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend Forecasting

When to Use the Exponential ModelWhen to Use the Exponential Model•• The linear model The linear model

((yytt = = aa + + btbt) and the ) and the

When to Use the Exponential ModelWhen to Use the Exponential Model

((yytt ))exponential model exponential model ((yytt = = aeaebtbt) are equally ) are equally simple because they simple because they are twoare two--parameter parameter models and a logmodels and a logmodels and a logmodels and a log--transformed transformed exponential model is exponential model is ppactually linear.actually linear.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Page 7: Time Series Components - @@ Home - KKU Web Hosting · Trend Forecasting Linear Trend: Calculating R2 • R2 can be calculated as Linear Trend: Calculating R • An R2 close to close

Trend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend Forecasting

Exponential Trend CalculationsExponential Trend Calculations•• Calculations of the exponential trend are done by Calculations of the exponential trend are done by

using a transformed variableusing a transformed variable zztt = ln(= ln(yytt) to produce) to produce

Exponential Trend CalculationsExponential Trend Calculations

using a transformed variable using a transformed variable zztt ln( ln(yytt) to produce ) to produce a linear equation so that the least squares a linear equation so that the least squares formulas can be used.formulas can be used.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Trend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend Forecasting

Exponential Trend CalculationsExponential Trend Calculations•• Once the least squares calculations are Once the least squares calculations are

completed transform the intercept back to thecompleted transform the intercept back to the

Exponential Trend CalculationsExponential Trend Calculations

completed, transform the intercept back to the completed, transform the intercept back to the original units by exponentiation to get the correct original units by exponentiation to get the correct intercept.intercept.

•• For example, if For example, if bb = = 11..340178 340178 and and aa = .= .38937323893732,,aa = e= e11..340178 340178 = = 33..81978197

•• In the final form, the fitted trend line would beIn the final form, the fitted trend line would beyytt = = aeaebtbt = = 33..81978197ee11..340178340178tt

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Trend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend Forecasting

Forecasting an Exponential TrendForecasting an Exponential Trend•• A forecast can be made for any future time period A forecast can be made for any future time period

(e g year) by using the fitted model(e g year) by using the fitted model

Forecasting an Exponential TrendForecasting an Exponential Trend

(e.g., year) by using the fitted model.(e.g., year) by using the fitted model.•• For example,For example,

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Trend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend Forecasting

Exponential Trend: Calculating RExponential Trend: Calculating R22

•• All calculations of All calculations of RR22 are done in terms of are done in terms of zztt = ln(= ln(yytt). ).

Exponential Trend: Calculating RExponential Trend: Calculating R

tt ((yytt))

•• An An RR22 close to close to 11..0 0 would indicate a good fit to the would indicate a good fit to the pastpast data.data.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

pastpast data.data.

Page 8: Time Series Components - @@ Home - KKU Web Hosting · Trend Forecasting Linear Trend: Calculating R2 • R2 can be calculated as Linear Trend: Calculating R • An R2 close to close

Trend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend Forecasting

Quadratic TrendQuadratic Trend•• A A quadratic trendquadratic trend model has the formmodel has the form

yytt = = aa + + bbtt + + cctt22

Quadratic TrendQuadratic Trend

yytt tt tt

•• If If cc = = 00, then the quadratic model becomes a , then the quadratic model becomes a linear model (i.e., the linear model is a special linear model (i.e., the linear model is a special ((case of the quadratic model).case of the quadratic model).

•• Fitting a quadratic model is a way of checking for Fitting a quadratic model is a way of checking for nonlinearity.nonlinearity.

•• If If cc does not differ significantly from zero, then does not differ significantly from zero, then h li d l ld ffih li d l ld ffithe linear model would suffice.the linear model would suffice.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Trend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend Forecasting

Quadratic TrendQuadratic Trend•• Depending on Depending on

the values of the values of

Quadratic TrendQuadratic Trend

bb and and cc, the , the quadratic quadratic model can model can assume any assume any of fourof fourof four of four shapes:shapes:

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Trend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend Forecasting

Quadratic TrendQuadratic Trend•• Because the quadratic trend modelBecause the quadratic trend model

yytt = = aa + + bbtt + + cctt22 is a multiple regression with two is a multiple regression with two

Quadratic TrendQuadratic Trend

yytt tt tt p gp gpredictors (predictors (tt and and tt22), the least squares calculations ), the least squares calculations can be obtained from MINITAB. For example,can be obtained from MINITAB. For example,

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Trend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend Forecasting

Using Excel for Trend FittingUsing Excel for Trend Fitting•• Plot the data, rightPlot the data, right--click on the data and choose a click on the data and choose a

trend. Click the trend. Click the OptionsOptions tab if you want to display tab if you want to display

Using Excel for Trend FittingUsing Excel for Trend Fitting

pp y p yy p yRR22 and the fitted equation on the graph.and the fitted equation on the graph.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Page 9: Time Series Components - @@ Home - KKU Web Hosting · Trend Forecasting Linear Trend: Calculating R2 • R2 can be calculated as Linear Trend: Calculating R • An R2 close to close

Trend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend Forecasting

Using Excel for Trend FittingUsing Excel for Trend FittingUsing Excel for Trend FittingUsing Excel for Trend Fitting

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Trend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend Forecasting

TrendTrend--Fitting CriteriaFitting CriteriaTrendTrend Fitting CriteriaFitting Criteria•• Criteria for selecting a trend forecasting model:Criteria for selecting a trend forecasting model:

CriterionCriterion Ask YourselfAsk Yourself•• Occam’s RazorOccam’s Razor Would a simpler model Would a simpler model

suffice?suffice?•• Overall fitOverall fit How does the trend fit theHow does the trend fit the

past data?past data?B li bilitB li bilit D th t l t d t dD th t l t d t d•• BelievabilityBelievability Does the extrapolated trend Does the extrapolated trend

“look right”?“look right”?•• Fit to recent dataFit to recent data Does the fitted trend matchDoes the fitted trend match

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

•• Fit to recent dataFit to recent data Does the fitted trend matchDoes the fitted trend matchthe last few data points?the last few data points?

Trend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend Forecasting

Example: Comparing TrendsExample: Comparing TrendsExample: Comparing TrendsExample: Comparing Trends•• RR22 can usually be increased by choosing a more can usually be increased by choosing a more

complex model.complex model.•• But But RR22 measures fit to the measures fit to the pastpast data. data. •• Look at forecasts (i.e., extrapolated trends) to see Look at forecasts (i.e., extrapolated trends) to see ( p )( p )

which of four fitted trends using the same data which of four fitted trends using the same data give the best fit.give the best fit.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Trend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend Forecasting

Page 10: Time Series Components - @@ Home - KKU Web Hosting · Trend Forecasting Linear Trend: Calculating R2 • R2 can be calculated as Linear Trend: Calculating R • An R2 close to close

Trend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend ForecastingTrend Forecasting

Example: Comparing TrendsExample: Comparing TrendsExample: Comparing TrendsExample: Comparing Trends•• Any trend model’s forecasts become less reliable Any trend model’s forecasts become less reliable

as they are extrapolated farther into the future.as they are extrapolated farther into the future.•• Consider the following three trend modelsConsider the following three trend models

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Assessing FitAssessing FitAssessing FitAssessing FitAssessing FitAssessing FitAssessing FitAssessing Fit

Five Measures of FitFive Measures of Fit•• “Fit” refers to how well the estimated trend model “Fit” refers to how well the estimated trend model

matches the observed historical past data. matches the observed historical past data.

Five Measures of FitFive Measures of Fit

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Assessing FitAssessing FitAssessing FitAssessing FitAssessing FitAssessing FitAssessing FitAssessing Fit

InterpretationInterpretation•• These fit statistics are most useful in comparing These fit statistics are most useful in comparing

different trend models for the same data.different trend models for the same data.

InterpretationInterpretation

•• All the statistics (especially the All the statistics (especially the MSDMSD) are affected ) are affected by unusual residuals.by unusual residuals.yy

•• The standard error (The standard error (SESE) is useful if we want to ) is useful if we want to make a prediction interval for a forecast.make a prediction interval for a forecast.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Moving AveragesMoving AveragesMoving AveragesMoving AveragesMoving AveragesMoving AveragesMoving AveragesMoving Averages

Trendless or Erratic DataTrendless or Erratic Data•• In cases where the time series In cases where the time series yy11, , yy22, …, y, …, ynn is is

erratic or has no consistent trend, there may be erratic or has no consistent trend, there may be

Trendless or Erratic DataTrendless or Erratic Data

, y, ylittle point in fitting a trend line.little point in fitting a trend line.

•• A conservative approach is to calculate either a A conservative approach is to calculate either a pppptrailing trailing oror centered moving averagecentered moving average..

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Page 11: Time Series Components - @@ Home - KKU Web Hosting · Trend Forecasting Linear Trend: Calculating R2 • R2 can be calculated as Linear Trend: Calculating R • An R2 close to close

Moving AveragesMoving AveragesMoving AveragesMoving AveragesMoving AveragesMoving AveragesMoving AveragesMoving Averages

Trailing Moving Average (TMA)Trailing Moving Average (TMA)•• The The TMATMA simply averages over the last simply averages over the last mm

periodsperiods

Trailing Moving Average (TMA)Trailing Moving Average (TMA)

periods.periods.

•• The The TMATMA smooths the past fluctuations in the smooths the past fluctuations in the time series in order to see the pattern moretime series in order to see the pattern moretime series in order to see the pattern more time series in order to see the pattern more clearly.clearly.

•• Choosing a largerChoosing a larger mm yields a “smoother”yields a “smoother” TMATMAChoosing a larger Choosing a larger mm yields a smoother yields a smoother TMATMAbut requires more data.but requires more data.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Moving AveragesMoving AveragesMoving AveragesMoving AveragesMoving AveragesMoving AveragesMoving AveragesMoving Averages

Trailing Moving Average (TMA)Trailing Moving Average (TMA)•• The value of The value of yytt may also be used as a forecast may also be used as a forecast

for periodfor period tt ++ 11

Trailing Moving Average (TMA)Trailing Moving Average (TMA)^̂

for period for period tt 11..•• There is no way to There is no way to

update the moving update the moving average beyond the average beyond the observed data range.observed data range.

•• This is aThis is a oneone periodperiod•• This is a This is a oneone--periodperiod--ahead forecast.ahead forecast.

•• For example, consider For example, consider

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

p ,p ,the following graphthe following graph

Moving AveragesMoving AveragesMoving AveragesMoving AveragesMoving AveragesMoving AveragesMoving AveragesMoving Averages

Centered Moving Average (TMA)Centered Moving Average (TMA)•• The The CMACMA smoothing method looks forward smoothing method looks forward andand

backward in time to express the currentbackward in time to express the current

Centered Moving Average (TMA)Centered Moving Average (TMA)

backward in time to express the current backward in time to express the current “forecast” as a mean of the current observation “forecast” as a mean of the current observation and and observations on either side of the current observations on either side of the current data.data.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Moving AveragesMoving AveragesMoving AveragesMoving AveragesMoving AveragesMoving AveragesMoving AveragesMoving Averages

Centered Moving Average (TMA)Centered Moving Average (TMA)•• When When nn is odd (is odd (mm = = 33, , 55, etc.), the , etc.), the CMACMA is easy is easy

to calculateto calculate

Centered Moving Average (TMA)Centered Moving Average (TMA)

to calculate.to calculate.•• When When nn is even, the mean of an even number of is even, the mean of an even number of

data points would lie between two data pointsdata points would lie between two data pointsdata points would lie between two data points data points would lie between two data points and would not be correctly centered.and would not be correctly centered.

•• In this case, we would take a double moving In this case, we would take a double moving , g, gaverage to get the resulting average to get the resulting CMACMA centered centered properly.properly.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Page 12: Time Series Components - @@ Home - KKU Web Hosting · Trend Forecasting Linear Trend: Calculating R2 • R2 can be calculated as Linear Trend: Calculating R • An R2 close to close

Exponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential Smoothing

Forecast UpdatingForecast Updating•• The The exponential smoothingexponential smoothing model is a special model is a special

kind of moving average.kind of moving average.

Forecast UpdatingForecast Updating

g gg g•• Its oneIts one--periodperiod--ahead forecasting technique is ahead forecasting technique is

utilized for data that has uputilized for data that has up--andand--down down movements but no movements but no consistentconsistent trend.trend.

•• The updating formula isThe updating formula iswherewhere

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Exponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential Smoothing

Smoothing Constant (Smoothing Constant (αα))•• The next forecast The next forecast FFtt++11 is a weighted average of is a weighted average of yytt (the (the

current data) and current data) and FFtt (the previous forecast).(the previous forecast).

Smoothing Constant (Smoothing Constant (αα))

•• The value of The value of αα (the (the smoothing constantsmoothing constant) is the weight ) is the weight given to the latest data.given to the latest data.

•• A small value of A small value of αα would give low weight to the most would give low weight to the most recent observation.recent observation.

•• A large value ofA large value of αα would give heavy weight to thewould give heavy weight to the•• A large value of A large value of αα would give heavy weight to the would give heavy weight to the previous forecast.previous forecast.

•• The larger the value of The larger the value of αα, the more quickly the , the more quickly the gg , q y, q yforecasts adapt to recent data.forecasts adapt to recent data.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Exponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential Smoothing

Choosing the Value ofChoosing the Value of αα•• If If αα = = 11, there is no smoothing at all and the forecast , there is no smoothing at all and the forecast

for the next period is the same as the latest data for the next period is the same as the latest data

Choosing the Value of Choosing the Value of αα

pppoint.point.

•• The effect of our choice of The effect of our choice of αα on the forecast on the forecast diminishes as time increases.diminishes as time increases.

•• To see this, replace To see this, replace FFtt with with FFtt--11 and repeat this type of and repeat this type of substitution indefinitely to obtainsubstitution indefinitely to obtainsubstitution indefinitely to obtainsubstitution indefinitely to obtain

•• The next forecast depends on all the prior data.The next forecast depends on all the prior data.McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Exponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential Smoothing

Initializing the ProcessInitializing the Process•• Note that Note that FFtt--11 depends on depends on FFtt, which in turn depends on , which in turn depends on

FFtt 11, and so on all the way back to , and so on all the way back to FF11..

Initializing the ProcessInitializing the Process

tt--11, y, y 11

•• Where do we get the initial forecast Where do we get the initial forecast FF11 (i.e., how do we (i.e., how do we initialize the process)?initialize the process)?

•• Method AMethod AUse the first data value. SetUse the first data value. Set

FF == yyFF11 = = yy11

•• Although simple, if Although simple, if yy11 is unusual, it could take a few is unusual, it could take a few iterations for the forecasts to stabilize.iterations for the forecasts to stabilize.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Page 13: Time Series Components - @@ Home - KKU Web Hosting · Trend Forecasting Linear Trend: Calculating R2 • R2 can be calculated as Linear Trend: Calculating R • An R2 close to close

Exponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential Smoothing

Initializing the ProcessInitializing the Process•• Method BMethod B

Average the first Average the first 6 6 data values. Setdata values. Set

Initializing the ProcessInitializing the Process

ggFF11 = = 11//nn((yy11 + + yy22 + + yy33 + + yy44 + + yy55 + + yy66))

•• This method consumes more data and is still This method consumes more data and is still vulnerable to unusual vulnerable to unusual yy--values.values.

•• Method CMethod CBackward extrapolation SetBackward extrapolation SetBackward extrapolation. SetBackward extrapolation. Set

FF11 = prediction from = prediction from backcastingbackcasting•• BackcastingBackcasting fits a trend to the data fits a trend to the data in reverse orderin reverse ordergg

and extrapolates the trend to predict the initial value.and extrapolates the trend to predict the initial value.McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Exponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential SmoothingExponential Smoothing

Smoothing with Trend and SeasonalitySmoothing with Trend and Seasonality•• Single exponential smoothing is for Single exponential smoothing is for trendlesstrendless data.data.•• For data with a trend useFor data with a trend use Holt’s methodHolt’s method withwith twotwo

Smoothing with Trend and SeasonalitySmoothing with Trend and Seasonality

For data with a trend, use For data with a trend, use Holt s methodHolt s method with with twotwosmoothing constants (one for smoothing constants (one for trendtrend and one for and one for levellevel).).

•• For data with both trend and seasonality, use For data with both trend and seasonality, use yyWinters’s methodWinters’s method with with threethree smoothing constants (for smoothing constants (for trendtrend, , levellevel, and , and seasonality.seasonality.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

SeasonalitySeasonalitySeasonalitySeasonalitySeasonalitySeasonalitySeasonalitySeasonality

When and How to DeseasonalizeWhen and How to Deseasonalize•• When the data periodicity is monthly or quarterly, When the data periodicity is monthly or quarterly,

calculate a seasonal index and use it to calculate a seasonal index and use it to

When and How to DeseasonalizeWhen and How to Deseasonalize

deseasonalizedeseasonalize it.it.•• For the multiplicative model, a seasonal index is For the multiplicative model, a seasonal index is

a a ratioratio..•• The seasonal indexes must sum to The seasonal indexes must sum to 12 12 for for

monthly data or to monthly data or to 4 4 for quarterly data.for quarterly data.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

SeasonalitySeasonalitySeasonalitySeasonalitySeasonalitySeasonalitySeasonalitySeasonality

When and How to DeseasonalizeWhen and How to DeseasonalizeStep Step 11: Calculate a centered moving average: Calculate a centered moving average

((CMACMA) for each month (quarter).) for each month (quarter).

When and How to DeseasonalizeWhen and How to Deseasonalize

Step Step 22: Divide each observed : Divide each observed yytt value by the value by the CMACMA to obtain seasonal ratios.to obtain seasonal ratios.

Step Step 33: Average the seasonal ratios by the: Average the seasonal ratios by themonth (quarter) to get raw seasonal indexes.month (quarter) to get raw seasonal indexes.

StepStep 44: Adjust the raw seasonal indexes so they sum: Adjust the raw seasonal indexes so they sumStep Step 44: Adjust the raw seasonal indexes so they sum: Adjust the raw seasonal indexes so they sumto to 12 12 (monthly) or (monthly) or 4 4 (quarterly).(quarterly).

Step Step 55: Divide each : Divide each yytt by its seasonal index to getby its seasonal index to getpp yytt y gy gdeseasonalized data.deseasonalized data.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Page 14: Time Series Components - @@ Home - KKU Web Hosting · Trend Forecasting Linear Trend: Calculating R2 • R2 can be calculated as Linear Trend: Calculating R • An R2 close to close

SeasonalitySeasonalitySeasonalitySeasonalitySeasonalitySeasonalitySeasonalitySeasonality

Seasonal Forecasts Using Binary PredictorsSeasonal Forecasts Using Binary Predictors•• Estimate a regression Estimate a regression

model using model using seasonal seasonal

Seasonal Forecasts Using Binary PredictorsSeasonal Forecasts Using Binary Predictors

binariesbinaries as predictors in as predictors in order to address order to address seasonalityseasonalityseasonality.seasonality.

•• For example, for quarterly For example, for quarterly data, the fourth quarter data, the fourth quarter binary binary QtrQtr4 4 (arbitrarily (arbitrarily chosen), would be chosen), would be excluded in order toexcluded in order toexcluded in order to excluded in order to prevent multicollinearity.prevent multicollinearity.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Forecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final Thoughts

Role of ForecastingRole of Forecasting•• Forecasting resembles planning.Forecasting resembles planning.•• ForecastingForecasting is an analytical way to describe ais an analytical way to describe a

Role of ForecastingRole of Forecasting

ForecastingForecasting is an analytical way to describe a is an analytical way to describe a “what“what--if” situation in the future.if” situation in the future.

•• PlanningPlanning is the organization’s attempt tois the organization’s attempt toPlanningPlanning is the organization s attempt to is the organization s attempt to determine a set of actions it will take under each determine a set of actions it will take under each foreseeable contingency.foreseeable contingency.

•• Forecasts tend to be selfForecasts tend to be self--defeating because they defeating because they trigger homeostatic organizational responses.trigger homeostatic organizational responses.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Forecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final Thoughts

Behavioral Aspects of ForecastingBehavioral Aspects of Forecasting•• Forecasts can facilitate organization Forecasts can facilitate organization

communication.communication.

Behavioral Aspects of ForecastingBehavioral Aspects of Forecasting

•• A quantitative forecast helps A quantitative forecast helps make assumptions make assumptions explicitexplicit..

•• Forecasts Forecasts focus the dialoguefocus the dialogue and can make it and can make it more productive.more productive.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Forecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final Thoughts

Remember That Forecasts are Always WrongRemember That Forecasts are Always Wrong•• A forecast is never precise. There is always A forecast is never precise. There is always

some error.some error.

Remember That Forecasts are Always WrongRemember That Forecasts are Always Wrong

•• Use the error measure to track forecast error.Use the error measure to track forecast error.•• The The BoxBox--Jenkins methodJenkins method uses several different uses several different

types of time series modeling techniques that fall types of time series modeling techniques that fall into a class called into a class called ARIMAARIMA (Autoregressive (Autoregressive Integrated Moving Average) modelsIntegrated Moving Average) modelsIntegrated Moving Average) models.Integrated Moving Average) models.

•• ARAR (autoregressive) models take advantage of (autoregressive) models take advantage of the dependency that might exist between valuesthe dependency that might exist between valuesthe dependency that might exist between values the dependency that might exist between values in the time series.in the time series.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Page 15: Time Series Components - @@ Home - KKU Web Hosting · Trend Forecasting Linear Trend: Calculating R2 • R2 can be calculated as Linear Trend: Calculating R • An R2 close to close

Forecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final Thoughts

To Ensure Good Forecast OutcomesTo Ensure Good Forecast Outcomes•• Maintain upMaintain up--toto--date databases of date databases of relevantrelevant data.data.•• Allow sufficient lead tome to analyze the dataAllow sufficient lead tome to analyze the data

To Ensure Good Forecast OutcomesTo Ensure Good Forecast Outcomes

Allow sufficient lead tome to analyze the data.Allow sufficient lead tome to analyze the data.•• State several alternative forecasts or scenarios.State several alternative forecasts or scenarios.•• Track forecast errors over timeTrack forecast errors over time•• Track forecast errors over time.Track forecast errors over time.•• State your assumptions and qualifications.State your assumptions and qualifications.•• Bear in mind the purpose of the forecastsBear in mind the purpose of the forecasts•• Bear in mind the purpose of the forecasts.Bear in mind the purpose of the forecasts.•• Consider the time horizon for the decision.Consider the time horizon for the decision.•• Don’t underestimate the power of a good graphDon’t underestimate the power of a good graph•• Don t underestimate the power of a good graph.Don t underestimate the power of a good graph.

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Forecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final ThoughtsForecasting: Final Thoughts

Principle of Occam’s RazorPrinciple of Occam’s RazorPrinciple of Occam s RazorPrinciple of Occam s Razor

Given two Given two sufficientsufficientexplanations we prefer theexplanations we prefer the

Given two Given two sufficientsufficientexplanations we prefer theexplanations we prefer theexplanations, we prefer the explanations, we prefer the

simpler one.simpler one.William of Occam (William of Occam (12851285--13471347))

explanations, we prefer the explanations, we prefer the simpler one.simpler one.

William of Occam (William of Occam (12851285--13471347))a o Occa (a o Occa ( 8585 33 ))a o Occa (a o Occa ( 8585 33 ))

McGraw-Hill/Irwin © 2007 The McGraw-Hill Companies, Inc. All rights reserved.

Applied Statistics in Applied Statistics in Business and Economics

End of Chapter End of Chapter 1414