Time Series and Forecasting

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 92

THE INSTITUTE OF FINANCE MANAGEMENT (IFM)

Department of Mathematics

Business Statistics 1

MTU 07203
Time series and Forecasting processes in
Business
Content
• Define time series and forecasting
• Explain time series cycle
• Analyze the time series
• The techniques for extracting the trend and seasonal variations
• Deseasonalization of time series
• Solve and measure the forecasting error
• Forecasting using different methods
1. Trend projection method
2. Classical decomposition method
3. Smoothing techniques
• Explain the criteria for choosing an appropriate forecasting
method
Definition
• A time series is any arrangement of a
statistical data in accordance to their time of
their occurrence.
• A time series is a name given to numerical
data that is described over a uniform set of
time period.
• Hence, time series is a chronological
arrangement of statistical data
Examples of time series
Time series occurs naturally in a
sphere of business activities, example
a. Annual production of tea in Tanzania
over the ten years
b. Annual turnover of a firm for ten
successive years
c. The import of a country over a
period of 5 years
Importance of time series
i. It helps in the understanding of the past behaviour.
An essential aspect of managing any organization is
to use past and present available data to plan for the
future
ii. It is usually applicable in forecasting or predicting
the behaviour of a phenomenon in future.
iii. Organizations usually employ forecasting techniques
to determine future inventory, costs, capacities,
interest rate changes, etc
Time series cycle
Cycles are general patterns that repeat and occur
in most types of time series.
Examples:
a. Monthly sales for a business will exhibits
some natural 12 – monthly cycle
b. Governmental report for each quarter for a
year will exhibits 4 – quarter cycle
Graphing time series
• Standard graphs for a time series is a line diagram
known as Historigram
• Time Series Data is usually plotted on a graph to
determine various characteristics or components of
the time series data.
• There are 4 Major Components or factor affecting
time series
a. Trend
b. Cyclical variation
c. Seasonal variation, and
d. Irregular variation
Trend

• Trend is the long term tendency of the time


series data
• Trend is usually the result of long-term factors
that shows
a. Upward tendency such as changes in the
population, demographics, technology, consumer
preferences
b. Downward tendency such as deaths, epidemic
c. Or horizontal etc.
Trend component
30

25
Trend
20
Sales

15

10

0
Seasonal Variation
• These are short term cyclic fluctuations in a
time series data
• The seasonal component of the series accounts for
regular patterns of variability within certain time
periods, such as over a year.
• Data exhibit upward and downward swings over a
very long time frame, such as annual sales of a
product.
• There can be, for example, within-week or
within-day “seasonal” behavior.
Seasonal Variation
.
Cyclical component
• This is a periodic movement of time series
data, with the period more than one year.
• Cyclical component is fairly regular pattern of
sequences of values above and below the trend
line
• Usually, this component is due to multiyear
cyclical fluctuation movements exists in
business and economic time series.
• Business cycle contain four phases namely
prosperity, decline, depression and recovery
Cyclical Component
.
Irregular component
• The irregular component of the series is caused by
short-term, unanticipated and non-recurring factors
that affect the values of the time series.
• One cannot attempt to predict its impact on the time
series in advance.
• In other words we can say this is due to erratic and
unpredictable variations in the data over time with
no discernable pattern
Irregular or random component
Example 1

A retail local shop sales varieties of clothes, has


recorded the quarterly sales volume (in million Tsh)
from July 2012.
Quarterly Period 2012 2013 2014 2015
Q1 (Jan - March) 45 58 47 55
Q2 (Apr - Jun) 42 35 45 40
Q3 (Jul - Sept) 35 40 48 50
Q4 (Oct - Dec) 85 93 70 97

Present the data using a line graph and determine the


pattern and trend
Time series
120

100

80
sales

60

40

20

0
Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4
Quarter
Interpreting the Time Series Graph

• With respect to Example 1, the line graph


clearly depicts a regular pattern over time;
sales peak up in the 4th quarter and are down in
the 2nd quarter of each year. There is also a
moderate but rising trend in the series
Example 2
• The table below shows the number of life insurance
claims received by insurance company in period from
2010 to 2013

Year 2010 2011 2012 2013


