mcgraw-hill/irwin copyright © 2009 by the mcgraw-hill companies, inc. time-series analysis...

62
McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Time-Series Analysis C h a p t e r 14 14 Time Series Components Trend Fitting Assessing Fit Moving Averages Exponential Smoothing Seasonality Index Numbers Forecasting: Final Thoughts

Upload: phillip-fletcher

Post on 11-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc.

Time-Series AnalysisTime-Series AnalysisC

hapter14141414Time Series Components

Trend FittingAssessing Fit

Moving AveragesExponential Smoothing

SeasonalityIndex Numbers

Forecasting: Final Thoughts

Page 2: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-2

Time Series ComponentsTime Series Components

• A A time series variabletime series variable ( (YY) consists of data ) consists of 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 - to monitor a process to determine if it is stablestable- to predict the future (forecasting)- to predict the future (forecasting)

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

Time Series DataTime Series Data

Page 3: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-3

Time Series ComponentsTime Series Components

• Time series data are Time series data are usually plotted as a usually plotted as a line or bar graph.line or bar graph.

• Time is on the Time is on the horizontal (horizontal (XX) axis.) axis.

• This reveals how a This reveals how a variable changes over variable changes over time.time.

• Fluctuations are Fluctuations are easier to see on a line easier to see on a line graph.graph.

Time Series DataTime Series Data

Page 4: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-4

Time Series ComponentsTime Series Components

• 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

tt is an index denoting the time period is an index denoting the time period ( (tt = 1, 2, …, = 1, 2, …, nn))

nn is the number of time periods is the number of time periods

yy11, , yy22, …, , …, yynn is the data set for analysis is the data set for analysis

• To distinguish time series data from cross-To distinguish time series data from cross-sectional data, use sectional data, use yytt instead of instead of xxii for an for an

individual observation.individual observation.

Time Series DataTime Series Data

Page 5: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-5

Time Series ComponentsTime Series Components

• Time series data may be measured Time series data may be measured at aat a point in point in timetime. .

• 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.

• Time series data may also be measured Time series data may also be measured over over an interval of timean interval of time..

• For example, For example, Gross Domestic Product Gross Domestic Product ((GDPGDP) is ) is a flow of goods and services measured over an a flow of goods and services measured over an interval of time.interval of time.

Measuring Time SeriesMeasuring Time Series

Page 6: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-6

Time Series ComponentsTime Series Components

• The The PeriodicityPeriodicity is the time interval over which is the time interval over which data are collected.data are collected.

• Data can be collected once every Data can be collected once every - decade- decade- year (e.g., 1 observation per year)- year (e.g., 1 observation per year)- quarter (e.g., 4 observations per year)- quarter (e.g., 4 observations per year)- month (e.g., 12 observations per year) - month (e.g., 12 observations per year) - week- week- day- day- hour- hour

PeriodicityPeriodicity

Page 7: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-7

Time Series ComponentsTime Series Components

• Time series Time series decompositiondecomposition seeks to seeks to separate a time series separate a time series YY into four into four components:components:

- Trend (- Trend (TT))- Cycle (- Cycle (CC))- Seasonal (- Seasonal (SS))- Irregular (- Irregular (II))

• These components are assumed to follow These components are assumed to follow either an additive or a multiplicative model.either an additive or a multiplicative model.

Additive versus Multiplicative ModelsAdditive versus Multiplicative Models

Page 8: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-8

Time Series ComponentsTime Series Components

Additive 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):

Page 9: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-9

Time Series ComponentsTime Series Components

• Here is a Here is a graphical graphical view of the 4 view of the 4 components components of a of a hypothetical hypothetical time series.time series.

A Graphical ViewA Graphical View

Figure 14.3

Page 10: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-10

Time Series ComponentsTime Series Components

• TrendTrend ( (TT) is the general ) is the general movement over all years movement over all years ((tt = 1, 2, ..., = 1, 2, ..., nn).).

• Trends may be steady Trends may be steady and predictable, and predictable, increasing, decreasing, increasing, decreasing, or staying the same. or staying the same.

• A mathematical trend A mathematical trend can be fitted to any data can be fitted to any data but may or may not be but may or may not be useful for predictions.useful for predictions.

TrendTrend

Page 11: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-11

Time Series ComponentsTime Series Components

Steady TrendSteady Trend

TrendTrend

Erratic PatternErratic Pattern

