Business Analysis- Time-Series Models -Measuring Forecast Error

download Business Analysis- Time-Series Models -Measuring Forecast Error

of 36

Transcript of Business Analysis- Time-Series Models -Measuring Forecast Error

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    1/36

    Slides 13b:Time-Series Models;

    Measuring Forecast Error

    MGS3100 Chapter 13Forecasting

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    2/36

    Forecasting ModelsForecastingTechniques

    QualitativeModels

    Time SeriesMethods

    CausalMethods

    Delphi

    Method

    Jury ofExecutiveOpinion

    Sales ForceComposite

    Consumer MarketSurvey

    Naive

    MovingAverage

    WeightedMoving Average

    ExponentialSmoothing

    Trend Analysis

    SeasonalityAnalysisSimple

    RegressionAnalysis

    MultipleRegressionAnalysis

    MultiplicativeDecomposition

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    3/36

    Time Series Models General Form: Y = T * C * S , where

    T = Trend - long term movement of mean C = (Business) Cycle - an upturn or downturn not

    caused by seasonal variation; effect of theeconomy S = Seasonal Variation - repetitive pattern

    observed over a specific time period = Error (random variation)

    Practical Forecast Form: = T * S C is important, but difficult to forecast

    Dont forecast an error!

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    4/36

    A stationary time series

    Linear trend time series

    Linear trend and seasonality time series

    Time

    Time

    series

    value

    Future

    Components of a Time Series

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    5/36

    Time Series: Stationary Models Stationary Model Assumptions

    Assumes item forecasted will stay steady over time (constantmean; random variation only)

    Techniques will smooth out short-term irregularities Forecast for period t+1 is equal to forecast for period t+k; the

    forecast is revised only when new data becomes available.

    Stationary Model Types Nave Forecast Moving Average Weighted Moving Average Exponential Smoothing

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    6/36

    Stationary Time Series Models:

    The Nave Model Whatever happened

    last period willhappen again this

    time The model is simple

    and flexible Provides a baseline

    to measure othermodels

    Attempts to captureseasonal factors atthe expense of

    ignoring trend

    dataMonthly:

    dataQuarterly:

    12

    4

    !

    !

    tt

    tt

    YF

    YF

    1! tt YFor

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    7/36

    Measures of Forecast Error

    Bias - The arithmetic sum of theerrors

    MAD - Mean Absolute Deviation MAPE Mean Absolute Percentage

    Error

    Mean Square Error (MSE) - Similarto simple sample variance

    Standard Error - Standard deviation ofthe sampling distribution (the squareroot of the MSE)

    Bias, MAD, and MAPE - typically

    used for time series

    )(tt

    FYErrorForecast !

    TFYMADtt

    T

    t

    /||/T|errorforecast|1

    T

    1t

    !! ! !

    TYFYMAPEttt

    T

    t

    /]/|[|1001

    ! !

    TFY

    Bias

    tt

    T

    t

    /)(

    /Terror)(forecast

    1

    T

    1t

    !

    !

    !

    !

    TFY

    MSE

    tt

    T

    t

    /)(

    /T|errorforecast|

    2

    1

    T

    1t

    2

    !

    !

    !

    !

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    8/36

    Nave ForecastWallace Garden SupplyForecasting

    Period

    Actual

    Value

    Nave

    Forecast Err or

    Absolute

    Error

    Percent

    Error

    Squared

    Error

    January 10 N/A

    February 12 10 2 2 16.67% 4.0

    March 16 12 4 4 25.00% 16.0

    April 13 16 -3 3 23.08% 9.0

    May 17 13 4 4 23.53% 16.0

    June 19 17 2 2 10.53% 4.0

    July 15 19 -4 4 26.67% 16.0

    August 20 15 5 5 25.00% 25.0

    September 22 20 2 2 9.09% 4.0

    October 19 22 -3 3 15.79% 9.0November 21 19 2 2 9.52% 4.0

    December 19 21 -2 2 10.53% 4.0

    0.818 3 17.76% 10.091

    BIAS MAD MAPE MSE

    Standard Error (Square Root of MSE) = 3.176619

    Storage Shed Sales

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    9/36

    Nave Forecast GraphWallace Garden - Naive Fore cast

    0

    5

    10

    15

    20

    25

    February March April May June July August September October November December

    Period

    S

    h

    ed

    s Actual Value

    Nave Forecast

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    10/36

    The Moving Average Method

    The forecast is the average of the last nobservations of the time series.

    n

    YYYF

    ntttt

    111

    ...

    !

    Stationary Time Series Models:

    Moving Averages

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    11/36

    Moving AveragesWallace Garden SupplyForecasting

    Period ActualValue Three-Month Moving AveragesJanuary 10February 12March 16April 13 10 + 12 + 16 / 3 = 12.67May 17 12 + 16 + 13 / 3 = 13.67June 19 16 + 13 + 17 / 3 = 15.33July 15 13 + 17 + 19 / 3 = 16.33August 20 17 + 19 + 15 / 3 = 17.00September 22 19 + 15 + 20 / 3 = 18.00October 19 15 + 20 + 22 / 3 = 19.00November 21 20 + 22 + 19 / 3 = 20.33December 19 22 + 19 + 21 / 3 = 20.67

    Storage Shed Sales

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    12/36

    Moving Averages ForecastWallace Garden SupplyForecasting 3 period moving average

    Input Data Forecast ErrorAnalysis

    Period Actual Value Forecast Err or

    Absolute

    error

    Squared

    error

    Absolute

    % errorMonth 1 10

    Month 2 12

    Month 3 16

    Month 4 13 12.667 0.333 0.333 0.111 2.56%

    Month 5 17 13.667 3.333 3.333 11.111 19.61%

    Month 6 19 15.333 3.667 3.667 13.444 19.30%

    Month 7 15 16.333 -1.333 1.333 1.778 8.89%

    Month 8 20 17.000 3.000 3.000 9.000 15.00%

    Month 9 22 18.000 4.000 4.000 16.000 18.18%

    Month 10 19 19.000 0.000 0.000 0.000 0.00%

    Month 11 21 20.333 0.667 0.667 0.444 3.17%

    Month 12 19 20.667 -1.667 1.667 2.778 8.77%

    Average 1.333 2.000 6.074 10.61%

    Next period 19.667 BIAS MAD MSE MAPE

    Actual Value - Forecast

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    13/36

    Moving Averages GraphThree Period Moving Average

    0

    5

    10

    15

    20

    25

    1 2 3 4 5 6 7 8 9 10 11 12

    Time

    Valu

    e Actual Value

    Forecast

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    14/36

    Stability vs. Responsiveness

    Should I use a 2-period moving average or a3-period moving average?

    The larger the n the more stable the forecast.A 2-period model will be more responsive tochange.

    We dont want to chase outliers.

    But we dont want to take forever to correct fora real change.

    We must balance stability with responsiveness.

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    15/36

    The Weighted Moving Average MethodHistorical values of the time series are assigneddifferent weights when performing the forecast

    Stationary Time Series Models:Weighted Moving Averages

    1tF

    = w1Yt + w2Yt-1 +w3Yt-2 + + wnYt-n+17wi = 1

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    16/36

    Weighted Moving AverageWallace Garden SupplyForecasting

    Period

    Actual

    Value Weights Three-Month Weighted Moving Averages

    January 10 0.222

    February 12 0.593March 16 0.185

    April 13 2.2+ 7.1 + 3 / 1 = 12.298

    May 17 2.7 + 9.5 + 2.4 / 1 = 14.556

    June 19 3.5 + 7.7 + 3.2 / 1 = 14.407

    July 15 2.9 + 10 + 3.5 / 1 = 16.484

    August 20 3.8+ 11 + 2.8 / 1 = 17.814

    September 22 4.2 + 8.9 + 3.7 / 1 = 16.815

    October 19 3.3 + 12 + 4.1 / 1 = 19.262November 21 4.4 + 13 + 3.5 / 1 = 21.000

    December 19 4.9 + 11 + 3.9 / 1 = 20.036

    Next period 20.185

    Sum of weights = 1.000

    Storage Shed Sales

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    17/36

    Weighted Moving AverageWallace Garden Supply Forecasting 3 period weighted moving averageInput Data Forecast ErrorAnalysis

    Period Actual value Weights Forecast Err or

    Absolute

    error

    Squared

    error

    Absolute

    % error

    Month 1 10 0.222Month 2 12 0.593

    Month 3 16 0.185

    Month 4 13 12.298 0.702 0.702 0.492 5.40%

    Month 5 17 14.556 2.444 2.444 5.971 14.37%

    Month 6 19 14.407 4.593 4.593 21.093 24.17%

    Month 7 15 16.484 -1.484 1.484 2.202 9.89%

    Month 8 20 17.814 2.186 2.186 4.776 10.93%

    Month 9 22 16.815 5.185 5.185 26.889 23.57%Month 10 19 19.262 -0.262 0.262 0.069 1.38%

    Month 11 21 21.000 0.000 0.000 0.000 0.00%

    Month 12 19 20.036 -1.036 1.036 1.074 5.45%

    Average 1.988 6.952 6.952 10.57%

    Next period 20.185 BIAS MAD MSE MAPE

    Sum of weights = 1.000

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    18/36

    Stationary Time Series Models:

    Exponential SmoothingExponential Smoothing

    Moving average technique that requires a minimumamount of past data

    Uses a smoothing constant with a value between 0 and 1(Usual range 0.1 to 0.3)

    Forecast for period t = Forecast for period t-1 plus timesthe difference between the actual value and forecast in

    period t-1: t = t-1 + (Yt-1 - t-1), or Can also be expressed as: t = (Yt-1) + (1- )(t-1) =

    (Actual value in period t-1) + (1- )(Forecast in period t-1)

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    19/36

    Exponential Smoothing Data

    PeriodActual

    Value(Yt) t-1 Yt-1 t-1 t

    January 10 = 10 0.1February 12 10 + 0.1 *( 10 - 10 ) = 10.000March 16 10 + 0.1 *( 12 - 10 ) = 10.200

    April 13 10.2 + 0.1 *( 16 - 10.2 ) = 10.780May 17 10.78 + 0.1 *( 13 - 10.78 ) = 11.002June 19 11.002 + 0.1 *( 17 - 11.002 ) = 11.602July 15 11.602 + 0.1 *( 19 - 11.602 ) = 12.342

    August 20 12.342 + 0.1 *( 15 - 12.342 ) = 12.607September 22 12.607 + 0.1 *( 20 - 12.607 ) = 13.347October 19 13.347 + 0.1 *( 22 - 13.347 ) = 14.212November 21 14.212 + 0.1 *( 19 - 14.212 ) = 14.691December 19 14.691 + 0.1 *( 21 - 14.691 ) = 15.322

    Storage Shed Sales

    Class Exercise: What is the forecast for January of the following year?How about March? Find the Bias, Mad & MAPE. (Note: equals 0.1.)

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    20/36

    Exponential Smoothing(Alpha = .419)

    Wallace Garden SupplyForecasting Exponential smoothing

    Input Data Forecast ErrorAnalysis

    Period Actual value Forecast Err or

    Absolute

    error

    Squared

    error

    Absolute

    % error

    Month 1 10 10.000Month 2 12 10.000 2.000 2.000 4.000 16.67%

    Month 3 16 10.838 5.162 5.162 26.649 32.26%

    Month 4 13 13.000 0.000 0.000 0.000 0.00%

    Month 5 17 13.000 4.000 4.000 16.000 23.53%

    Month 6 19 14.675 4.325 4.325 18.702 22.76%

    Month 7 15 16.487 -1.487 1.487 2.211 9.91%

    Month 8 20 15.864 4.136 4.136 17.106 20.68%

    Month 9 22 17.596 4.404 4.404 19.391 20.02%

    Month 10 19 19.441 -0.441 0.441 0.194 2.32%

    Month 11 21 19.256 1.744 1.744 3.041 8.30%

    Month 12 19 19.987 -0.987 0.987 0.973 5.19%

    Average 2.608 9.842 14.70%

    Alpha 0.419 MAD MSE MAPE

    Next period 19.573

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    21/36

    Exponential SmoothingExponential Smoothing

    0

    5

    10

    15

    20

    25

    Janu

    ary

    February Ma

    rch April May June JulyAu

    gust

    Sept

    ember

    October

    Nove

    mber

    December

    Sheds Actual value

    Forecast

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    22/36

    Evaluating the Performanceof Forecasting Techniques

    Several forecasting methods have been

    presented.

    Which one of these forecasting methods

    gives the best forecast?

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    23/36

    Time 1 2 3 4 5 6Time series: 100 110 90 80 105 115

    3-Period Moving average: 100 93.33 91.6

    Error for the 3-Period MA: - 20 11.67 23.43-Period Weighted MA(.5, .3, .2) 98 89 85.5

    Error for the 3-Period WMA - 18 16 29.5

    Performance Measures

    Sample Example Find the forecasts and the errors for each forecasting

    technique applied to the following stationary time series.

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    24/36

    MAD forthe moving averagetechnique:

    MAD forthe weighted moving averagetechnique:

    = 21.17

    = 18.35|-20| + |11.67| + |23.4|

    3MAD = =

    7 `(t|n

    |-18| + |116| + |29.5|

    3MAD = =

    7 `(t|n

    Performance Measures

    MAD for the Sample Example

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    25/36

    MAPE forthe moving averagetechnique:

    MAPE forthe weighted moving averagetechnique:

    = .211

    = .188|-20|/80 + |11.67|/105+ |23.4|/115

    3MAPE= =

    7 `(t|n

    |-18|/80 + |16|/105 + |29.5|/115

    3MAPE= =

    7 `(t|n

    Performance Measures

    MAPE for the Sample Example

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    26/36

    Use the performance measures to select a good setof values for each model parameter.

    For the moving average: the number of periods (n).For the weighted moving average:

    The number of periods (n), The weights (wi).

    For the exponential smoothing: The exponential smoothing factor (E).

    Excel Solver can be used to determine the valuesof the model parameters.

    Performance Measures

    Selecting Model Parameters

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    27/36

    Trend & Seasonality

    Trend analysisTechnique that fits a trend equation (or curve) to aseries of historical data pointsProjects the equation into the future for medium andlong term forecasts. Typically do not want to forecast

    into the future more than half the number of timeperiods used to generate the forecast

    Seasonality analysisAdjustment to time series data due to variations at

    certain periods.Adjust with seasonal index - ratio of average value ofthe item in a season to the overall annual average value.Examples: demand for coal in winter months; demandfor soft drinks in the summer and over major holidays

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    28/36

    Linear Trend Analysis

    Midwestern Manufacturing Sales

    ScatterDiagram

    Actual

    value (or)Y

    Period

    number(or) X

    74 1995

    79 1996

    80 1997

    90 1998

    105 1999

    142 2000

    122 2001

    Sales(in units) vs. Time

    0

    20

    40

    60

    80

    100

    120

    140

    160

    1994 1995 1996 1997 1998 1999 2000 2001 2002

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    29/36

    Least Squares forLinear Regression

    Midwestern ManufacturingLeast Squares Method

    Time

    Valueso

    fDependentVariab

    les

    Objective: Minimizethe squared deviations!

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    30/36

    Least Squares Method

    bXaY

    ^

    !

    Where

    Y^

    = predicted value of the dependent variable (demand)

    a = Y-axis intercept = - b*

    b = Slope of the regression line =]Xn-XY[__

    Y

    -

    _22 Xn-X

    X = value of the independent variable (time)

    XY

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    31/36

    Linear Trend Data & Error Analysis

    Midwestern Manufacturing CompanyForecasting Linear trend analysis

    Input Data Forecast ErrorAnalysis

    Period

    Actual value

    (or) Y

    Period number

    (or) X Forecast Err or

    Absolute

    error

    Squared

    error

    Absolute

    % error

    Year 1 74 1 67.250 6.750 6.750 45.563 9.12%

    Year 2 79 2 77.786 1.214 1.214 1.474 1.54%

    Year 3 80 3 88.321 -8.321 8.321 69.246 10.40%

    Year 4 90 4 98.857 -8.857 8.857 78.449 9.84%

    Year 5 105 5 109.393 -4.393 4.393 19.297 4.18%

    Year 6 142 6 119.929 22.071 22.071 487.148 15.54%

    Year 7 122 7 130.464 -8.464 8.464 71.644 6.94%Average 8.582 110.403 8.22%

    Intercept 56.714 MAD MSE MAPE

    Slope 10.536

    Next period 141.000 8

    Enter the actual values in cells shaded YELLOW. Enter new time period at the bottom toforecast

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    32/36

    Least Squares GraphTrend Analysis

    y = 10.536x + 56.714

    0

    20

    40

    60

    80

    100

    120

    140

    160

    1 2 3 4 5 6 7

    Time

    Value

    Actual values Linear (Actual values)

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    33/36

    Run linear regression to testF1 in the modelYt=F0+F1t+It

    Excel results:Coeff. Stand. Err t-Stat P-value Lower 95 Upper 95Intercept 369.27 27.79436 13.2857 5E-18 313.44 425.094

    Weeks 0.3339 0.912641 0.36586 0.71601 -1.49919 2.166990.71601

    This large P-value indicates

    that there is little evidence that trend exists

    Conclusion: A stationary model is appropriate.

    Another way to Determine Trend:

    Use the Excel Regression Function

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    34/36

    Forecasting Seasonal Data: Quick Method

    Eichler Supplies

    Year Month Demand

    Average

    Demand Ratio

    Seasonal

    Index

    1 January 80 94 0.851 0.957

    February 75 94 0.798 0.851

    March 80 94 0.851 0.904

    April 90 94 0.957 1.064

    May 115 94 1.223 1.309

    June 110 94 1.170 1.223

    July 100 94 1.064 1.117 August 90 94 0.957 1.064

    September 85 94 0.904 0.957

    October 75 94 0.798 0.851

    November 75 94 0.798 0.851

    December 80 94 0.851 0.851

    2 January 100 94 1.064 0.957

    February 85 94 0.904 0.851

    March 90 94 0.957 0.904

    April 110 94 1.170 1.064May 131 94 1.394 1.309

    June 120 94 1.277 1.223

    July 110 94 1.170 1.117

    August 110 94 1.170 1.064

    September 95 94 1.011 0.957

    October 85 94 0.904 0.851

    November 85 94 0.904 0.851

    December 80 94 0.851 0.851

    Seasonal Index ratioof theaverage value of the item in aseason to the overall averageannual value.

    Example: average ofyear 1January ratio to year 2 Januaryratio.(0.851 + 1.064)/2 = 0.957

    Ratio = Demand / Average Demand

    IfYear 3 average monthly demand isexpected to be 100 units.Forecast demand Year 3 January:

    100 X 0.957 = 96 unitsForecast demand Year 3 May:

    100 X 1.309 = 131 units

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    35/36

    Forecasting Seasonal Data With Trend

    1. Calculate the seasonal indices (as shown on theprevious slide)

    2. Calculate deseasonalized treand by dividingthe actual value (Y) by the seasonal index forthat period:Deseasonalized Trend = Y / Seasonal index

    (e.g., 80 units/ 0.957 = 83.595)

    3. Find the trend line, and extend the trend line intothe desired forecast period.

  • 8/3/2019 Business Analysis- Time-Series Models -Measuring Forecast Error

    36/36

    Forecasting Seasonal Data With Trend:

    Calculating the Seasonal Forecast4. Now that we have the Seasonal Indices and Trend

    line, we can reseasonalize the data and generatethe seasonalized forecast by multiplying thetrend line values in the forecast period by theappropriate seasonal indices for each time period

    as follows: = Trend x Seasonal Index