Period P1 P2 P3 P1 P2 P3 P1 P2 P3 P1 P2 P3
Claims 7 3 5 9 7 9 12 4 10 13 9 10
Draw a line graph and determine the pattern and trend
Time Series Analysis
• Time series analysis is the evaluation and extraction
of the components of a model that break down a
particular series into understandable and explainable
portions and enables
i. Trends to be identified
ii. Extraneous factors to be eliminated
iii. Forecasts to be made
• The aim of time series analysis is to isolate the
effects of each of the four components on the
actual time series and minimize the error.
Time Series Analysis
• Before analysing of time series data there is a need of
taking a stand on the way components of the time
series relate to actual values
• There two models (approaches) that are used to relate
the component of a time series namely
i. The multiplicative model and
ii. additive model
Multiplicative model
• Multiplicative model of a time series assumes that
components of a time series data are related in a
multiplicative fashion. The model is given by
A=Tx C x S x E
where A = Actual value of a time series data
C = Cyclical component
S = seasonal component
E = Error or irregular component
• In analysis involves seasonal data the cylical
component is assumed to be negligible or nil. Then
the model become
A=TxS x E
Additive model
• Any additive model assumes that components of a
time series data may be mathematically modelled.
• The model is given by
A = T + C +S + E
where A = Actual value of a time series data
C = Cyclical component
S = seasonal component
E = Error or irregular component
• In analysis involves seasonal data the cyclical
component is assumed to be negligible or nil. Then
the model become
A = T +S+ E
Time series trend
• The objective of finding the time series trend is to
enable the underlying tendency of the data to be
highlighted.
• There three techniques that can be used to
extract the trend from the set of time series
values, namely;
a. Semi averages
b. Least squares regression
c. Moving averages
The method of Semi Averages
• The method involving the calculation of the (x, y)
averages which, when plotted on the charts as the
separate points are joined up from a straight line
• Procedure
1st .Split the data into a lower and an upper group
2nd .Find the mean value of each group
3rd .Plot on the graph each mean against an
appropriate time point
4th .Joining the two points by line the line joining the
two points is the required trend
Example 1
• The table below indicate the revenue collection at
Temeke Municipal in three years as displayed

years 2013 2014 2015


Quaters 1 2 3 4 1 2 3 4 1 2 3 4
Collectio
n in
Billions 22 50 79 32 29 52 82 38 32 58 91 41

Calculate the time series trend using the semi average


Solution
• 1  st.Splitingthe data into group
Lower group (X) 22, 50, 79, 32, 29, 52
Upper group (Y) 82, 38, 32, 58, 91, 41

2nd.Mean value of each group


= 44
= 57
3rd .Trend graph

Collections Trend
60
50
40
30
20
10
0
0 2 4 6 8 10 12 14
Quarter

The time series data display upward trend.


The Method of Least Squares Regression
• In order to use this method to obtain a trend line for the time
series, its necessary to consider the time series data as bivariate.
• Procedure is given as follows
1. Take the physical time points values (coded as 1, 2, 3, etc.)
of the independent variable x.
2. Take the data value themselves as values of the dependent
variable y
3. Calculate the least squares regression line of y on x, y
= a +bx
4. Translate the regression line as t = a + bx , where any given
value of time point x will yield a corresponding value of the
trend, t
Example: Refer example1
••Determine
  the time series trend using least square
x y xy Trend, t = 39.4+ 17x
1 22 22 1 56.4
2 50 100 4 73.4
3
3 79
79 237
237 9
9 90.4
4
4 32
32 128
128 16
16 107.4
107.4
5
5 29
29 145
145 25
25 124.4
124.4
6
6 52
52 312
312 36
36 141.4
141.4
7
7 82
82 574
574 49
49 158.4
158.4
8
8 38
38 304
304 64
64 175.4
175.4
9
9
32
32
288
288
81
81
192.4
192.4
10 58 580 100 209.4
10 58 580 100 209.4
11 91 1001 121 226.4
11 91 1001 121 226.4
12 41 492 144 243.4
12 41 492 144 243.4
78 606 4183 650  
 

b = =17 a = = 39.4 trend line, t = 39.4 + 17x