Page 12: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-12

Time Series ComponentsTime Series Components

• CycleCycle ( (CC) is a ) is a repetitive up-and-repetitive up-and-down movement down movement about a trendabout a trend that that covers several years.covers several years.

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

CycleCycle

Page 13: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-13

Time Series ComponentsTime Series Components

• SeasonalSeasonal ( (SS) is a ) is a repetitive cyclical repetitive cyclical pattern pattern within a yearwithin a year (or (or within a week, day, or within a week, day, or other time period). other time period).

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

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

SeasonalSeasonal

Page 14: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-14

Time Series ComponentsTime Series Components

• IrregularIrregular ( (II) is a ) is a random disturbance random disturbance that follows no pattern.that follows no pattern.

• It is also called the It is also called the error error component or component or random noiserandom noise reflecting all factors reflecting all factors other than trend, cycle other than trend, cycle and seasonality.and seasonality.

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

IrregularIrregular

Page 15: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-15

Trend ForecastingTrend Forecasting

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

Figure 14.6

Page 16: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-16

Trend ForecastingTrend Forecasting

• The following three trend models are The following three trend models are especially useful in business applications:especially useful in business applications:

Three Trend ModelsThree Trend Models

• All three models can be fitted by Excel, All three models can be fitted by Excel, MegaStat, or MINITAB.MegaStat, or MINITAB.

Page 17: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-17

Trend ForecastingTrend Forecasting

• The The linearlinear trend model has the form trend model has the formyytt = = aa + + btbt

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

Linear Trend ModelLinear Trend Model

Figure 14.7

Page 18: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-18

Trend ForecastingTrend Forecasting

• Linear trend is fitted by using ordinary least Linear trend is fitted by using ordinary least 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 = 1, 2, 3, …. = 1, 2, 3, ….

Linear Trend CalculationsLinear Trend Calculations

Page 19: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-19

Trend ForecastingTrend Forecasting

• 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 time period (e.g., year) by using the fitted model.time period (e.g., year) by using the fitted model.

• For example, For example,

Forecasting a Linear TrendForecasting a Linear Trend

Page 20: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-20

Trend ForecastingTrend Forecasting

• RR22 can be calculated as can be calculated asLinear Trend: Calculating RLinear Trend: Calculating R22

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

• However, more information is needed since However, more information is needed since the forecast is simply a projection of current the forecast is simply a projection of current trend assuming that nothing changes.trend assuming that nothing changes.

Page 21: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-21

Trend ForecastingTrend Forecasting

• The The exponential trendexponential trend model has the form model has the formyytt = = aeaebtbt

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

Exponential Trend ModelExponential Trend Model

Figure 14.9

Page 22: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-22

Trend ForecastingTrend Forecasting

• This model is often preferred for financial data This model is often preferred for financial data or data that covers a longer period of time.or data that covers a longer period of time.

• 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., series variables with dissimilar data units (i.e., a percent growth rate is a percent growth rate is unit-freeunit-free))

• 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 rate is small and the data set covers only a few time periods.few time periods.

When to Use the Exponential ModelWhen to Use the Exponential Model

Page 23: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-23

Trend ForecastingTrend Forecasting

• The linear model The linear model ((yytt = = aa + + btbt)) and the and the

exponential model exponential model ((yytt = = aeaebtbt)) are equally are equally

simple because they simple because they are two-parameter are two-parameter models and a log-models and a log-transformed transformed exponential model is exponential model is actually linear.actually linear.

When to Use the Exponential ModelWhen to Use the Exponential Model

Figure 14.10

Page 24: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-24

Trend ForecastingTrend Forecasting

• Calculations of the exponential trend are done Calculations of the exponential trend are done by using a transformed variable by using a transformed variable zztt = ln( = ln(yytt) to ) to

produce a linear equation so that the least produce a linear equation so that the least squares formulas can be used.squares formulas can be used.

Exponential Trend CalculationsExponential Trend Calculations

Page 25: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-25

Trend ForecastingTrend Forecasting

• Once the least squares calculations are Once the least squares calculations are completed, transform the intercept back to the completed, transform the intercept back to the original units by exponentiation to get the original units by exponentiation to get the correct intercept.correct intercept.

• For example, if For example, if bb = 1.340178 and = 1.340178 and aa = .3893732, = .3893732,

aa = e = e1.340178 1.340178 = 3.8197= 3.8197

