0% found this document useful (0 votes)
16 views26 pages

Time Series Notes

A time series is a sequence of data points recorded at regular intervals, used for analysis and forecasting in various business contexts. It consists of components such as trends, cyclical variations, seasonal variations, and random variations, which can be modeled using additive or multiplicative approaches. Understanding these components allows for effective forecasting and planning based on historical data patterns.

Uploaded by

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

Time Series Notes

A time series is a sequence of data points recorded at regular intervals, used for analysis and forecasting in various business contexts. It consists of components such as trends, cyclical variations, seasonal variations, and random variations, which can be modeled using additive or multiplicative approaches. Understanding these components allows for effective forecasting and planning based on historical data patterns.

Uploaded by

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

TIME SERIES

1.0 INTRODUCTION
A time series is an ordered sequence of values of a variable at equally spaced time intervals. It
is a set of data values that are recorded at successive and regular intervals over a period of time
e.g., daily, weekly, monthly, quarterly and annually.
An analysis of history, a time series, can be used by management or business individuals to make
current and future plans based on long term time series data, and assuming that patterns would
continue into the future. Both short-term and long-term predictions are essential for a business
entity to execute possible development plans in terms of financing, procurement, manufacturing,
sales, profits, revenue, new products, new plants/machinery, market demand, and recruitment
among others.
For forecasts based on time series to be meaningful, the rule of thumb is that the data must
recorded over a relatively longer period of time i.e., at least 10 observations.
1.1 APPLICATIONS OF TIME SERIES
The analysis of time series has two major objectives;
a) Obtain an understanding of the underlying forces and structure that produced the observed
data.
b) Forecast using fitted time series model. The models can also be used to monitor a set of time
series components.
Time Series analysis areas of application including economic forecasting, sales forecasting,
budgetary analysis, stock market analysis, yield projections, process and quality control,
inventory studies, workload projections, utility studies, and census analysis.
1.2 PLOTTING A TIME SERIES
A time series is plotted on graph called a histogram.
Example 1
The following table shows water consumption (litres) for a typical household in Kisumu.
Construct a time series plot for the data
Solution:
To plot time series data, each data value is plotted against the corresponding time point and the
points are then joined by straight line segments as shown below.

Notice the up and down swings (peaks and troughs) which are typical of time series data. There
is marked seasonality in water consumption with the highest water consumption being in the last
quarter (Oct-Dec) of each year. Over the years, there is a slight increase in water consumption.
1.3 COMPONENTS OF A TIME SERIES
There are four main components to a time series: the secular trend or simply trend, the cyclical
variation, the seasonal variation, and the random variation.
16.3.1 Secular Trend (T):
This is defined as the long-term direction of a time series. The trend can be upward (increasing),
downward (decreasing) or constant (show no change) over time. In the previous example, we
plotted a time series on a histogram and noted that there was a slight increase in water
consumption over the four-year period. We can confirm this observation by fitting in a trend line
in the time series plot as shown below:

1.3.2 Cyclical Variation (C):


The wave-like movement of a time series caused by booms and slumps of an economy over long
periods of time. The periods usually correspond to business cycles in the economy.
1.3.3 Seasonal Variation (S):
These are patterns of change in a time series which occur over short repetitive periods. These
represent predictable deviation from the trend. For example, an ice creamer seller would expect a
substantial increase in sales in summer. Given a particular time point at which data is observed, a
seasonal variation is therefore the difference between an actual data value observed and the trend
figure.
Graphically, we can show the seasonal variation as below:
1.3.4 Random or Irregular Variations (R or I):
These are variation which occur over short intervals and are unpredictable. Factors that can cause
these variations include unexpected changes in weather, strikes, breakdowns, theft, war/political
unrest, death, and sickness.
1.4 TIME SERIES MODELS
Once the components of a time series are identified, we need to understand how they are
combined to provide an observed data value. There are two common models for combining time
series components and these are: The additive model and the multiplicative model.
The additive model assumes that each time series data value is a sum (algebraically) of the
components:

Where Y = Actual observations or observed data value


T = Trend
C = Cyclical variation
S = Seasonal variation
R = Random/Irregular/Residual variation
The multiplicative model also referred to as the classical time series model assumes that each
time series data value is as a result of multiplying (a product of) the components:
1.5 TIME SERIES DECOMPOSITION
Decomposition is the process of breaking a time series into its components.
1.5.1 The Trend
The objectives behind the study of the trend are:
To explain the general underlying tendency in the movement of data over time. This is usually
assumed to be in form of a linear pattern with a positive (increasing) or negative (decreasing)
gradients.
To remove the trend from the data in order to expose the movements in the other components.
The trend can be estimated using any of the following methods:
a) Semi-average method
b) Least squares method
c) Moving average method
A. Trend by Semi-Average Method
To find the trend using the semi-average method we follow the following basic steps:
Step 1:
Split the data into 2 equal parts (halves). If there is an odd number of observations/values, simply
leave out the median values
Step 2:
Calculate the arithmetic mean for each group.
Step 3:
Plot these two points against the median position of each group. Join the two points with a
straight line. This is the trend line.
The trend for each time point is then read from the linear plot. Alternatively, find the average
increase/decrease per year by dividing the difference between the two mean points by the
number of time points between them.
Example 2
The following data shows the quarterly domestic exports (to the nearest billion of Ksh) for
Kenya for the years 2010 to 2012.
Find the trend by means of semi-average method. And hence assign trend values for all quarters.
Solution
Step 1: Splitting the data
The data set has 11 observations. Therefore, it can be split into halves of 5 observations each.
The first half covers the period Jan-Mar 2010 to Jan-Mar 2011 with the following export values:
32, 27, 52, 49 and 48.
The second half covers the period Jul-Sep 2011 to Jul-Sep 2012 with the following export
values: 53, 76, 50, 65 and 100.
Note: Since have an odd number of values, we have left out the median data observation of 46
for Apr-Jun 2011.
Step 2: Calculating the arithmetic means

Step 3: Plotting the mean points


Trend by semi averages
The trend values for each time point can be read from the graph or calculated as below:

We will proceed to find the trend values by adding or subtracting 4.53 to or from either of the
mean points.
For example, the trend for Apr-Jun 2010 is 41.6 – 4.53 = 37.1, for Oct-Dec 2010 is 41.6 + 4.53 =
43.1, and for Apr-June 2012 is 68.8 + 4.53 = 73.3. The rest of the trend values are presented
below.
B. Trend by Least Squares Method
To find the trend using the method of least squares we follow the following steps:
Step 1:
Treat time points as the independent X-variable. The time points are transformed into values
through a process of coding as follows: The first time point is coded 1, the second time point is
coded 2, and so on until the last time point is coded.
Step 2:
Obtain a least squares regression line between the x-codes and the time series data values (Y-
values). The trend line through the data is given by:

To calculate the trend value, substitute the appropriate x-code into the least squares equation and
compute the value of y.
Example 3
Find the trend by means of least squares method for the domestic export data from the previous
example.
Solution
To find the least squares trend, first code the time point as follows: Jan-Mar 2010 – 1, Apr-Jun
2010 – 2, Jul-Sep 2010 – 3, ... Jul-Sep 2012 – 11.

C. Trend by Moving Averages Method


This is an alternative and possibly standard method for finding the trend and requires no specific
mathematical formula. The method is non-linear (though fairly linear), in the sense that it does
not result in a straight line, but it does smooth out peaks and valleys (ups and downs) in a set of
observations by “removing” seasonal and random variations from to reveal the trend.
The moving average trend is accomplished by “moving” the arithmetic mean values through the
time series i.e., averaging sets of overlapping data observations through the time series data. In
working out the moving average trend, the number of observations to include or average depends
on the periodicity of the time series. With quarterly data, the period is 4; for data recorded daily 5
days a week, the period would be 5. If the period is an even number (e.g., quarterly data or data
recorded daily for 6 days/week) then a centred moving average is required. However, if the
period is an odd number (e.g., data recorded daily 5 or 7 days/week), then a simple moving
average is appropriate.
Example 4
The following are production figures over 9 days. Use them to find 2-point and 3-point moving
averages.

