3Quantitative Forecasting --Forecasting based on data and modelsCasual Models:PricePopulationAdvertising……CausalModelYear 2000SalesTime Series Models:Sales1999Sales1998Sales1997……Time SeriesModelYear 2000Sales
4Causal forecasting Regression Find a straight line that fits the data best.y = Intercept + slope * x (= b0 + b1x)Slope = change in y / change in xBest line!Intercept
5Causal Forecasting Models Curve Fitting: Simple Linear RegressionOne Independent Variable (X) is used to predict one Dependent Variable (Y): Y = a + b XGiven n observations (Xi, Yi), we can fit a line to the overall pattern of these data points. The Least Squares Method in statistics can give us the best a and b in the sense of minimizing (Yi - a - bXi)2:Regression formula is an optional learning objective
6Curve Fitting: Simple Linear Regression Find the regression line with ExcelUse Function:a = INTERCEPT(Y range; X range)b = SLOPE(Y range; X range)Use SolverUse Excel’s Tools | Data Analysis | RegressionCurve Fitting: Multiple RegressionTwo or more independent variables are used to predict the dependent variable:Y = b0 + b1X1 + b2X2 + … + bpXp
7Time Series Forecasting Process Look at the data (Scatter Plot)Forecast using one or more techniquesEvaluate the technique and pick the best one.Observations from the scatter PlotTechniques to tryWays to evaluateData is reasonably stationary(no trend or seasonality)Heuristics - Averaging methodsNaiveMoving AveragesSimple Exponential SmoothingMADMAPEStandard ErrorBIASData shows a consistent trendRegressionLinearNon-linear Regressions (not covered in this course)R-SquaredData shows both a trend and a seasonal patternClassical decompositionFind Seasonal IndexUse regression analyses to find the trend component
8Evaluation of Forecasting Model BIAS - The arithmetic mean of the errorsn is the number of forecast errorsExcel: =AVERAGE(error range)Mean Absolute Deviation - MADNo direct Excel function to calculate MAD
9Evaluation of Forecasting Model Mean Square Error - MSEExcel: =SUMSQ(error range)/COUNT(error range)Standard error is square root of MSEMean Absolute Percentage Error - MAPER2 - only for curve fitting model such as regressionIn general, the lower the error measure (BIAS, MAD, MSE) or the higher the R2, the better the forecasting model
10Stationary data forecasting NaïveI sold 10 units yesterday, so I think I will sell 10 units today.n-period moving averageFor the past n days, I sold 12 units on average. Therefore, I think I will sell 12 units today.Exponential smoothingI predicted to sell 10 units at the beginning of yesterday; At the end of yesterday, I found out I sold in fact 8 units. So, I will adjust the forecast of 10 (yesterday’s forecast) by adding adjusted error (α * error). This will compensate over (under) forecast of yesterday.
11Naïve Model The simplest time series forecasting model Idea: “what happened last time (last year, last month, yesterday) will happen again this time”Naïve Model:Algebraic: Ft = Yt-1Yt-1 : actual value in period t-1Ft : forecast for period tSpreadsheet: B3: = A2; Copy down
12Moving Average Model Simple n-Period Moving Average Issues of MA Model Naïve model is a special case of MA with n = 1Idea is to reduce random variation or smooth dataAll previous n observations are treated equally (equal weights)Suitable for relatively stable time series with no trend or seasonal pattern
13Smoothing Effect of MA Model Longer-period moving averages (larger n) react to actual changes more slowly
14Moving Average Model Weighted n-Period Moving Average Typically weights are decreasing: w1>w2>…>wnSum of the weights = wi = 1Flexible weights reflect relative importance of each previous observation in forecastingOptimal weights can be found via Solver
16Exponential Smoothing Concept is simple!Make a forecast, any forecastCompare it to the actualNext forecast isPrevious forecast plus an adjustmentAdjustment is fraction of previous forecast errorEssentiallyNot really forecast as a function of timeInstead, forecast as a function of previous actual and forecasted value
17Simple Exponential Smoothing A special type of weighted moving averageInclude all past observationsUse a unique set of weights that weight recent observations much more heavily than very old observations:weightDecreasing weights givento older observationsToday
18Simple ES: The ModelNew forecast = weighted sum of last period actual value and last period forecast : Smoothing constantFt : Forecast for period tFt-1: Last period forecastYt-1: Last period actual value
19Simple Exponential Smoothing Properties of Simple Exponential SmoothingWidely used and successful modelRequires very little dataLarger , more responsive forecast; Smaller , smoother forecast (See Table 13.2)“best” can be found by SolverSuitable for relatively stable time series
20Time Series Components Trendpersistent upward or downward pattern in a time seriesSeasonalVariation dependent on the time of yearEach year shows same patternCyclicalup & down movement repeating over long time frameEach year does not show same patternNoise or random fluctuationsfollow no specific patternshort duration and non-repeating
21Time Series Components CycleTrendRandommovementTimeTimeSeasonalpatternTrend withseasonal patternDemandTimeTime
22Trend ModelCurve fitting method used for time series data (also called time series regression model)Useful when the time series has a clear trendCan not capture seasonal patternsLinear Trend Model: Yt = a + btt is time index for each period, t = 1, 2, 3,…
23Pattern-based forecasting - Trend Regression – Recall Independent Variable X, which is now time variable – e.g., days, months, quarters, years etc.Find a straight line that fits the data best.y = Intercept + slope * x (= b0 + b1x)Slope = change in y / change in xBest line!Intercept
24Pattern-based forecasting – Seasonal Once data turn out to be seasonal, deseasonalize the data.The methods we have learned (Heuristic methods and Regression) is not suitable for data that has pronounced fluctuations.Make forecast based on the deseasonalized dataReseasonalize the forecastGood forecast should mimic reality. Therefore, it is needed to give seasonality back.
25Pattern-based forecasting – Seasonal Example (SI + Regression)Actual dataDeseasonalized dataDeseasonalizeForecastReseasonalize
26Pattern-based forecasting – Seasonal DeseasonalizationDeseasonalized data = Actual / SIReseasonalizationReseasonalized forecast= deseasonalized forecast * SI
27Seasonal Index What’s an index? Suppose Ratio SI = ratio between actual and average demandSupposeSI for quarter demand is 1.20What’s that mean?Use it to forecast demand for next fallSo, where did the 1.20 come from?!
28Calculating Seasonal Indices Quick and dirty method of calculating SIFor each year, calculate average demandDivide each demand by its yearly averageThis creates a ratio and hence a raw indexFor each quarter, there will be as many raw indices as there are yearsAverage the raw indices for each of the quartersThe result will be four values, one SI per quarter
29Classical decomposition Start by calculating seasonal indicesThen, deseasonalize the demandDivide actual demand values by their SI valuesy ’ = y / SIResults in transformed data (new time series)Seasonal effect removedForecastRegression if deseasonalized data is trendyHeuristics methods if deseasonalized data is stationaryReseasonalize with SI
30Causal or Time series?What are the difference?Which one to use?
31Can you… describe general forecasting process? compare and contrast trend, seasonality and cyclicality?describe the forecasting method when data is stationary?describe the forecasting method when data shows trend?describe the forecasting method when data shows seasonality?