• In the final form, the fitted trend line would beIn the final form, the fitted trend line would beyytt = = aeaebtbt = 3.8197e = 3.8197e1.3401781.340178tt

Exponential Trend CalculationsExponential Trend Calculations

Page 26: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-26

Trend ForecastingTrend Forecasting

• A forecast can be made for any future time A forecast can be made for any future time period (e.g., year) by using the fitted model.period (e.g., year) by using the fitted model.

• For example, For example,

Forecasting an Exponential TrendForecasting an Exponential Trend

Page 27: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-27

Trend ForecastingTrend Forecasting

• 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 R22

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

Page 28: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-28

Trend ForecastingTrend Forecasting

• A A quadratic trendquadratic trend model has the form model has the formyytt = = aa + + bbtt + + cctt

22

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

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

• If If cc does not differ significantly from zero, does not differ significantly from zero, then the linear model would suffice.then the linear model would suffice.

Quadratic TrendQuadratic Trend

Page 29: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-29

Trend ForecastingTrend Forecasting

• Depending Depending on the on the values of values of bb and and cc, the , the quadratic quadratic model can model can assume any assume any of four of four shapes:shapes:

Quadratic TrendQuadratic Trend

Page 30: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-30

Trend ForecastingTrend Forecasting

• Because the quadratic trend modelBecause the quadratic trend model yytt = = aa + + bbtt + + cctt

22 is a multiple regression with two is a multiple regression with two

