0% found this document useful (0 votes)
53 views11 pages

Time Series and Analysis

This document discusses techniques for time series analysis including moving averages, exponential smoothing, and decomposition of time series. It provides examples and explanations of 3-month and 6-month moving averages, exponential smoothing using a smoothing constant of 0.3, and separating trend and seasonal variation from time series data.

Uploaded by

Nereah Debrah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views11 pages

Time Series and Analysis

This document discusses techniques for time series analysis including moving averages, exponential smoothing, and decomposition of time series. It provides examples and explanations of 3-month and 6-month moving averages, exponential smoothing using a smoothing constant of 0.3, and separating trend and seasonal variation from time series data.

Uploaded by

Nereah Debrah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 11

TIME SERIES ANALYSIS

This is the mathematical or statistical analysis on past data arranged in a periodic sequence.
Decision making and planning in an organization involves forecasting which is one of the time
series analysis.

Impediments in time series analysis


Accuracy of data in reflecting
a) Drastic changes e.g. in the advent of a major competitor, period of war or sudden change of
taste.
b) For long term forecasting internal and external pressures makes historical data less effective.

Moving Average
Periodical data e.g. monthly sales may have random fluctuation every month despite a general
trend being evident. Moving average helps in smoothing away these random changes.

A moving average is the forecast for a period that takes the average of the previous periods.

Example:
The table below represents company sales, calculate 3 and 6 monthly moving averages, for the
data

Months Sales
January 1200
February 1280
March 1310
April 1270
May 1190
June 1290
July 1410
August 1360
September 1430
October 1280
November 1410
December 1390
Solution.
These are calculated as follows
April’s forecast = =

May’s forecast = =

And so on…

Similarly, for 6 monthly moving average

1|Page
July forecast = =
And so on…
3 months moving 6 months moving
average average
April 1263
May 1287
June 1257
July 1250 1257
August 1297 1292
September 1353 1305
October 1400 1325
November 1357 1327
December 1373 1363

Note:
When plotting moving average on graphs the points are plotted as the midpoint of the period of
the average, e.g. in our example the forecast for April (1263) is plotted on mid Feb.
Characteristics of moving average
1) The more the number of periods in the moving average, the greater the smoothing
effect.
2) Different moving averages produce different forecasts.
3) The more the randomness of data with underlying trend being constant then the more
the periods should be involved in the moving averages.

Limitations of moving averages.


1) Equal weighing with disregard to how more recent data is more relevant.
2) Moving average ignores data outside the period of the average thus it doesn’t fully
utilize available data.
3) Where there is an underlying seasonal variation, forecasting with unadjusted moving
average can be misleading.

Exponential smoothing
This is a weighted moving average technique; it is given by:
New forecast = Old forecast +  (Latest Observation – Old forecast)
Where  = Smoothing constant

This method involves automatic weighing of past data with weights that decrease exponentially
with time.

Example
Using the previous example and smoothing constant 0.3 generate monthly forecasts
Months Sales Forecasts:  = 0.3
January 1200
February 1280 1200
March 1310 1224

2|Page
April 1270 1250
May 1190 1256
June 1290 1233
July 1410 1250
August 1360 1283
September 1430 1327
October 1280 1358
November 1410 1335
December 1390 1357

Solution
Since there were no forecasts before January, we take Jan to be the forecast for February.
 Feb – 1200
For March;
March forecast = Feb forecast + 0.3 (Feb sales – Feb forecast)
= 1200 + 0.3 (1280 – 1200)
=1224

Note:
 The value  lies between 0 and 1.
 The higher the  value, the more the forecast is sensitive to the current status.

Characteristics of exponential smoothing


 More weight is given to the most recent data.
 All past data are incorporated unlike in moving averages.
 Less data is needed to be stored unlike in periodic moving averages.

Decomposition of time series


Time series has the following characteristics.
a) A long-term trend (T) –tendency of the whole series to rise and fall.
b) Seasonal variation (S) – short term periodic fluctuations in values. e.g. in Kenya maize
yield is high in November and low in March or matatus have better business on Friday
and very low on Sundays.
c) Cyclical variation (C) – These are medium term changes caused by factors which apply
for a while then disappear, and come back again in a repetitive cycle. e.g. drought hits
Kenya every 7 years.
Note that cyclic variation has a longer term than seasonal variation e.g. seasonal variation
may occur once every year while cyclic variation occurs once every several years.
d) Random residual variation (R) – These are non-recurring random variations e.g. war, fire,
coup etc.

For accurate forecasts these aspects are qualified separately (i.e. T, C, S and R) from data.
This is known as time decomposition or time series analysis
The separate elements are then combined to produce a forecast.

3|Page
Time series models:

Additive Model

Time series value = T +S +C +R

Where S, C and R are expressed in absolute value.


This model is best suited where the component factors are independent e.g. where the
seasonal variation is unaffected by trend.

Multiplicative Model:

Time series value = T × S× C × R

Where S, C and are expressed as percentage or proportions.


