© 2003 Prentice-Hall, Inc.Chap 12-1 Business Statistics: A First Course (3 rd Edition) Chapter 12 Time-Series Forecasting
© 2003 Prentice-Hall, Inc. Chap 12-2 Chapter Topics The Importance of Forecasting Component Factors of the Time-Series Model Smoothing of Annual Time Series Moving averages Exponential smoothing Least-Squares Trend Fitting and Forecasting Linear, quadratic and exponential models
© 2003 Prentice-Hall, Inc. Chap 12-3 Chapter Topics Autoregressive Models Choosing Appropriate Forecasting Models Time-Series Forecasting of Monthly or Quarterly Data Pitfalls Concerning Time-Series Forecasting (continued)
© 2003 Prentice-Hall, Inc. Chap 12-4 The Importance of Forecasting Government Needs to Forecast Unemployment, Interest Rates, Expected Revenues from Income Taxes to Formulate Policies Marketing Executives Need to Forecast Demand, Sales, Consumer Preferences in Strategic Planning
© 2003 Prentice-Hall, Inc. Chap 12-5 The Importance of Forecasting College Administrators Need to Forecast Enrollments to Plan for Facilities, for Student and Faculty Recruitment Retail Stores Need to Forecast Demand to Control Inventory Levels, Hire Employees and Provide Training (continued)
© 2003 Prentice-Hall, Inc. Chap 12-6 What is a Time Series? Numerical Data Obtained at Regular Time Intervals The Time Intervals can be Annually, Quarterly, Daily, Hourly, Etc. Example: Year: Sales:
© 2003 Prentice-Hall, Inc. Chap 12-7 Time-Series Components Time-Series Cyclical Random Trend Seasonal
© 2003 Prentice-Hall, Inc. Chap 12-8 Upward trend Trend Component Overall Upward or Downward Movement Data Taken Over a Period of Years Sales Time
© 2003 Prentice-Hall, Inc. Chap 12-9 Cyclical Component Upward or Downward Swings May Vary in Length Usually Lasts Years Sales 1 Cycle Time
© 2003 Prentice-Hall, Inc. Chap Seasonal Component Upward or Downward Swings Regular Patterns Observed Within 1 Year Sales Time (Monthly or Quarterly) Winter Spring Summer Fall
© 2003 Prentice-Hall, Inc. Chap Random or Irregular Component Erratic, Nonsystematic, Random, “Residual” Fluctuations Due to Random Variations of Nature Accidents Short Duration and Non-repeating
© 2003 Prentice-Hall, Inc. Chap E.g. Quarterly Retail Sales with Seasonal Components
© 2003 Prentice-Hall, Inc. Chap E.g. Quarterly Retail Sales with Seasonal Components Removed
© 2003 Prentice-Hall, Inc. Chap Multiplicative Time-Series Model Used Primarily for Forecasting Observed Value in Time Series is the product of Components For Annual Data: For Quarterly or Monthly Data: T i = Trend C i = Cyclical I i = Irregular S i = Seasonal
© 2003 Prentice-Hall, Inc. Chap Moving Averages Used for Smoothing Series of Arithmetic Means Over Time Result Dependent Upon Choice of L (Length of Period for Computing Means) To Smooth Out Cyclical Component, L Should be Multiple of the Estimated Average Length of the Cycle For Annual Time Series, L Should be Odd
© 2003 Prentice-Hall, Inc. Chap Moving Averages Example: 3-year Moving Average First average: Second average: (continued)
© 2003 Prentice-Hall, Inc. Chap Moving Average Example Year Units Moving Ave NA NA John is a building contractor with a record of a total of 24 single family homes constructed over a 6 year period. Provide John with a 3-year Moving Average Graph.
© 2003 Prentice-Hall, Inc. Chap Moving Average Example Solution Year Response Moving Ave NA NA Sales L = 3 No MA for the first and last (L-1)/2 years
© 2003 Prentice-Hall, Inc. Chap Moving Average Example Solution in Excel Use Excel formula “=average(cell range containing the data for the years to average)” Excel Spreadsheet for the Single Family Home Sales Example
© 2003 Prentice-Hall, Inc. Chap E.g. 5-point Moving Averages of Quarterly Retail Sales
© 2003 Prentice-Hall, Inc. Chap Exponential Smoothing Weighted Moving Average Weights decline exponentially Most recent observation weighted most Used for Smoothing and Short Term Forecasting Weights are: Subjectively chosen Ranges from 0 to 1 Close to 0 for smoothing out unwanted cyclical and irregular components Close to 1 for forecasting
© 2003 Prentice-Hall, Inc. Chap Exponential Weight: Example Year Response Smoothing Value Forecast (W =.2, (1-W)=.8) NA (.2)(5) + (.8)(2) = (.2)(2) + (.8)(2.6) = (.2)(2) + (.8)(2.48) = (.2)(7) + (.8)(2.384) = (.2)(6) + (.8)(3.307) =
© 2003 Prentice-Hall, Inc. Chap Exponential Weight: Example Graph Sales Year Data Smoothed
© 2003 Prentice-Hall, Inc. Chap Exponential Smoothing in Excel Use Tools | Data Analysis | Exponential Smoothing The damping factor is (1-W ) Excel Spreadsheet for the Single Family Home Sales Example
© 2003 Prentice-Hall, Inc. Chap Example: Exponential Smoothing of Real GNP The EXCEL Spreadsheet with the Real GDP Data and the Exponentially Smoothed Series
© 2003 Prentice-Hall, Inc. Chap Linear Trend Model Year Coded X Sales (Y) Use the method of least squares to obtain the linear trend forecasting equation
© 2003 Prentice-Hall, Inc. Chap Linear Trend Model (continued) Excel Output Projected to year 2001 Linear trend forecasting equation:
© 2003 Prentice-Hall, Inc. Chap The Quadratic Trend Model Year Coded X Sales (Y) Use the method of least squares to obtain the quadratic trend forecasting equation
© 2003 Prentice-Hall, Inc. Chap The Quadratic Trend Model (continued) Excel Output Projected to year 2001
© 2003 Prentice-Hall, Inc. Chap The Exponential Trend Model or Excel Output of Values in logs Year Coded X Sales (Y) After taking the logarithms, use the method of least squares to get the forecasting equation
© 2003 Prentice-Hall, Inc. Chap The Least-Squares Trend Models in PHStat Use PHStat | Simple Linear Regression for Linear Trend and Exponential Trend Models and PHStat | Multiple Regression for Quadratic Trend Model Excel Spreadsheet for the Single Family Home Sales Example
© 2003 Prentice-Hall, Inc. Chap Model Selection Using Differences Use a Linear Trend Model if the First Differences are More or Less Constant Use a Quadratic Trend Model if the Second Differences are More or Less Constant
© 2003 Prentice-Hall, Inc. Chap Model Selection Using Differences Use an Exponential Trend Model if the Percentage Differences are More or Less Constant (continued)
© 2003 Prentice-Hall, Inc. Chap Autoregressive Modeling Used for Forecasting Takes Advantage of Autocorrelation 1st order - correlation between consecutive values 2nd order - correlation between values 2 periods apart Autoregressive Model for p-th order: Random Error
© 2003 Prentice-Hall, Inc. Chap Autoregressive Model: Example Year Units The Office Concept Corp. has acquired a number of office units (in thousands of square feet) over the last 8 years. Develop the 2nd order Autoregressive model.
© 2003 Prentice-Hall, Inc. Chap Autoregressive Model: Example Solution Year Y i Y i-1 Y i Excel Output Develop the 2nd order table Use Excel to estimate a regression model
© 2003 Prentice-Hall, Inc. Chap Autoregressive Model Example: Forecasting Use the 2nd order model to forecast number of units for 2001:
© 2003 Prentice-Hall, Inc. Chap Autoregressive Model in PHStat PHStat | Multiple Regression Excel Spreadsheet for The Office Units Example
© 2003 Prentice-Hall, Inc. Chap Autoregressive Modeling Steps 1. Choose p : Note that df = n - 2p Form a Series of “Lag Predictor” Variables Y i-1, Y i-2, …,Y i-p 3. Use Excel to Run Regression Model Using all p Variables 4. Test Significance of A p If null hypothesis rejected, this model is selected If null hypothesis not rejected, decrease p by 1 and repeat
© 2003 Prentice-Hall, Inc. Chap Selecting A Forecasting Model Perform a Residual Analysis Look for pattern or direction Measure Sum of Square Error - SSE (residual errors) Measure Residual Error Using MAD (mean absolute deviation) Use Simplest Model Principle of parsimony
© 2003 Prentice-Hall, Inc. Chap Residual Analysis Random errors Trend not accounted for Cyclical effects not accounted for Seasonal effects not accounted for T T T T ee e e
© 2003 Prentice-Hall, Inc. Chap Measuring Errors Choose a Model that Gives the Smallest Measuring Errors Sum of Square Error (SSE) Sensitive to outliers
© 2003 Prentice-Hall, Inc. Chap Measuring Errors Mean Absolute Deviation (MAD) Not Sensitive to Extreme Observations (continued)
© 2003 Prentice-Hall, Inc. Chap Principal of Parsimony Suppose 2 or More Models Provide Good Fit to Data Select the Simplest Model Simplest model types: Least-squares linear Least-squares quadratic 1st order autoregressive More complex types: 2nd and 3rd order autoregressive Least-squares exponential
© 2003 Prentice-Hall, Inc. Chap Forecasting With Seasonal Data Use Categorical Predictor Variables with Least- Squares Trending Fitting Forecasting Equation (Exponential Model with Quarterly Data): The b i provides the multiplier for the i-th quarter relative to the 4th quarter. Q i = 1 if i-th quarter and 0 if not X j = the coded variable denoting the time period
© 2003 Prentice-Hall, Inc. Chap Forecasting With Quarterly Data: Example Quarter Standards and Poor’s Composite Stock Price Index: Excel Output Appears to be an excellent fit. r 2 is.98
© 2003 Prentice-Hall, Inc. Chap Forecasting With Quarterly Data: Example (continued) Excel Output Regression Equation for the first quarter:
© 2003 Prentice-Hall, Inc. Chap Forecasting with Quarterly Data in PHStat Use PHStat | Multiple Regression Excel Spreadsheet for The Stock Price Index Example
© 2003 Prentice-Hall, Inc. Chap Pitfalls Concerning Time-Series Forecasting Taking for Granted the Mechanism that Governs the Time Series Behavior in the Past will Still Hold in the Future Using Mechanical Extrapolation of the Trend to Forecast the Future Without Considering Personal Judgments, Business Experiences, Changing Technologies, Habits, etc.
© 2003 Prentice-Hall, Inc. Chap Chapter Summary Discussed the Importance of Forecasting Addressed Component Factors of the Time- Series Model Performed Smoothing of Data Series Moving averages Exponential smoothing Described Least-Squares Trend Fitting and Forecasting Linear, quadratic and exponential models
© 2003 Prentice-Hall, Inc. Chap Chapter Summary Addressed Autoregressive Models Described Procedure for Choosing Appropriate Models Addressed Time-Series Forecasting of Monthly or Quarterly Data (Use of Dummy Variables) Discussed Pitfalls Concerning Time-Series Forecasting (continued)