Method of Moving Average
• Involve calculating a set of averages each one
corresponding to a trend (t) value for a time point of
the series.
• It involve taking average of a number of values while
keeping the number of the values of the same each
time dropping the earliest and including the new
immediately available values in the series
• Example: Moving average of five
Original values 12 10 11 11 9 11 10 10 11 12
Moving totals 53 52 52 51 51 52
Moving average 10.5 10.4 10. 4 10.2 10.2 10.4
Points to remember
• For the moving average with an odd numbered
period 3, 5, 7, etc. the relevant time point is that
corresponding to the 2nd , 3rd ,4th etc.
• When the moving average have even numbered
period the resulting moving average would be seem
to be placed in the between two corresponding time
points
• Notice that the starting and ending time points do
not have a trend value.
Example: Refer example1
Year Qtr Original data Moving totals of 4 Moving average Centreed moving average
1 22      
         
2 50      
year 1     183 45.75  
3 79     46.6
    190 47.5  
4 32     47.8
    192 48  
1 29     48.4
    195 48.75  
2 52     49.5
year2
    201 50.25  
3 82     50.6
    204 51  
4 38     51.8
    210 52.5  
1 32     53.6
    219 54.75  
2 58     55.1
year 3
    222 55.5  
3 91      
         
4 41      
Seasonal variation
• Component give an average effect on the
trend which is solely attributable to the
season itself.
• They are expressed in terms of deviations
from (additive model) or percentages of
(multiplicative model) the trend
Determination of appropriate model to
use
To determine which model to use when confronted with
time series data, the following procedure is
recommended
1. Plot the time series on the graph paper
2. Study the pattern of seasonality on the plotted data
3. If the pattern of seasonality keeps on increasing with
the rising of trend, the data should obey a
multiplicative data. Alternatively, if the pattern of
seasonality does not increase with the rising trend,
the time series data should be analysed using
additive model
Technique for calculating seasonal
variation
• Additive model
• Given the original time series (y) values together with
a trend(t) values, the procedure for calculating the
seasonal variation are
1st : Calculate, for each time point, value of y – t
2nd: For each season in turn, find the average
(arithmetic mean) of the y - t
3rd: if the total from averages differs from zero adjust
one or more of them so that their total is zero
Example
The sales of a company (y, in Tshs “000”) are given
below, together with previously calculated trend (t). The
subsequent calculation to find the seasonal variation are
shown, laid out in a standardized way. step 1
Years Quarter  y t y-t
1 20 23 -3
2 15 29 -14
Year 1
3 60 34 26
4 30 39 -9
1 35 45 -10
2 25 50 -25
Year 2
3 100 55 45
4 50 61 -11
 Step 2 Deviations (y-t)  
  Q1 Q2 Q3 Q4 Sum
Year 1 -3 -14 26 -9  
Year 2 -10 -25 45 -11  
Total -13 -39 71 -20  
Average -6.5 -19.5 35.5 -10 -0.5

Step 3: The Average is – 0.5 (not zero). It is necessary to adjust.

  Q1 Q2 Q3 Q4 Sum
Initials values -6.5 -19.5 35.5 -10  
Adjustment + 0.125 + 0.125 + 0.125 + 0.125  
Adjustments values (s) -6.375 -19.375 35.625 -9.875 0
Interpretation:
The average seasonal effect for quarter 1. For instance is to deflate the
trend by 6.375 and that for the quarter 3 is to inflate the trend by
35.625
Multiplicative model
Given the original time series (y) values together with a
trend(t) values, the procedure for calculating the
seasonal variation are
1. calculate for each time point, the value of (y-t)/t
2. for each season in turn, find the arithmetic mean of
the above proportional changes.(note this should
strictly involve calculating the geometric mean of
1+proportional change values. In practice however
this is felt to be too complex!)
3. if the total of averages differs from zero, adjust one
or more of them so that their total is zero
Example
The sales of a company (y, in Tshs “000”) are given
below, together with previously calculated trend (t). The
subsequent calculation to find the seasonal variation are
shown, laid out in a standardized way. step 1

Years Quarter  y t (y-t)/t s=1+(y-t)/t