Solution
For 2-point moving averages:
For 3-point moving averages:
Day Data value, y 3-point moving totals 3-point moving average

Day 1 6
Day 2 4 20 6.67
Day 3 10 22 7.33
Day 4 8 23 7.67
Day 5 5 25 8.33
Day 6 12 26 8.67
Day 7 9 28 9.33
Day 8 7 31 10.33
Day 9 15

Note: In a 2-point moving average the moving totals and averages fall between two time points
(days). i.e., the first is between the Day 1 and Day 2 being the median position of the first pair of
figures. The 3-point moving totals and averages fall against/adjacent times points. i.e., the first is
aligned against Day 2 being the median position for the first three figures. Notice that the
resulting moving averages are less variable than the original data. The production figures have
been ‘smoothed’.
The most common moving averages calculated in time series data for commercial purposes are
4-, 5-, 6- or 7-point ones because most data relate to 4 quarter/yearly cycles, and 5, 6 or 7
day/weekly cycles.
TASK 1
The following data shows the sales revenue (K million) of a local company from 2010 to 2013.

Find the trend using the moving average method and plot it together with the time series data.
TASK 2
The following data shows the output of a factory located in Nairobi over a 3-week period.

1.5.2 Seasonal Variation


many time series are affected by seasonal factors. It is necessary to find the value of a seasonal
component in order to obtain seasonally adjusted data and for forecasting purposes. The
procedure for finding the seasonal variations/factors depends on the model used.
Using the additive model:
􀁸 Obtain the seasonal variation for each time point by subtracting the ‘trend’ from the observed
data value i.e.

􀁸 Find the average seasonal variation for time point. Check that the sum of the average seasonal
variations is equal to zero (0).
􀁸 If the sum of the averages is not equal to zero, then the averages must be adjusted accordingly
so that they sum to zero. The adjustment factor is

Period
Sum of the averages
. If the sum is less than zero, we add the modulus of the adjustment factor to each average.
However, if the sum is greater than zero, we subtract the adjustment factor from each average to
obtain the adjusted seasonal variations/factors.
Using the multiplicative model:
􀁸 Obtain the seasonal variation for each time point by dividing the data value by the ‘trend’ i.e.,
􀁸 Find the average seasonal variation for each time point. Check that the sum of the average
seasonal variations is equal to period. For quarterly data, they must sum to 4, for a 5 day-week,
they must sum to 5. . .
􀁸 If the sum of the averages does not equal the period, then the averages must be adjusted
accordingly so that their sum equals the period. The adjustment factor is

. The adjusted seasonal variations/factors are then obtained by multiplying each average by the
adjustment factor.
Determining which model to use
The additive model is used when the seasonal variation is approximately the same, irrespective
of the trend values. Consider the graph below;

We can see that the seasonal variations (differences between observed and trend values) for
similar quarters are almost the same. In this case the additive model is appropriate.
In the multiplicative model the season variation is approximately proportional to the trend. If the
trend is upward, then the variation increases. If the trend is downward, then the seasonal
variation decreases.
Consider the following graph:

We can see that the trend is upward and the seasonal variations (differences between observed
and trend (values) for similar quarters are increasing (in absolute terms) as we move from 2010
to 2012. In this case multiplicative model is used.
Apart from the graphical method, the other and quicker method for decide the right model to use
is take the reference between the smallest and largest value for each year (or week). If the
differences are roughly the same or do not follow a particular pattern, then additive model is
appropriate. However, if the differences increasing for an upward trend or decreasing for a
downward trend, then the multiplicative model is appropriate. Consider the data sets whose
graphs we just compared.
Data set 1.

The differences are:


2010: 107 – 48 = 59
2011: 134 – 66 = 68
2012: 148 – 91 = 57
2013: 174 – 105 = 69
While the trend is upward, the differences show no obvious pattern. Therefore, additive model is
appropriate.
Data set 2.

The differences are:


2010: 48 – 24 = 24
2011: 66 – 32 = 34
2012: 96 – 36 = 58
As the trend is upward and the differences are increasing, the multiplicative model should be
appropriate.
Example 5 (Continuation of Example 4)
Using the sales revenue data and the trend calculated in the previous example find the quarterly
seasonal variation using the additive model.
Solution:
To find seasonal variations we need both the observations and trend values from the previous
example.

Having subtracted the trend values (T) from the time series values (Y), we must arrange the
differences (i.e., seasonal variations) such that all seasonal variations for similar quarters are in
the same column.

The final seasonal variations are


Quarter1 Quarter1 Quarter3 Quarter4
9 24 13 28
Note:
􀁸 to obtain the average, divide the totals by the number of seasonal variations in the respective
column. In the case above, the totals have been divided by 3 since each column has three
seasonal variations. In some cases, the numbers will differ from column to column.
􀁸 the adjusted seasonal variations must be given be given to the same accuracy as the original
data.
Seasonally Adjusted or Deseasonalized data
Most economic and business time series are published seasonally adjusted i.e., with seasonal
variations removed.
The additive model
For additive model, seasonally adjusted values are obtained by subtracting the adjusted seasonal
variations from respective time series values (Actual).

example, for 1st Quarter 2010, the seasonally adjusted value is 79 – 9 = 70 i.e., Ksh 70 million,
and for 2nd Quarter, 2010 is 48 – (-24) = 72 i.e., Ksh 72 million.
The Multiplicative model
In the case of the multiplicative model, seasonally adjusted values are obtained by dividing the
time series values by the respective adjusted seasonal variations:

Adjusted

Example 6 (Continuation of Example 4)


Using the sales revenue data, the trend and seasonal variations calculated in the previous
examples, seasonally adjust the sales revenue for 2013 (using the additive model).
Solution:
We need to subtract the average seasonal variations from the 2013 sales revenues
These are the ‘sales that the company would have made in each quarter of 2013 if it were not for
the effects of seasons. seasons tend to bring the sales down.
16.6 FORECASTING
To obtain forecasts, it is necessary to project/extrapolate the trend. Projected/extrapolated trend
values are obtained based on the method employed to find the trend.
Using least squares method:
􀁸 Extend the x-coding to the period whose forecast is sought.
􀁸 Substitute the appropriate x-code in the least squares equation to obtain the trend estimate.
Using moving average method:
􀁸 Find the average trend increase (or decrease) i.e.

􀁸 Add the average trend increase to the last trend values until the required trend estimates are
obtained.
To forecast future values, either add the projected trends to the respective adjusted seasonal
variations (for additive model) or multiply the projected trends with the respective seasonal
variations (for multiplicative model).
Example 7 (Continuation of Example 6)
Using the sales revenue data, the trend and seasonal variations calculated in the previous
examples, forecast the sales revenue for each quarter of 2014 (using the additive model).
Solution:
We first find the average quarterly increase in trend. The average trend increase is (Last trend,
131.8 – first trend, 77.8) divided by number of increments (12 – 1) where 12 is the number of
trends.
Since the last trend, 131.8, corresponds to the Qtr 2, 2013, to find the trend estimate for the first
quarter, Qtr1, of 2014, we need to add 4.9 three times to the 131.8. The projected trend value is
given by

For the remaining quarters of 2014, the projected trend values are:

We proceed to obtain the forecast for each quarter by adding the adjusted seasonal variations as
shown earlier.

Hence, our forecasts for 2014 are: 1st Quarter – Ksh 156 million, 2nd Quarter – Ksh 127 million,
3rd Quarter – Ksh 143 million, and 4th Quarter – Ksh 189 million.
Note
The forecasts assume that there is a linear trend, and that the projection of a linear trend reflects
the future.
The seasonal variations are also assumed to be stable. However, if these assumptions are not
true, then our forecasts are not correct.
Example 8:
The owner of Zathu, a popular restaurant in Lilongwe wishes to study the patterns of customer
numbers for the days of the week in order to be able to forecast activities for the coming days.
He then gathers data on patronage over three weeks as follows.
a) Calculate the trend by using the method of moving averages.
b) Calculate the adjusted seasonal variations assuming the additive model.
c) Forecast the number customer for Monday and Tuesday of Week 4.
d) Calculate the adjusted seasonal variations assuming the multiplicative model.
e) Forecast the number of customers for Monday and Tuesday of Week 4.
Solution:
a) Trend using moving average:
Since the time series is of period 5 and 5 is an odd number, simple 5-point moving averages are
required for the trend. We will add the data values in fives, place the total alongside the median
position and then divide each moving total by 5.

