Project Planning and Management (EG853ME) Ram C. Poudel Pulchowk Campus November 1, 2009
Forecasting Horizons Long Term 5+ years into the future R&D, plant location, product planning Principally judgement-based
Medium Term 1 season to 2 years Aggregate planning, capacity planning, sales forecasts Mixture of quantitative methods and judgement
Short Term 1 day to 1 year, less than 1 season Demand forecasting, staffing levels, purchasing,
inventory levels Quantitative methods
Short Term Forecasting: Needs and Uses Scheduling existing resources NEA for Load Dispatch Center
Acquiring additional resources How much power stations needs to be
added? Determining what resources are needed Renewable Energy Nuclear Energy
Types of Forecasting Models Types of Forecasts
Qualitative --- based on experience, judgement, knowledge; Quantitative --- based on data, statistics;
Methods of Forecasting Naive Methods --- eye-balling the numbers; Formal Methods --- systematically reduce forecasting errors; time series models (e.g. exponential smoothing); causal models (e.g. regression).
Focus here on Time Series Models
Assumptions of Time Series Models There is information about the past; This information can be quantified in the form of data; The pattern of the past will continue into the future.
Methods of demand forecasting 1. 2. 3. 4. 5. 6.
Jury of expert’s opinion Delphi method: Individual experts act separately Consumer’s Survey Sales forecast composite Naïve models Smoothing techniques a. b.
7. 8. 9. 10.
Moving average Exponential smoothing
Analysis of time series and trend projections Use of economic indicators Controlled experiments Judgemental approach
Approach to forecasting 1. Identify and clearly state the objectives of forecasting. 2. Select appropriate method of forecasting. 3. Identify the variables. 4. Gather relevant data. 5. Determine the most probable relationship. 6. For forecasting the company’s share in the demand, two different assumptions may be made: (a) (b)
Ratio of company sales to the total industry sales will continue as in the past. On the basis of an analysis of likely competition and industry trends, the company may assume a market share different from that of the past. (alternative / rolling forecasts)
7. Forecasts may be made either in terms of units or sales in rupees. 8. May be made in terms of product groups and then broken for individual products. 9. May be made on annual basis and then divided month-wise, etc.
Statistical Methods Trend Analysis Curve fitting Moving Average method Weighted moving average method Exponential smoothing method (w/ Trend and
Seasonality) Time Series decomposition method
Curve Fitting
Method of Least Squares:
Principle of maxima and minima
Find the value of m and b that minimize the sum of square of
residuals.
How do we know how good the fit is? Correlation Coefficient, R2 60
50
y = 9x - 17.333 R2 = 0.9743
40
30
20
10
0 0
2
4
6
8
Simple Moving Average Forecast Ft is average of n previous observations or actuals
Dt : Note that the n past observations are equally weighted.
1 Ft +1 = ( Dt + Dt −1 + + Dt +1−n ) All n past observations treated equally; n Observations older than n are not included at all; t n past observations be retained; Requires that1 Ft +1 when = 1000's Ditems ∑ Problem of are being forecast. i n i =t +1−n
Issues with moving average forecasts:
Simple Moving Average Include n most recent observations Weight equally Ignore older observations weight 1/n
n
...
3
2
1
today
Moving Average n= 3
Exponential Smoothing I Include all past observations Weight recent observations much more
heavily than very old observations: weight Decreasing weight given to older observations
today
Exponential Smoothing: Concept Include all past observations Weight recent observations much more
heavily than very old observations:
0<α <1
weight
α α (1 − α )
Decreasing weight given to older observations
α (1 − α )
2
α (1 − α ) 3 today
Exponential Smoothing: Math 2
Ft =αDt +α(1 −α) Dt −1 +α(1 −α) Dt −2 + Ft =αDt + (1 −α)[αDt −1 +α(1 − a ) Dt −2 +]
Ft = aD t + (1 − a ) Ft −1
Exponential Smoothing: Math Ft = aD t + a (1 − a ) Dt −1 + a (1 − a ) Dt −2 + 2
Ft = aD t + (1 − a ) Ft −1 Thus, new forecast is weighted sum of old forecast and
actual demand Notes: Only 2 values (Dt and Ft-1 ) are required, compared with n for
moving average Parameter a determined empirically (whatever works best) Rule of thumb: α < 0.5 Typically, α = 0.2 or α = 0.3 work well Forecast for k periods into future is:
Ft +k = Ft
Exponential Smoothing
α
= 0.2
Complicating Factors Simple Exponential Smoothing works
well with data that is “moving sideways” (stationary) Must be adapted for data series which exhibit a definite trend Must be further adapted for data series which exhibit seasonal and cyclic patterns
Time Series Decomposition Approach Y = f(Xt) where Xt = f(Tt, St, Ct, Rt). The trend component (Tt) and Cyclic component (Ct) Seasonal Componet (St) Random component (Rt) of the series.
Attached Lecture Video from IIT,Delhi: Prof Arun Kunda
De-seasonalizing Time Series If the time series represents a seasonal
pattern of L period, then by taking moving average Mt of L periods, we could get mean value for the year Thus Mt = Tt ×Ct, Tt by regression or inspection, linear, quadratic, exponential or other function Seasonality = Xt/Mt = St × Rt Averaging over same month removes Rt. Put them together and get the forecast.
there is a way out...
Forecasting Performance How good is the forecast? Mean Forecast Error (MFE or Bias): Measures
average deviation of forecast from actuals. Mean Absolute Deviation (MAD): Measures
average absolute deviation of forecast from actuals. Mean Absolute Percentage Error (MAPE): Measures absolute error as a percentage of the forecast. Standard Squared Error (MSE): Measures variance of forecast error
Forecasting Performance Measures 1 n MFE = ∑( Dt − Ft ) n t =1 1 n MAD = ∑ Dt − Ft n t =1 100 n Dt − Ft MAPE = ∑ n t =1 Dt
1 n 2 MSE = ∑( Dt − Ft ) n t =1
Mean Forecast Error (MFE or Bias) 1 n MFE = ∑( Dt − Ft ) n t =1 Want MFE to be as close to zero as possible -- minimum bias A large positive (negative) MFE means that the forecast is
undershooting (overshooting) the actual observations Note that zero MFE does not imply that forecasts are perfect (no error) -- only that mean is “on target” Also called forecast BIAS
Mean Absolute Deviation (MAD) 1 n MAD = ∑ Dt − Ft n t =1 Measures absolute error Positive and negative errors thus do not cancel out
(as with MFE) Want MAD to be as small as possible No way to know if MAD error is large or small in relation to the actual data
Mean Absolute Percentage Error (MAPE) 100 n Dt − Ft MAPE = ∑ n t =1 Dt Same as MAD, except ... Measures deviation as a percentage of actual
data
Mean Squared Error (MSE) 1 n MSE = ∑( Dt − Ft ) 2 n t =1 Measures squared forecast error -- error variance Recognizes that large errors are disproportionately more “expensive”
than small errors But is not as easily interpreted as MAD, MAPE -- not as intuitive
Suggested Readings Lecture - 35 The Analysis of Time
Series Prof. Arun Kanda ITT/Delhi Youtube.com
Available at:
Chapter 3 : Textbook (Page 60 ~ 76).