1 20 23 -0.13 0.87
2 15 29 -0.48 0.52
Year 1
3 60 34 0.76 1.76
4 30 39 -0.23 0.77
1 35 45 -0.22 0.78
Year 2 2 25 50 -0.50 0.50
3 100 55 0.82 1.82
4 50 61 -0.18 0.82
Deviations 1+(y-t)/t
Q1 Q2 Q3 Q4 Sum
Year 1 0.87 0.52 1.76 0.77
Year 2 0.78 0.5 1.82 0.82
G.Means 0.83 0.51 1.79 0.80 3.92
Step 3: The Average is 3.92 ( and not 4). It is necessary to add 0.08 to one or
more. since the difference is so small only one will be adjusted. To
make smallest percentage error , the largest value 1.79 adjusted to
1.88
Q1 Q2 Q3 Q4 Sum
Initials values 0.83 0.51 1.79 0.80
Adjustment 0.015 0.009 0.03 0.01
Adjustments values(S) 0.845 0.519 1.82 0.81 4.00
Interpretation:
The average seasonal effect for quarter 1. For instance is to deflate the
trend by 17% (since) and that for the quarter 3 is to inflate the trend
by
88%
Seasonal adjustment time series
•Seasonal
  adjustment time series data are obtained by
subtracting (additive model)or division (multiplicative
model) as follows
Additive model: seasonally adjusted value = y-s
Multiplicative model : seasonally adjusted value =
Important use of seasonal values is to seasonally adjust
the original data. The seasonal adjustment is to smooth
away seasonal fluctuation, leaving clear view of what be
expected.
Additive model
• Example:
Years Quarter  y s y-s  
1 20 -6.5 26.5
2 15 -19.5 34.5
Year 1
3 60 36 24
4 30 -10 40 seasonally
adjusted
1 35 -6.5 41.5 value
2 25 -19.5 44.5
Year 2
3 100 36 64
4 50 -10 60
Multiplicative model
• Example
Quarter  y S y/S  
1 20 0.82 24.39024
Year 1 2 15 0.51 29.41176
 
  3 60 1.79 33.51955
seasonally
  4 30 0.79 37.97468
adjusted
1 35 0.82 42.68293 value
Year 2 2 25 0.51 49.01961
 
  3 100 1.79 55.86592
  4 50 0.79 63.29114
Example
The following data gives UK outward passenger
movements by sea (in millions), together with a 4 -
quarterly moving average trend. Find the value of
seasonal variation for each of four quarters ( using
additive model ) and hence obtain the seasonally
adjusted outward passenger movement.

  Year 1 year 2 Year 3


Quarter 1 2 3 4 1 2 3 4 1 2 3 4

Number of
passengers 2.2 5 7.9 3.2 2.9 5.2 8.2 3.8 3.2 5.8 9.1 4.1
Treand (t)     4.66 4.78 4.84 4.95 5.06 5.18 5.36 5.51   
Solution
  Q1 Q2 Q3 Q4 Sum
year 1     3.24 -1.58 
year2 -1.94 0.25 3.14 -1.38 
year 3 -2.16 0.29     
Totaal -4.1 0.54 6.38 -2.96 
Average -2.05 0.27 3.19 -1.48 -0.07
Adjustment 0.02 0.01 0.02 0.02 0.07
Adjusted average -2.03 0.28 3.21 -1.46 
Solution
Centred seasonal seasonally
moving Deviation variation adjustiment
Years Qtr  y average (t) (y-t) (s) data (y-s)
1 2.2    -2.03 4.23
2 5    0.28 4.72
3 7.9 4.66 3.24 3.21 4.69
Year 1 4 3.2 4.87 -1.67 -1.46 4.66
1 2.9 4.84 -1.94 -2.03 4.93
2 5.2 4.95 0.25 0.28 4.92
3 8.2 5.06 3.14 3.21 4.99
Year 2 4 3.8 5.18 -1.38 -1.46 5.26
1 3.2 5.36 -2.16 -2.03 5.23
2 5.8 5.51 0.29 0.28 5.52
3 9.1    3.21 5.89
Year 4 4.1    -1.46 5.56
Forecasting Processes in Business
Definition
• Forecasting is the estimation of future outcomes of
random variable.
• Example of business situation where forecasting is
used in prediction are:
i. When a marketing consultant predicts the cost of
sales in the business plan preparation by gauging
on the anticipated level of sales
ii. When the sales person predicts the level of sales
by analysing how much has been spend on
advertising
Time series forecasting Techniques
• There are three method used to forecast time
series data
a) Trend projection method
b) Classical decomposition method
c) Smoothing techniques

• Methods are appropriate employed if one is