This model is best applied where characteristics interact e.g. where high trends increase
seasonal variations. Multiplicative model is more commonly used in practice.

Of the four elements of time series the most important are trend and seasonal variation. The
following illustration shows how the trend (T) and seasonal variation (S) are separated out from
a time series and how the calculated T and S values are used to prepare forecast. The process of
separating out the trend and seasonal variation is known as deseasonalizing the data.

There are two approaches to this process: one is based on regression through the actual data
points and the other calculates the regression line through moving average trend points.

Time series analysis: trend and seasonal variation using regression on the data

The following data will be used to illustrate how the trend and seasonal variation are calculated.

Example 1

Sales of widgets in ‘000s


Quarter 1 Quarter 2 Quarter 3 Quarter 4
Year 1 20 32 62 29
2 21 42 75 31
3 23 39 77 48
4 27 39 92 53

It will be apparent that there is a strong seasonal element in the above data (low in Quarter 1 and
high in Quarter 3) and there is a generally upward trend.

The steps in analyzing the data and preparing a forecast are:

Step 1: Calculate the trend in the data using the least squares method.

4|Page
Step 2: Estimate the sales for each quarter using the regression formula
established in step 1.

Step 3: Calculate the percentage variation of each quarter’s actual sales from the
estimates, obtained in step 2.

Step 4: Average the percentage variations from step 3. This establishes the
average seasonal variations.

Step 5: Prepare forecast based on trend percentage seasonal variations.

Solution

Step 1
Calculate the trend in the data by calculating the linear regression line y = a + bx.

x (quarters) x (sales) xy x2
 1 20 20 1
2 32 64 4
Year 1 3 62 186 9
4 29 116 16

 5 21 105 25
6 42 252 36
Year 2 7 75 525 49
8 31 248 64

 9 23 207 81
10 39 390 100
Year 3 11 77 847 121
12 38 576 144

 13 27 351 169
14 39 546 196
Year 4 15 92 1380 225
16 53 848 256
x=136 y= 710 xy= 6661  x2 =1496

Least square equations

y = an + bx

xy = ax + bx2


710 = 16a + 136b

5|Page
6661 = 136a + 1496b

626 = 340b

b = 1.84 and substituting we obtain

a = 28.74

Trend line = 28.74 + 1.84x

Steps 2 and 3
Use the trend line to calculate the estimated sales for each quarter.

For example, the estimate for the first quarter in year 1 is


estimate = 28.74 + 1.84 (1) = 30.58

The actual value of sales is then expressed as a percentage of this estimate. For example, actual
sales in the first quarter were 20 so the seasonal variation is

x (quarters) y (sales) Trend

 1 20 30.58 65
2 32 32.42 99
Year 1 3 62 34.26 181
4 29 36.10 80

 5 21 37.94 55
6 42 39.78 106
Year 2 7 75 41.62 180
8 31 43.46 71

 9 23 45.30 51
10 39 47.14 83
Year 3 11 77 48.98 157
12 48 50.82 94

 13 27 52.66 51
14 39 54.50 72
Year 4 15 92 56.34 163
16 53 58.18 91

Trend estimates and percentage variations table.

6|Page
Step 4

Average the percentage variations to find the average seasonal variations.


Q1 Q2 Q3 Q4
% % % %
65 99 181 80
55 106 180 71
51 83 157 94
51 72 163 91
222 360 681 336
4= 56% 90% 170% 84%

These then are the average variations expected from the trend for each of the quarters; for
example, on average the first quarter of each year will be 56% of the value of the trend. Because
the variations have been averaged, the amounts over 100% (Q3 in this example). This can be
checked by adding the average and verifying that they total 400% thus:

56% + 90% + 170% + 84% = 400%.

On occasions, roundings in the calculations will make slight adjustments necessary to the
average variations.

Step 5

Prepare final forecasts based on the trend line estimates from “trend estimates and percentages
variation table” (i.e. 30.58, 32.42, etc) and the averaged seasonal variations from the table above.
(i.e. 56%, 90%, 170% and 84%)

The seasonally adjusted forecast is calculated thus:

Seasonally adjusted forecast = Trend estimate × Seasonal variation%

X Y (sales) Seasonally
(quarters) adjusted
forecast
 1 20 17.12
Year 1 2 32 29.18
3 62 58.24
4 29 30.32

 5 21 21.24
Year 2 6 42 35.80
7 75 70.75
8 31 36.51

7|Page
 9 23 25.37
Year 3 10 39 42.43
11 77 83.27
12 48 42.69

 13 27 29.49
Year 4 14 39 49.05
15 92 95.78
16 53 48.87

Seasonally adjusted forecasts


The forecasts are compared with the actual data to get some idea of how good extrapolated
forecasts might be. With further analysis they enable us to quantify the residual variations.

Extrapolation using the trend and seasonal factors


Once the formulae above have been calculated, they can be used to forecast (extrapolate) future
sales. If it is required to estimate the sales for the next year (i.e. Quarters 17, 18, 19 and 20 in our
series) this is done as follows:

Quarter 17 Basic trend = 28.74 + 1.84 (17)


= 60.02

Seasonal adjustment for a first quarter = 56%


Adjusted forecast = 60.02 × 56%
= 33.61

A similar process produces the following figures:

Adjusted forecasts Quarter 18 = 55.67


19 = 108.29
20 = 55.05

Notes:
a) Time series decomposition is not an adaptive forecasting system like moving averages
and exponential smoothing.
b) Forecasts produced by such an analysis should always be treated with caution.
Changing conditions and changing seasonal factors make long term forecasting a
difficult task.
c) The above illustration has been an example of a multiplicative model. This is the
seasonal variations were expressed in percentage or proportionate terms. Similar steps
would have been necessary if the additive model had been used except that the
variations from the trend would have been the absolute values. For example, the first
two variations would have been

Q1: 20 – 30.58 = absolute variation = -10.58

8|Page
Q2: 32 – 32.42 = absolute variation = - 0.42
And so on.

The absolute variations would have been averaged in the normal way to find the
average absolute variation, whether + or -, and these values would have been used to
make the final seasonally adjusted forecasts.

Trend and seasonal variation using moving averages


When the correlation coefficient is low the method of calculating the regression line
through the actual data points should not be used. This is because the regression line is
too sensitive to changes in the data values.

In such circumstances, calculating a regression line through the moving average trend
points is more robust and stable.

Example 1 is reworked below using this method and, because there are many similarities
to the earlier method, only the key stages are shown.

x y 3 point moving Trend line (2)


average (1)
1 20 34.38 58
2 32 38 35.70 90
3 62 41 37.02 167
4 29 37.3 38.34 76
5 21 30.7 39.66 53
6 42 46 40.98 102
7 75 49.3 42.30 177
8 31 43 43.62 71
9 23 31 44.94 51
10 39 46.3 46.26 84
11 77 54.7 47.58 162
12 48 50.7 48.90 98
13 27 38 50.22 54
14 39 52.7 51.54 76
15 92 61.3 52.86 174
16 53 54.18 98

Trend estimates and percentage variations utilizing moving averages

The first three moving average is calculated as follows

The next calculated:

9|Page
The regression line y = a + bx of the moving average values is calculated in the normal manner
and results in the following:
y = 33.06 + 1.32x

This is used to calculate the trend line:

e.g. For Period 1:y = 33.06 + 1.32(1) = 34.38


For Period 2:y = 33.06 + 1.32 (2) = 35.70

The percentage variations are averaged as previously shown, resulting in the following values:

Q1 Q2 Q3 Q4
Average seasonal variation % 54 89 170 86

The trend line and the average seasonal variations are then used in a similar manner to that
previously described.

For example, to extrapolate future sales for the next year (i.e. quarters 17, 18, 19 and 20) is as
follows:
Quarter 17
Forecast sales = (33.06 + 1.32(17)) × 0.54 = 29.97

A similar process produces the following figures:

Quarter 18 = 50.57
19 = 98.84
20 = 51.13

Forecast errors
Differences between actual results and predictions may arise from many reasons. They may arise
from random influences, normal sampling errors, choice of the wrong forecasting system or
alpha value or simply that the future conditions turn out to be radically different from the past.
Whatever the cause(s) management wish to know the extent of the forecast errors and various
methods exist to calculate these errors.

A commonly used technique, appropriate to time series, is to calculate the mean squared error of
the deviations between forecast and actual values then choose the forecasting system and/or
parameters which gives the lowest value of mean squared errors, i.e. akin to the ‘least squares’
method of establishing a regression line.

Longer- term forecasting


Moving averages, exponential smoothing and decomposition methods tend to be used for short to
medium term forecasting. Longer term forecasting is usually less detailed and is normally
concerned with forecasting the main trends on a year to year basis. Any of the techniques of

10 | P a g e
regression analysis described in the preceding chapters could be used depending on the
assumptions about linearity or non- linearity, the number of independent variables and so on. The
least squares regression approach is often used for trend forecasting.

Forecasting using least squares

Example 2
Data have been kept of sales over the last seven years

Year 1 2 3 4 5 6 7
Sales (in ‘000 units 14 17 15 23 18 22 27

It is required to forecast the sales for the 8th year

Solution
Years (x) Sales (y) xy x2
1 14 14 1
2 17 34 4
3 15 45 9
4 23 92 16
5 18 90 25
6 22 132 36
7 27 189 49
x=28 y = 136 xy=596  x = 140
2

136 = 7a + 28b

596 = 28a + 140b


 b = 1.86
And substituting in one of the equations we obtain
a = 12
 Regression line = y = 12 + 1.86x

Or, Sales in (‘000s of units) = 12.00 + 1.86 (no of years)

We use this expression for forecasting, for 8th year sales = 12 + 1.86 (8)
=26.88 i.e. 26,888 units

11 | P a g e

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy