Chapter 13 Forecasting Time Series Analysis by wku19297

VIEWS: 13 PAGES: 23

									Chapter 13
Forecasting: Time Series Analysis
    What is a time series?
A time series is any series of data that
    varies over time. For example
• Monthly sales of a product
• Hourly price of stocks and shares
• Mean daily temperature
• Weekly quantity of beer sold in a pub

                                           2
Line graphs are used to
 display a time series
                                                                 Oil consumption


                                350




                                300
Consumption (000's of tonnes)




                                250




                                200




                                150




                                100
                                      1   2          3   4   1        2            3   4   1   2          3   4

                                              1993                        1994                     1995
                                                                      Year, Quarter




                                                                                                                  3
 The decomposition model
• This model assumes that the series is
  made up of
• A trend
• Seasonality
• Cyclic behaviour (usually ignored)
• Randomness

                                          4
Year   Quarter     Oil Consumption    4 Quarter Moving   Centred   Difference
                    (000's of tons)       Average        Moving    To Trend
                                                         Average
                                                         (Trend)
       1         280

       2         230
1993
       3         200

       4         270

       1         302

       2         247
1994
       3         220

       4         292

       1         320

       2         270
1995
       3         236

       4         311

                                                                                5
Isolating the trend by using
     moving averages
   Year    Quarter   Sales     4 Quarter Moving
                                   average
    1993         1       280
                 2       230
                 3       200              245.00
                 4       270              250.50
    1994         1       302              254.75
                 2       247              259.75
                 3       220              265.25
                 4       292              269.75
    1995         1       320              275.50
                 2       270              279.50
                 3       236              284.25
                 4       311



                                                   6
  Centred moving averages
• The data shown on the last slide had an
  even number of periods (quarters)
• This means that the mean of the first 4
  quarters should really have been put in
  the middle of the year.
• This doesn’t really mean anything as
  our data is for whole quarters

                                        7
Centred moving averages
       continued
 Year    Quarter   Sales     4 Quarter Moving    Centred Moving
                                 average         Average (Trend)
  1993         1       280
               2       230
               3       200              245.00             247.75
               4       270              250.50             252.63
  1994         1       302              254.75             257.25
               2       247              259.75             262.50
               3       220              265.25             267.50
               4       292              269.75             272.63
  1995         1       320              275.50             277.50
               2       270              279.50             281.88
               3       236              284.25
               4       311

                                                                   8
Add the trend to the chart
                                350




                                300
Consumption (000's of tonnes)




                                250




                                200




                                150




                                100
                                      1   2          3   4   1   2           3   4   1   2          3   4

                                              1993                   1994                    1995
                                                                 Year, Quarter




                                                                                                            9
    Isolating the seasonal
          component
There are two models
• The additive model
• The multiplicative model




                             10
       The additive model
•   The additive model assumes that a time
    series is made up of the sum of the different
    components. It is appropriate when the
    series is a constant difference from the
    trend
•   The seasonal component is found by
    subtracting the trend from the series
•   When the series is above the trend the
    difference is positive
•   When below the trend it is negative

                                                11
Year    Quarter   Sales     4 Quarter Moving    Centred Moving     difference
                                average         Average (Trend)     to Trend
 1993         1       280
              2       230
              3       200              245.00             247.75         -47.8
              4       270              250.50             252.63          17.4
 1994         1       302              254.75             257.25          44.8
              2       247              259.75             262.50         -15.5
              3       220              265.25             267.50         -47.5
              4       292              269.75             272.63          19.4
 1995         1       320              275.50             277.50          42.5
              2       270              279.50             281.88         -11.9
              3       236              284.25
              4       311




                                                                           12
• The seasonal difference varies from
  quarter to quarter but also from year to
  year
• We need to average out the different
  values so that we have a single value
  for each quarter
• These averages differences should sum
  to zero
                                         13
Quarter    1          2           3           4
    1993                              -47.8       17.4
    1994       44.8       -15.5       -47.5       19.4
    1995       42.5       -11.9                          Sum
Average        43.6       -13.7       -47.6       18.4              0.7
Adjusted       43.5       -13.9       -47.8       18.2              0.0




                                                               14
            Forecasting
• To forecast we extrapolate the trend
  and then read the forecast from the
  chart
• We must then add on the seasonal
  difference



                                         15
                             350




                             300
Consumption (000's tonnes)




                             250




                             200




                             150




                             100
                                   1   2          3   4   1   2          3         4        1        2          3   4   1   2          3   4

                                           1993                   1994                                   1995                   1996
                                                                                  Year, Quarter

                                                                    Consumption        Trend      Linear (Trend)




                                                                                                                                               16
      Adding the seasonal
          component
               Forecasts for 1996
Quarter       Forecasted Seasonal Forecast
              Trend        difference
          1           297        43.5  340
          2           302       -13.9  288
          3           307       -47.8  259
          4           312        18.2  330

                                         17
   The multiplicative model
• The multiplicative model is applicable when
  the seasonal swings are a constant
  proportion of the trend.
• The seasonal factors are found by dividing
  the series by the trend to give the ratio to the
  trend
• When the series is above the trend the factor
  will be above 1 (or 100%)
• When below the factor will be less than 1 (or
  100%)
• The sum of the factors will be the number of
  periods of the data – for quarters it should be
  4 (or 400%)                                      18
Year    Quarter       Sales     4 Quarter Moving    Centred Moving      Ratio
                                    average         Average (Trend)    to trend
 1993             1       280
                  2       230
                  3       200              245.00             247.75      0.807
                  4       270              250.50             252.63      1.069
 1994             1       302              254.75             257.25      1.174
                  2       247              259.75             262.50      0.941
                  3       220              265.25             267.50      0.822
                  4       292              269.75             272.63      1.071
 1995             1       320              275.50             277.50      1.153
                  2       270              279.50             281.88      0.958
                  3       236              284.25
                  4       311




                                                                                  19
      Average seasonal factors

Quarter    1       2       3           4
    1993                       0.807       1.069
    1994   1.174   0.941       0.822       1.071
    1995   1.153   0.958                           Sum
Average    1.164   0.949       0.815       1.070         3.998
Adjusted   1.164   0.950       0.815       1.071         4.000




                                                         20
  How do we decide which
      model to use?
• By looking at the time series chart. (Are
  the seasonal swings constant or do they
  increase or decrease with the trend?).
• By calculating the mean square error
  (MSE).
• This statistic measures the error in the
  prediction. We want the model that
  gives us the smallest MSE.

                                          21
                                                Errors
Year    Quarter       Sales       Prediction       Additive     Squared    Prediction      Multiplicative Squared
                                using additive       error       error     using multi         error       error
                                   CMA + S     Sales-Prediction             CMA x S       Sales-Prediction
 1993             1       280
                  2       230
                  3       200           200.0              0.1      0.00          202.0              -2.0        4.0
                  4       270           270.8             -0.8      0.68          270.4              -0.4        0.2
 1994             1       302           300.8              1.3      1.56          299.5               2.5        6.3
                  2       247           248.6             -1.6      2.56          249.4              -2.4        5.6
                  3       220           219.7              0.3      0.09          218.1               1.9        3.6
                  4       292           290.8              1.2      1.38          291.9               0.1        0.0
 1995             1       320           321.0             -1.0      1.00          323.1              -3.1        9.4
                  2       270           268.0              2.0      4.10          267.8               2.2        5.0
                  3       236
                  4       311
                                                        MSE= 1.42                                  MSE= 4.3




                                                                                                            22
             Conclusion
• The MSE for the additive model was
  1.42 and for the multiplicative model it
  was 4.3
• The additive model is therefore the best
  model for this time series
• When we forecast using the
  multiplicative model we must remember
  to multiply the forecast trend by the
  seasonal factors                         23

								
To top