looking for shot or medium term forecast
Forecasting procedure
Forecasting a value for a future time point involves
the following steps
1. Estimate trend value for the time point. There
are a number of ways of estimating future trend
values
2. Identify the seasonal variation values
appropriate to the time point.
3. Add or multiply depending to the model these
two values together , giving the requested
forecast
Trend Projection Method
• Trend projection involves fitting trend line on the
actual data time series.
• In the analysis actual data are treated as depended
variable and time is taken as the independent variable
• We use a linear regression line to method to fit a trend
line that is given by
Tx  β1  β 2 x
where T is the trend forecasts
X is the time period
β1 and β 2 are regression coefficient
Example
• The following represents the bicycle sales data by the
national bicycle company in the past ten months.
Month(X) Sales in ‘000’ (Y)
1 21.6
2 22.9
3 25.5
4 21.9
5 23.9
6 27.9
7 31.5
8 29.7
9 28.6
10 31.4

a) Fit the line that can used to forecast the time series using
trend projection
b) Forecast the value for months 11 and 12
Solution
a) From the data given above, we find the trend line to
be T = 20.4+1.1x
b) The trend forecasts for months 11 and 12 are

month Forecast
11 32,500
12 33,600
Classical Decomposition
• The method Involves the decomposition of
time series data into it is components
• Then the forecasting are obtained by excluding
the error / irregular component that are
actually not required in the final forecast
• The technique also needs a through
understanding of the model obeyed by the time
series data in question
Analysis of multiplicative model
• In analysis of multiplicative model we use the
following methods
a) Ratio of moving average(Percent moving
average)
b) The average percent method
c) Ratio trend (percentage trend method)
Ratio of moving average
(Percent moving average)
• The following are procedures
1st: Compute the moving averages based on length of
seasonality
2nd: Divide actual data by corresponding centered moving
average
3rd : Average the ratios to eliminate as much randomness as
possible
4th : Compute the normalization factor to adjust the mean ratios
so that they sum to 4 (for quarter data) or 12 (for monthly
data)
5th : Multiply the mean ratios by the normalisation factor to get
the final seasonal indices
The average percent method
• The following are procedures
1st: Compute figure for each year based on the length of
seasonality
2nd: Express the monthly or quarterly data as percentage of the
average for year
3rd : Average the corresponding percentages to eliminate
randomness error
4th : Compute the normalization factor to adjust the percentage
if they do not sum up to 400% (for quarter data) or
1200% (for monthly data)
5th : Multiply the percentage by the normalisation factor to get
the final seasonal indices
Ratio trend (percentage trend method)
• The following are procedures
1st: Fit the trend line on the time series data
2nd: with the help of the trend fitted line, determine the trend
forecasts for each period (month or quarter)
3rd : Express the periodic actual time series data as percentage
of the corresponding trend values
4th : average percentages to eliminate the random error /
irregular component
5th : Compute the normalization factor to adjust the percentage
if they do not sum up to 400% (for quarter data) or
1200% (for monthly data)
6th : Multiply the percentage by the normalisation factor to get
the final seasonal indices
Assessing the Accuracy of the Forecast
method
• There are two methods
a) Mean Absolute Deviation (MAD)
b) Mean Squared error (MSE)
Determining the mean Square Error (MSE)
• The following are procedures
1st: determine the adjusted seasonal indices using the
technique to be assessed
2nd: Deseasonalise the actual data by dividing by the seasonal
indices obtained in step 1
3rd : Forecast the desonalised data using appropriate
forecasting technique (linear regression method is
recommended) to get pure trends
4th : Seasonalize the forecasts obtained in step 3 to get final
forecasts .
5th : Calculate the MSE using the seasonalized forecasts for
the forecasting sample
Example 1

The following data represent the level of quarterly production


(in thousand Tshs) of audible oil by Mikocheni Oil Producer
Company Ltd
Quarterly Period 1999 2000 2001 2002
Q1 (Jan - March) 70 79 84 94
Q2 (Apr - Jun) 66 66 69
Q3 (Jul - Sept) 65 67 72
Q4 (Oct - Dec) 71 82 87
a) Determine the seasonal indices using the ratio to moving
average method
b) Determine the mean square error associated with the
forecasting technique you have employed
c) Forecast the level of production for 2002 quarters
Solution
Actual data 4 Moving average Centered 4 Points MA
Year Qtr (Y) (4 Points MA) (T) S =Y/T
1 70      
         
2 66      
1999     68.00  
3 65    69.125 0.9403
    70.25  
4 71    70.250 1.0107
    70.25  
1 79    70.500 1.1206
    70.75  
2 66   72.125  0.9151
2000
    73.50  
3 67    74.125 0.9039
    74.50  
4 82    75.125 1.0915
    75.50  
1 84   75.125  1.1034
    76.75  
2 69    77.375 0.8918
2001
    78.00  
3 72   79.250  0.9085 
     80.50    
4 87      
2002 1 94
Solution cont …
• Calculation of seasonal indices
Year Q1 Q2 Q3 Q4 Sum

1999 0.9403 1.0107

2000 1.1206 0.9151 0.9039 1.0915

2001 1.1034 0.8918 0.9085

Total 2.2240 1.8068 2.7527 2.1022

Average 1.1120 0.9034 0.9176 1.0511 3.9841

Adjusted 1.1164 0.9070 0.9212 1.0553 3.9999


≈ 4.0000
Solution Cont …
(b) To determine the mean square error with the moving

average forecasting techniques


• First fit a linear trend on the deseasonalised data
and then use the line to establish the trend value
• According to data, the trend line is
T = 64.567+1.363x
note x = 1, 2, 3, …, 13 presenting time in quarters
• Compute trend values, errors and squares errors
Solution cont …
Quantity  
Qtr (A) S Trend (T) F=SXT E=A/SxT TxE E2
1 70 1.1164 65.930 73.604 0.951 62.70 0.904
2 66 0.9070 67.293 61.035 1.081 72.77 1.169
3 65 0.9212 68.656 63.246 1.028 70.56 1.056
4 71 1.0553 70.019 73.891 0.961 67.28 0.923
5 79 1.1164 71.382 79.691 0.991 70.76 0.983
6 66 0.9070 72.745 65.980 1.000 72.77 1.001
7 67 0.9212 74.108 82.734 0.810 60.01 0.656
8 82 1.0553 75.471 68.452 1.198 90.41 1.435
9 84 1.1164 76.834 70.779 1.187 91.19 1.408
10 69 0.9070 78.197 82.521 0.836 65.38 0.699
11 72 0.9212 79.560 88.821 0.811 64.49 0.657
12 87 1.0553 80.923 73.397 1.185 95.92 1.405
13 94 1.1164 82.286 91.864 1.023 84.20 1.047
SUM   13.344
Solution cont …
• We define the mean square error as

MSE 
 E 2


13.344
 1.026
n 13
• MSE used to assess the degree of accuracy associated
with the a forecasting technique.
• The higher the value of MSE the less accurate the
technique is.
• If two methods of forecasting is compared then that
with smaller value of MSE is recommended
Solution Cont…
c) To determine the forecast levels of production for
year 2002 quarters.

Quarter S T  F= S x T
1 1.1164 83.649 93.3857
2 0.9070 85.012 77.1059
3 0.9212 86.375 79.5687
4 1.0553 87.738 92.5899
The seasonal adjusted trend forecasts follow the same
distribution pattern like the actual data
Example 2

The table below shows the quarterly number of foreign tourists


received in the country for a period of five years as per
provided by the tourist Information Bureau
Quarterly Period 1998 1999 2000
Q1 278 299 320
Q2 250 269 287
Q3 318 342 367
Q4 281 309 392
Total 1127 1218 1302

a) Estimate the linear trend equation for this time series


b) With the help of developed linear trend, calculate the
linear indices for each quarter.
c) Derive the seasonally adjusted trend forecasts for the
2001 quarters
d) Apply the average percent method to determine the seasonal indices
Solution
a) To estimate the trend line
From the data provided we establish a linear trend
given by
T = 255.0 + 8.349x
where x is a quarter number given by x = 1 for
quarter 1, x = 2 for quarter 2 and so on
Solution cont …
b) Seasonal indices for each quarter using
the ratio to trend method
Quarter Actual value (Y) Trend S x E = A/T
1 278 263.349 1.055633
2 250 271.698 0.920139
3 318 280.047 1.135524
4 281 288.396 0.974355
5 299 296.745 1.007599
6 269 305.094 0.881695
7 342 313.443 1.091107
8 309 321.792 0.960248
9 320 330.141 0.969283
10 287 338.49 0.847883
11 367 346.839 1.058128
12 392 355.188 1.103641
Solution cont …
• Calculation of seasonal Indices
Year Q1 Q2 Q3 Q4 Sum
1999 1.0556 0.9201 1.1355 0.9744  
2000 1.0076 0.8817 1.0911 0.9602  
2001 0.9693 0.8479 1.0581 1.1036  
Total 3.0325 2.6497 3.2848 3.0382  
Average 1.0108 0.8832 1.0949 1.0127 4.0017
Adjusted          
• Since the sum of seasonal indices is 4.0017, there is
no need to make adjustment
Solution cont …
c) The 2001 seasonally adjusted forecast for the 2001
quarters are
Quartets of Trend (T) Seasonal Forecast(TXS)
2001 Index (S)