predictors (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,

Quadratic TrendQuadratic Trend

Figure 14.14

Page 31: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-31

Trend ForecastingTrend Forecasting

• Plot the data, right-click on the data and choose a Plot the data, right-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 RR22 and the fitted equation on the graph. and the fitted equation on the graph.

Using Excel for Trend FittingUsing Excel for Trend Fitting

Page 32: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-32

Trend ForecastingTrend Forecasting

Using Excel for Trend FittingUsing Excel for Trend Fitting

Page 33: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-33

Trend ForecastingTrend Forecasting

Trend-Fitting CriteriaTrend-Fitting 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?• 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

the last few data the last few data points?points?

Page 34: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-34

Trend ForecastingTrend Forecasting

Example: Comparing TrendsExample: Comparing Trends

• RR22 can usually be increased by choosing a can usually be increased by choosing a more complex model.more complex model.

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

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

Page 35: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-35

Trend ForecastingTrend Forecasting

Figure 14.16

Page 36: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-36

Trend ForecastingTrend Forecasting

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

reliable as they are extrapolated farther into the reliable as they are extrapolated farther into the future.future.

• Consider the following three trend modelsConsider the following three trend models

Page 37: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-37

Assessing FitAssessing Fit

• ““Fit”Fit” refers to how well the estimated trend model 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

Table 14.10

Page 38: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-38

Assessing FitAssessing Fit

• These fit statistics are most useful in These fit statistics are most useful in comparing different trend models for the same comparing different trend models for the same data.data.

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

• 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.

InterpretationInterpretation

Page 39: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-39

Moving AveragesMoving Averages

• 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 erratic or has no consistent trend, there may be little point in fitting a trend line.be little point in fitting a trend line.

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

Trendless or Erratic DataTrendless or Erratic Data

Page 40: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-40

Moving AveragesMoving Averages

• TheThe TMATMA simply averages over the last simply averages over the last mm 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 more time series in order to see the pattern more clearly.clearly.

• Choosing a larger Choosing a larger mm yields a “smoother” yields a “smoother” TMATMA but requires more data.but requires more data.

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

Page 41: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

Moving AveragesMoving Averages

• The value of The value of yytt may also be used as a may also be used as a forecast forecast for period for period tt + 1. + 1.

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

• 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 a This is a one-period-one-period-ahead forecast.ahead forecast.

• For example, For example, consider the consider the following graphfollowing graph

Figure 14.19

14-41

Page 42: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-42

Moving AveragesMoving Averages

• The The CMACMA smoothing method smoothing method looks forward looks forward andand backward backward in time to express the in time to express the current “forecast” as a mean of the current current “forecast” as a mean of the current observation observation and and observations on either observations on either side of the current data. For example, side of the current data. For example, using using mm = 3 periods, the CMA is: = 3 periods, the CMA is:

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

Page 43: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-43

Moving AveragesMoving Averages

• When When nn is odd is odd ( (mm = 3, 5, etc.), the = 3, 5, etc.), the CMACMA is easy to calculate. is easy to calculate.

• When When nn is even is even, the mean of an even , the mean of an even number of data points would lie number of data points would lie between two data points and would between two data points and would not be correctly centered.not be correctly centered.

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

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

Page 44: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-44

Exponential SmoothingExponential Smoothing

• The The exponential smoothingexponential smoothing model is a model is a special kind of moving averagespecial kind of moving average..

• Its Its one-period-ahead forecastingone-period-ahead forecasting technique technique is utilized for data that has up-and-down is utilized for data that has up-and-down movements but no movements but no consistentconsistent trend. trend.

• The updating formula isThe updating formula is

wherewhere

Forecast UpdatingForecast Updating

Page 45: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-45

Exponential SmoothingExponential Smoothing

• The next forecast The next forecast FFtt+1+1 is a weighted average of is a weighted average of yytt

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

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

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

• 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 forecasts adapt to recent data.forecasts adapt to recent data.

Smoothing Constant (Smoothing Constant ())

Page 46: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-46

Exponential SmoothingExponential Smoothing

• If If = 1 = 1, , therethere is no smoothing at all and the is no smoothing at all and the forecast for the next period is the same as the forecast for the next period is the same as the latest data point.latest data 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-1-1 and repeat this and repeat this

type of substitution indefinitely to obtaintype of substitution indefinitely to obtain

• The next forecast depends on all the prior data.The next forecast depends on all the prior data.

Choosing the Value of Choosing the Value of

Page 47: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-47

Exponential SmoothingExponential Smoothing

• Note that Note that FFtt-1-1 depends on depends on FFtt, which in turn , which in turn

depends on depends on FFtt-1-1, and so on all the way back to , and so on all the way back to FF11..

• Where do we get the initial forecast Where do we get the initial forecast FF11 (i.e., how (i.e., how

do we initialize the process)?do we initialize the process)?

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

FF11 = = yy11

• Although simple, if Although simple, if yy11 is unusual, it could take a is unusual, it could take a

few iterations for the forecasts to stabilize.few iterations for the forecasts to stabilize.

Initializing the ProcessInitializing the Process

Page 48: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-48

Exponential SmoothingExponential Smoothing

• Method BMethod BAverage the first 6 data values. SetAverage the first 6 data values. Set

FF11 = 1/ = 1/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. Set

FF11 = prediction from = prediction from backcastingbackcasting

• BackcastingBackcasting fits a trend to the data fits a trend to the data in reverse orderin reverse order and extrapolates the trend to predict the initial and extrapolates the trend to predict the initial value.value.

Initializing the ProcessInitializing the Process

Page 49: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-49

Exponential SmoothingExponential Smoothing

• Single exponential smoothingSingle exponential smoothing is for is for trendlesstrendless data. data.

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

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

Smoothing with Trend and SeasonalitySmoothing with Trend and Seasonality

Page 50: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-50

SeasonalitySeasonality

• When the data periodicity is monthly or When the data periodicity is monthly or quarterly, calculate a seasonal index and quarterly, calculate a seasonal index and use it to use it to deseasonalizedeseasonalize it. it.

• For the For the multiplicativemultiplicative model, a seasonal model, a seasonal index is a index is a ratioratio..

• The seasonal indexes must sum to 12 for The seasonal indexes must sum to 12 for monthly data or to 4 for quarterly data.monthly data or to 4 for quarterly data.

When and How to DeseasonalizeWhen and How to Deseasonalize

Page 51: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-51

SeasonalitySeasonality

Step 1Step 1: Calculate a centered moving average (CMA) for each month (quarter).

Step 2Step 2: Divide each observed yt value by the MA to obtain seasonal ratios.

Step 3Step 3: Average the seasonal ratios by the month (quarter) to get raw seasonal

indexes.

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

Step 5Step 5: Divide each yt by its seasonal index to get deseasonalized data.

When and How to DeseasonalizeWhen and How to Deseasonalize

Page 52: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-52

SeasonalitySeasonality

• Estimate a regression Estimate a regression model using model using seasonal seasonal binariesbinaries as predictors in as predictors in order to address order to address seasonality.seasonality.

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

Seasonal Forecasts Using Binary PredictorsSeasonal Forecasts Using Binary Predictors

Page 53: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-53

Index NumbersIndex Numbers

• A simple way to measure changes over A simple way to measure changes over time is to convert time-series data into time is to convert time-series data into index numbersindex numbers..

• The idea is to create an index that starts at The idea is to create an index that starts at 100 in a 100 in a base periodbase period..

• Indexes are most often used for financial Indexes are most often used for financial data.data.

Page 54: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-54

Index NumbersIndex Numbers

• To convert a time series yTo convert a time series y11, y, y22, . . .y, . . .ynn into a into a

relative indexrelative index, divide each data value y, divide each data value ytt by the by the

data value ydata value yII in a base period and multiply by in a base period and multiply by

100.100.

• The relative index IThe relative index It t for period t isfor period t is

• The index in the base period is always IThe index in the base period is always It t = 100.= 100.

Relative IndexesRelative Indexes

Page 55: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-55

Index NumbersIndex Numbers

• A different calculation is required for a A different calculation is required for a weighted index weighted index such as the such as the Consumer Price Consumer Price IndexIndex..

• The basic formula for a simple weighted price The basic formula for a simple weighted price index isindex is

Where IWhere Itt = weighted index for period t = weighted index for period t

ppitit = price of good I in period t = price of good I in period t

qqtt = weight assigned to good i = weight assigned to good i

Weighted IndexesWeighted Indexes

Page 56: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-56

Index NumbersIndex Numbers

• The CPI affects nearly all Americans The CPI affects nearly all Americans because it is used to adjust things like because it is used to adjust things like retirement benefits, food stamps, school retirement benefits, food stamps, school lunch benefits, alimony, and tax brackets.lunch benefits, alimony, and tax brackets.

• Other familiar price indexes, such as the Other familiar price indexes, such as the Dow Jones Industrial Average Dow Jones Industrial Average (DJIA) have (DJIA) have their own unique methodologies.their own unique methodologies.

Importance of Index NumbersImportance of Index Numbers

Page 57: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-57

Forecasting: Final ThoughtsForecasting: Final Thoughts

• Forecasting resembles planning.Forecasting resembles planning.• ForecastingForecasting is an analytical way to describe a is an analytical way to describe a

“what-if” situation in the future.“what-if” situation in the future.• PlanningPlanning 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 self-defeating because they Forecasts tend to be self-defeating because they trigger homeostatic organizational responses.trigger homeostatic organizational responses.

Role of ForecastingRole of Forecasting

Page 58: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-58

Forecasting: Final ThoughtsForecasting: Final Thoughts

• Forecasts can facilitate organization Forecasts can facilitate organization communication.communication.

• A quantitative forecast helps A quantitative forecast helps make make assumptions explicitassumptions explicit..

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

Behavioral Aspects of ForecastingBehavioral Aspects of Forecasting

Page 59: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-59

Forecasting: Final ThoughtsForecasting: Final Thoughts

• A forecast is never precise. There is always some A forecast is never precise. There is always some error.error.

• Use the error measure to track forecast error.Use the error measure to track forecast error.• The The Box-Jenkins methodBox-Jenkins method uses several different types uses several different types

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

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

Forecasts are Always WrongForecasts are Always Wrong

Page 60: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-60

Forecasting: Final ThoughtsForecasting: Final Thoughts

• Maintain up-to-date databases of Maintain up-to-date databases of relevantrelevant data. data.

• 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 time.Track forecast errors over time.

• State your assumptions and qualifications.State your assumptions and qualifications.

• 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 graph.Don’t underestimate the power of a good graph.

To Ensure Good Forecast OutcomesTo Ensure Good Forecast Outcomes

Page 61: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

14-61

Forecasting: Final ThoughtsForecasting: Final Thoughts

Given two Given two sufficientsufficient explanations, we prefer explanations, we prefer

the simpler one.the simpler one.

-- William of Occam -- William of Occam (1285-1347)(1285-1347)

Given two Given two sufficientsufficient explanations, we prefer explanations, we prefer

the simpler one.the simpler one.

-- William of Occam -- William of Occam (1285-1347)(1285-1347)

Principle of Occam’s RazorPrinciple of Occam’s Razor

Page 62: McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. Time-Series Analysis Chapter1414 Time Series Components Trend Fitting Assessing Fit

McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc.

Applied Statistics in Applied Statistics in Business & EconomicsBusiness & Economics

End of Chapter 14End of Chapter 14

14-62