b) Seasonal variations, SV using additive model


Seasonal variation,
The seasonal variations are: Monday: 12 customers, Tuesday: -23 customers, Wednesday: -30
customers, Thursday: -3 customers, and Friday: 44 customers.

c) Forecasting using additive model

d) Seasonal variation, SV, using the multiplicative model


Seasonal variations for multiplicative model are obtained by dividing the time series data values
by the trend values
Averaging the SVs: We arrange in a table as before and average them to sum to 5 (the period)

The seasonal variations are:


Monday: 1.112 (or 111.2%),
Tuesday: 0.793 (or (79.3%),
Wednesday: 0.714 (or 71.4%),
Thursday: 0.971 (or 97.1%), and
Friday: 1.41 (or 141%)
e) Forecasting using the multiplicative model
We find the trend projections (i.e. extrapolate trend values) as before. However, the forecasts are
obtained by multiplying the trend estimates by the seasonal variations.

Note
Unlike the moving average method, if the least squares method is used all times point will have
trend values. The procedures for obtaining seasonal variations and forecast are the same as in
moving average method.
ASSIGNMENT 1
1. Briefly describe the components which make up a typical time series
2. The daily output of Mutiko Ltd over a four-week period is shown in the table below:

a) Find the trend by five-point moving averages


b) Display on the same graph the actual data together with the trend figures
c) Determine the daily deviations from the trend and use these to determine the average
adjusted daily variations
d) Forecast the daily output for the all days of week 5 to the nearest unit of production
3 a) Distinguish between the ‘additive model’ and the ‘multiplicative model’ in time-series
analysis.
b) The following set of data represents a mining company’s quarterly production levels (y), in
thousands of tonnes over 3 years:
i. Calculate a centered four-point moving average trend
ii. Using the multiplicative model and the trend estimated in (i), estimate the seasonal factors in
each quarter (to 3 decimal places)
iii. Use the trend estimated in (i) and the seasonal factors estimated in (ii) to forecast the
company’s production in all 4 quarters of 2014 (to the nearest whole numbers).
iv. Comment on the likely accuracy of your forecasts in (iii).
4 The consumer price index (CPI) for a village is shown quarterly over three years in following
table.

a) Find the least squares linear trend line. Use the equation to find the trend values for each
quarter for 2010 to 2012.
b) Using the additive model and the trend from part (a), estimate the average seasonal variations
in each quarter (to two decimal places).
c) Deseasonalise the CPI values for 2011.
d) Use your results in (a) and (b) to forecast the CPI for the four quarters of 2013 (to the nearest
whole number). Suggest two reasons why your forecast may not be reliable.
5 The planning department of Bata Shoe has developed the following least squares trend
equation for sales, in thousands of pairs, based on five years quarterly data from 2009.

The following table gives the seasonal variations (SV) for each quarter.

Forecast the sales for each quarter of 2014.


6 A shop is open every day except Fridays and Sundays. The number of customers visiting the
shop each day for three weeks is show below;

a) Find a five-day moving average trend


b) Using the multiplicative model, estimate the seasonal factors for each of the five days.
c) Seasonally adjust the number of customers for the days from week 1 to week 3.
d) Forecast the number of customers for each day of the fourth week.

You might also like