Q1 13 363.537 1.011 367.477


Q2 14 371.886 0.883 328.464
Q3 15 380.235 1.095 416.327
Q4 16 388.584 1.013 393.538
Solution cont …
d) Using average percent method to determine
the seasonal indices
Quarter Actual value Trend SxE = A/T
1 278 281.75 0.9867
2 250 281.75 0.8873
3 318 281.75 1.1287
4 281 281.75 0.9973
5 299 304.75 0.9811
6 269 304.75 0.8827
7 342 304.75 1.1222
8 309 304.75 1.0139
9 320 341.50 0.9370
10 287 341.50 0.8404
11 367 341.50 1.0747
12 392 341.50 1.1479
Solution cont …
• Computation of seasonal indices
Year Q1 Q2 Q3 Q4 Sum
1999 0.9867 0.8873 1.1287 0.9973  
2000 0.9811 0.8827 1.1222 1.0139  
2001 0.9370 0.8404 1.0747 1.1479  
Total 2.9049 2.6104 3.3256 3.1592 12.0000
Average 0.9683 0.8701 1.1085 1.0531 4.0000
Adjusted          

• Since the sum of seasonal indices is 4.0000, there is


no need to make adjustment
Analysing the Additive Model
• Is the techniques used to analyse a time series data
that obeys the additive model.
• The technique is the ratio to moving average method
• The procedure to undertake additive model are
1st: Compute the moving averages based on length of
seasonality
2nd: Deduct the moving average values from the
corresponding actual data.
3rd : Average the ratios to eliminate random error
(irregular component)
Analysing the Additive Model cont …
4th : Compute the normalization factor to adjust the
ratios so that they sum to zero
5th : Add the normalization factor to the mean ratios
by the normalisation factor to get the final
seasonal indices.
Example 3
• The following data are extracted from the records of LUFUMBI
Enterprises regarding the volume of fresh fish (‘000’kg) sold
during the last 13 quarters
Date Qtr Quantity Sold (‘000’)kg
Jan – March 2000 1 239
April – June 2000 2 201
July – Sept 2000 3 182
Oct – Dec 2000 4 297
Jan - March2001 1 324
April – June 2001 2 278
July – Sept 2001 3 257
Oct – Dec 2001 4 384
Jan - March2002 1 410
April – June 2002 2 360
July – Sept 2002 3 335
Oct – Dec 2002 4 462
Jan - March2003 1 481
Example Cont …
a) Compute the quarterly moving averages for the
above data
b) Determine the seasonal indices
c) Forecast the level of sales for the April – June and
July – September quarters for 2003
d) Compute the mean square Error (MSE) associated
with techniques
Solution
Centered 4 Points
Year Qtr Quantity (A) 4 Moving Average MA (T) S+E=A-T
1 239      
         
2 201      
    229.75    
3 182   240.375 -58.375
    251    
1999 4 297   260.625 36.375
    270.25    
1 324   279.625 44.375
    289    
2 278   299.875 -21.875
    310.75    
3 257   321.5 -64.5
    332.25    
2000 4 384   342.5 41.5
    352.75    
1 410   362.5 47.5
    372.25    
2 360   382 -22
    391.75    
3 335   400.625 -65.625
    409.5    
2001 4 462      
2002 1 481      
Solution cont …
b) To determine the seasonal indices
Year Quarter 1 Quarter 2 Quarter 3 Quarter 4 Sum
2000     -58.375 36.375 
2001 44.375 -21.875 -64.5 41.5 
2002 47.5 -22     
Average 45.9375 -21.9375 -61.4375 38.9375 1.5000
Adjusted
Seasonal
Indices 45.5625 -22.313 -61.813 38.5625 0.0000
Solution cont …
c) Forecast the level of sales for the April – June and
July – September quarters for 2003

Quarter S T  F= S +T
14 1.1164 83.649 84.7654
15 0.907 85.012 85.919

d) To compute the Mean Square Error (MSE)


T = 179.827 + 20.074x
Solution Cont …
Year Qtr Quantity (A) S Trend (T) T+E=A-S E=A-T-S E^2
1 239 45.5625 199.901 193.44 -6.4635 41.7768
2 201 -22.3125 219.975 223.31 3.3375 11.1389
2000
3 182 -61.8125 240.049 243.81 3.7635 14.1639
4 297 38.5625 260.123 258.44 -1.6855 2.8409
5 324 45.5625 280.197 278.44 -1.7595 3.0958
6 278 -22.3125 300.271 300.31 0.0415 0.0017
2001
7 257 -61.8125 320.345 318.81 -1.5325 2.3486
8 384 38.5625 340.419 345.44 5.0185 25.1853
9 410 45.5625 360.493 364.44 3.9445 15.5591
10 360 -22.3125 380.567 382.31 1.7455 3.0468
2002
11 335 -61.8125 400.641 396.81 -3.8285 14.6574
12 462 38.5625 420.715 423.44 2.7225 7.4120
2003 13 481 45.5625 440.789 435.44 -5.3515 28.6386
 SUM             169.8659
Solution cont …
• We define the mean square error as

MSE 
 E 2


169.8659
 13.067
n 13
Smoothing methods
• Is the standard forecasting technique used in statistics
• There two methods in practice namely moving average
methods and the exponential smoothing
1.Moving Average
• Is the method of forecasting or smoothing a time series
by averaging each successive group of the points
• Fist decide on the step to compute the moving averages
• A step is a umber of periods that form the basis for
computing moving average
• The longer the step taken the smoother will be the final
forecasts.
2. Exponential Smoothing
• Exponential smoothing takes care of some of
limitations of the moving average method of
forecasting
• The technique gives weight to pat data and that weight
keeps decreasing exponentially with time
• That is the most current observation is given the
greatest weighting and the older observations are given
less weight
• The method can be looked at as a weighted moving
average
Exponential Smoothing cont …
• The exponential moving average is given by

Ft 1  Ft  α A t  Ft 
where F t+1 = forecast for period t+1
A t = Actual time series data for time t
F t = Forecast for period t
α = weighting factor lying between 0 and 1
i.e 0 < α < 1
Example
• The data below shows the number of petrol sold by
Shekilango Petrol Station over the past 12 weeks
Week Sales “000” of litres
1 17
2 21
3 19
4 23
5 18
6 16
7 20
8 18
9 22
10 20
11 15
12 22
Questions
a) Determine moving average forecasts using a step of
4 period
b) Determine the exponential smoothing forecasts for
petrol sales using a smoothing constant, α = 0.2 and
α = 0.8.
Solution
a)Moving average forecasts using a step of 4 period
Week Sales “000” of litres
 Forecast (F)
1 17  
     
2 21  
    20
3 19  
    20.25
4 23  
    19
5 18  
    19.25
6 16  
    18
7 20  
    19
8 18  
    20
9 22  
    18.75
10 20  
    19.75
11 15  
     
12 22  
Solution cont …
Week Sales “000” Exponential Smoothing Exponential Smoothing
of liters Forecasts with = 0.2 Forecasts with = 0.8
1 17 - -
2 21 17.00 17.00
3 19 17.80 20.20
4 23 18.04 19.24
5 18 19.03 22.25
6 16 18.83 18.85
7 20 18.26 16.57
8 18 18.61 19.31
9 22 18.49 18.26
10 20 19.19 21.25
11 15 19.35 20.25
12 22 18.48 16.05
Choice of Forecasting method
• There are numerous forecasting methods that exist. The
following can serve as a guide in selecting the appropriate
forecasting techniques
a) Availability of data
b) Time horizon. The longer the time over which the
forecasts are required, the more one may have to depend
on qualitative method
c) Cost consideration
d) Accuracy
e) Forecast from required
f) Underlying data pattern
g) Ease of operation and understanding of the technique

You might also like