You are on page 1of 36

UNIT 10

TREND COMPONENT ANALYSIS

Structure
10.1 Introduction Exponential Smoothing

Expected Learning Outcomes


10.6 Estimation of Trend
10.2 Introduction to Time Series Component Using Method
of Least Squares
10.3 Components of Time series
Linear Trend
Trend Component
Quadratic Trend
Seasonal Component
Exponential Trend
Cyclic Component
10.7 Estimation of Trend
Irregular Component
Component Using Moving
10.4 Basic Models of Time Series Average
Additive Model 10.8 Summary
Multiplicative Model 10.9 Terminal Questions
10.5 Smoothing Time Series 10.10 Solution /Answers
Simple Moving Average

Weighted Moving Average

10.1 INTRODUCTION
Most of the data used in statistical analysis is collected at one point of time
such type of data is called cross-sectional data. In cross-sectional data, we
collect information about different individuals/subjects at the same point of
time or during the same time. For example, data related to learners pursuing
the MSCAST programme in July 2023 such as name, qualification, age,
address, marks in graduation, etc., production of milk, import and export,
information on the household income of New Delhi residents, etc. For such
type of data, we just describe the status of the group at a point. For example,
for the data related to the income of families living in New Delhi, we just find
the average income, number of families below the poverty line, etc. but we do
not find whether the income increasing or decreasing.
There are so many situations where we collect data over time. For example, in
business, we observe daily sales, weekly interest rates, and daily closing stock
prices. In meteorology, we observe daily high and low temperatures and
9
* Dr. Prabhat Kumar Sangal, School of Sciences, IGNOU, New Delhi
Block 3 Time Series Analysis
hourly wind speeds. In agriculture, we record annual figures for crops and
quarterly production, In the biological sciences, we observe the electrical
activity of the heart at millisecond intervals, etc. Such types of data are called
time series data. A time series is a set of numeric data of a variable that
is collected over time at regular intervals and arranged in chronological
(time) order.
In this unit, we shall discuss what a time series is and what are its
components. In Sec. 10.2, we discuss what is time series with various
examples. The components of a time series are described in Sec. 10.3. In
Sec. 10.4, we explore different basic models of time series which show the
relationships among the various components of a time series. To see better
patterns of the time series, we describe the methods of smoothing or filtering
such as simple and weighted moving averages, and exponential smoothing in
Sec. 10.5. Sec. 10.6 and 10.7 are devoted to estimation of trend effects using
the method of least squares (curve fitting) and moving average, respectively.
In the next unit, you will learn various methods of estimating other components
of a time series.
Expected Learning Outcomes
After studying this unit, you would be able to
 explain what the time series is;
 describe the components of time series;
 explain the basic models of time series;
 decompose the time series into different components for further analysis;
 describe smoothing techniques for forecasting models, including, simple
moving average, weighted moving average, and exponential smoothing;
and
 explain various methods for the estimation of the trend.

10.2 INTRODUCTION TO TIMES SERIES


A time series is a collection of observations made sequentially through time. In
other words, the data on any characteristic collected with respect to time
over a span of time periods is called a time series. Normally, we shall
assume that observations are available at equal intervals of time e.g., yearly,
monthly, daily, hourly, etc. Some time series cover a period of several years.
The time series data are collected in most of the fields, ranging from
economics to engineering. For example, in business, the time series data
gathered such as daily sales, daily closing stock prices, price of an item, in the
meteorological department, daily high and low temperatures, hourly wind
speed, in agriculture, annual figures for crops and yearly production, soil
erosion, In the biological sciences, the electrical activity of the heart at
millisecond intervals, brain monitoring (ECG), in ecology, the abundance of an
animal species. In medicine, blood pressure tracking, weight tracking,
cholesterol measurements, heart rate monitoring, etc.
There are two main goals in analysing a time series:
10 • First, one may want to describe or summarise the key features of the
Unit 10 Trend Component Analysis

time series data, and


• Second, to predict what will happen in future based on past data (this is
called forecasting). Forecasting
Time-series forecasting
For example, meteorologists forecast future weather conditions based on past
is a method for
observations, the milk production company forecasts the future demand of
predicting future values
milk on the sales of milk on past days, business decision makers predict future over a period or at a
sales, etc. Due to several special features of time series, we require different precise point in the
techniques to analyse and model the time series data for the forecast. Time future using historical
series analysis is the art of extracting meaningful insights from time series and present data.
data by exploring the series' structure and characteristics and identifying
patterns that can then be utilized to forecast future events of the series.
Time series analysis assumes that data values of a time series variable are
determined by four underlying environmental forces that operate both
individually and collectively over time. They are trend (T), seasonal variations
(S) cyclic variations (C) irregular (random) variations (I). These are called
components of time series.

10.3 COMPONENTS OF TIME SERIES


The time series data do not remain constant over time while there is a
variation in the values of the data. For example, the manager of a company
collected the quarterly data of sales of a commodity for the period 2014-2020
which is given as follows:
Year Quarter 1 Quarter 2 Quarter 3 Quarter 4
2014 18 8 12 9
2015 5 8 4 11
2016 4 10 14 18
2017 24 23 27 30
2018 35 32 30 38
2019 32 35 30 24

From the above data, we see that the sales of the commodity vary with time
(quarterly and yearly). The variation occurs because of the effects of the
various forces (such as seasons) at work, commonly known as components of
time series.
In the past when we analysed the time series, then we assumed that data
values of a time series variable are determined by four underlying
environmental forces that operate both individually and collectively over time.
They are: (i) Trend (ii) Seasonal (iii) Cyclic and (iv) Remaining variation
attributed to Irregular fluctuations (sometimes referred to as Random
component).

Time Series

Irregular or
Long term or Seasonal Cyclic
Random
Trend Component Component Component
Component
11
Block 3 Time Series Analysis
This approach is not necessarily the best one and we shall discuss the
modern approach in later units. Some or all the components are present in
varying amounts and can be classified into the mentioned four categories. We
shall now discuss these components in more detail one at a time.
10.3.1 Trend Component
Usually, time series data show random variation, but over a long period of
time, there may be a gradual shift in the mean level to a higher or a lower
level. This gradual shift in the level of time series is known as the trend. In
other words, the general tendency of values of the data to increase or
decrease during a long period of time is called the trend.
When time series values are plotted on a graph and the values show an
increasing or decreasing (on an average) pattern during a long period with
reference to the time, then the time series is called the time series with a trend
effect. The time series may show different types of trends.
Time Series with Upward Trend
When a time series values are plotted on a graph and the values are
increasing or showing an upward pattern (as shown in Fig. 10.1) with
reference to the time then the time series is called the time series with an
upward trend. For example, upward tendencies are seen in the data of
population growth, currency in circulation, prices of petroleum products in
India, number of passengers in the metro, literary rate, GDP of a country, etc.
We plot a time series graph (Fig. 10.1) of the GDP of a country from 2011 to
2020 that shows an upward trend.

Y
82

72

62
GDP

52

42

32 X
2011 2012 2013 2014 2015 2016 2017 2018 2019 2020
Year

Fig. 10.1: GDP of a country from 2011 to 2020.

Time Series with Downward Trend


When a time series values are plotted on a graph and the values decrease or
show a downward pattern (as shown in Fig. 10.2) with reference to the time
then the time series is called the time series with a downward trend. For
example, the downward trend is seen in the data of death rate, birth rate,
number of landline phones, etc. The death rate of a country from 2012 to 2022
12 is showing a downward trend as shown in Fig. 10.2.
Unit 10 Trend Component Analysis

8.5

7.5
Death rate

6.5

5.5

4.5 X
2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022
Year

Fig. 10.2: Death rate of a country from 2012 to 2022.

Time Series with No Trend


It is to be noted that all time series do not show an increasing or decreasing
trend. In some cases, the values of time series fluctuate around a constant
reading and do not show any trend with respect to time. Therefore, if a time
series data is plotted on a graph paper and does not show any trend that is
there is neither an upward nor a downward trend reflected in the time series
plot then this kind of time series is called a time series with no trend. For
example, the yield of a crop in a particular area from 2002 to 2021 shows no
trend as shown in Fig. 10.3.

Y
4.0
3.5
3.0
2.5
2.0
Yield

1.5
1.0
0.5
0.0
-0.5
-1.0 X

Year

Fig. 10.3: Yield of a crop in a particular area from 2002 to 2021.

This should be clearly understood that a trend is general, smooth, long term
and the average tendency of a time series data. The increase or decrease
may not necessarily be in the same direction throughout the given period. The
tendency of a time series may be found in either the form of a linear or a
nonlinear (curvy linear) trend. If the time series data is plotted and the points
on the graph cluster more or less around a straight line, then the tendency
shown by the data is called a linear trend in time series. Similarly, if the points
plotted on the graph do not cluster more or less around a straight line, then the
tendency shown by the data is called a nonlinear or curvilinear trend. Trends
are also known as long-term variations. The long-term or long period of time 13
Block 3 Time Series Analysis
is a relative term which cannot be defined. In some cases, a period of one
week may be long while in some cases a period of 2 years may not be
enough. Some of the more important causes of long-term trend movements in
a time series include population growth, urbanisation, technological
improvements, economic advancements and developments, and consumer
shifts in habits and attitudes.
10.3.2 Seasonal Component
In a time series, the variations which occur due to the rhythmic or natural
forces and operate in a regular and periodic manner over a span of less than
or equal to one year are termed as seasonal variations. We generally think
of seasonal movement in time series as occurring yearly, but it can also
represent any regularly repeating pattern that is less than one year in duration.
For example, daily traffic volume data show within-day seasonal behaviour,
with peak levels occurring during rush hours, moderate flow during the rest of
the day, and light flow from midnight to early morning. Thus, in a time series,
seasonal variation may exist if data are recorded quarterly, monthly, daily and
so on. Even though the data may be recorded over a span of three months,
one month, a week or a day, the amplitudes of the seasonal variation may be
different. Most of the time series data of economic or business fields show the
seasonal pattern. For example, the number of farming units (such as ploughs
and tractors) sold quarterly for the period 2019 to 2022 shows a seasonal
effect as shown in Fig. 10.4.

Y
75

70

65

60

55

50

45

40 X

2019 2020 2021 2022


Year

Fig. 10.4: Quarterly sales of farming units.

The seasonal pattern existing in a time series may be either due to natural
forces or man-made conventions.
Seasonal Variations due to Natural Forces
Variations in time series that arise due to changes in seasons or weather
conditions and climatic changes are known as seasonal variations due to
natural forces. For example, sales of umbrellas and raincoat increase very fast
14 in the rainy season, the demand for air conditioners goes up in the summer
Unit 10 Trend Component Analysis
season, and the sale of woollens go up in winter all being operated by natural
forces.
Seasonal Variation due to Man-Made Conventions
Variations in time series that arise due to changes in fashions, habits, tastes,
and customs of people in any society are called seasonal variations due to
man-made conventions. For example, in our country sales of gold and clothes
go up in marriage seasons and festivals.
10.3.3 Cyclic Component
Apart from seasonal effects, some time series exhibit variation due to some
other physical causes, which is called cyclic variation. Cyclic variations are
wave-like movements in a time series (as shown in Fig. 10.5), which can vary
greatly in both duration and amplitude. Cyclical variations are recurrent
upward or downward movements in a time series, but the period of a cycle is
greater than a year whereas this period is less than one year in seasonal
variation. Cyclic and seasonal variations are seen as similar, but they are quite
different. If the variations are not of a fixed period, then they are cyclic and if
the period is constant and associated with some aspect of the season, then
the pattern is seasonal. In general, the average length of cycles is longer than
the length of a seasonal pattern, and the magnitude of cycles tends to be more
variable than the magnitude of seasonal variations.
The cyclic variation in a time series is usually called the “Business cycle”
and comprises four phases of business i. e. prosperity (boom), recession,
depression, and recovery.
Prosperity (boom)
The prosperity of any business is its profit. During a period of boom,
businessmen and industrialists invest more and the economy surpasses the
level of full employment and the level of production increases. These
incentives make them produce more and therefore profit more.
Recession
When there is excessive expansion, then it results in diseconomies that make
it difficult to keep up with large-scale production. Additionally, it causes greater
prices, rising salaries, and additional shortages. In an economic cycle, this is
referred to as a recession.
Depression
In this phase of the economic cycle, output, income, and employment all start
to drop rapidly. Also, investments decrease, and businesses are demoralised.
Thus, it leads to pessimism which leads to deflation and depression.
Recovery
The depressive phase does not last forever. After some time, there is a cooling
down and the improvement of trade begins. During the recovery period, old
debts are repaid, and the units which are weaker are settled. As a result, the
unemployment rate is gradually declining over time and income is generated.

These four phases of a business cycle i. e. prosperity (boom), recession,


depression and recovery are shown in Fig. 10.5.
15
Block 3 Time Series Analysis

Fig. 10.5: Business cycle and its phases.

10.3.4 Irregular Component


Apart from these regular variations, long-term and short-term variation,
random or irregular factors which are not accounted for trend, seasonal or
cyclic variations, exists in almost all time series. The variations in a time series
which do not repeat in a definite pattern are called irregular variations or
irregular component of a time series. The irregular variations in a time series
may be either due to unforeseen one-off events such as natural disasters
(floods, droughts, fires) or man-made disasters (strikes, boycotts, accidents,
war, riots).
Since occurrences of irregular variations are totally unpredictable and follow
no specific pattern, therefore, we cannot think of their time of occurrence,
direction, and magnitude. In the latter units, we shall try to explain it by
probability models such as autoregressive (AR) and moving average (MA)
models, etc.

As we have discussed all four components which affect individually as well as


jointly to the time series. Now, let us take an example of quarterly data of sales
of a commodity for the period 2014-2019 given in the following table:

Year Quarter 1 Quarter 2 Quarter 3 Quarter 4

2014 18 8 12 9

2015 5 8 4 11

2016 4 10 14 18

2017 24 23 27 30

2018 35 32 30 38

2019 32 35 30 24

We plot the time series data by taking sales on the Y-axis and the quarters on
16 the X-axis. We get the time series plot as shown in Fig. 10.6.
Unit 10 Trend Component Analysis

Fig. 10.6: Trend, Cycles and Seasonal variation in quarterly sales.

The plot shows more clearly the presence of different components in the time
series data. The plot also shows seasonal as well as cyclic effects. If we draw
a free-hand line to show the approximate movement of a curve around the
line, then this line shows the presence of a long-term linear trend.
All time series need not necessarily exhibit all four components. For example,
the time series data of annual production of a yield does not have seasonal
variations and similarly, a time series for the annual rainfall does not contain
cyclical variations.
Before moving to the next section, you can try the following Self Assessment
Question for better understanding.

SAQ 1
What is time series? Describe its components.

10.4 BASIC MODELS OF TIME SERIES


In the previous section, we discussed different types of factors which affect the
time series. In this section, we shall discuss the commonly used mathematical
models which explain the time series data reasonably well. The basic models
show the functional relationship among the various components of a time
series. While discussing these models, we shall use the notation Yt for the
value of the time series at the time t. The following are the basic time series
models:
10.4.1 Additive Model
The additive model is one of the most widely used models. The additive model Since in time series, we
assumes that at any time t the time series value Yt is the sum of all four have measured values of
components. According to the additive model, the value of a time series a variable over time,
therefore, we use “t” as
variable can be expressed as
a subscript in the
Yt = Tt + Ct + St + It variable of time series
models.
where, Tt, Ct, St and It are the trend, cyclic, seasonal and irregular variations at
time t, respectively. In this model, it is assumed that cyclic effects remain 17
Block 3 Time Series Analysis
constant for all cycles and the seasonal effects remain constant during any
year or corresponding period. In this model, it is also assumed that irregular
variation is an independent identically normally distributed variable with mean
0, i.e. the irregular variation effect remains constant throughout. Obviously, the
additive model implies that seasonal variations in different years, cyclic
variations in different cycles and irregular variations in different trends show
equal absolute effects irrespective of the trend value.
10.4.2 Multiplicative Model
In the additive model, we have assumed that a value of a time series variable
is the sum of the trend, cyclic, seasonal, and irregular components but this
model is based on the assumption that cyclic effects remain constant for all
cycles and the seasonal effects remain constant during any year or
corresponding period. However, there are several situations where the
seasonal variations exhibit an increase or decrease trend over time. When
seasonal variations exhibit any change over time in terms of an increasing or
decreasing trend, we can try the multiplicative model. In other words, if the
various components in a time series operate proportionately to the general
level of the series, the multiplicative model is appropriate. The multiplicative
model is formed with the assumption that the time series value Yt at time t is
the product of the trend, cyclic, seasonal and irregular components of the
series. Symbolically, the multiplicative model can be described as.
Yt = Tt × Ct × St × It

where, Tt, Ct, St and It denote the trend, cyclic, seasonal and irregular
variations. The multiplicative model is really a multiplicative version of the
additive model. This model is found appropriate for many business and
economic data. For example, the time series of the production of electricity,
the time series of the number of passengers who opted the air travelling, the
time series of the consumption of soft drinks, etc.
You can try the following Self Assessment Question for better understanding.

SAQ 2
What is the difference between additive and multiplicative models?

10.5 SMOOTHING TIME SERIES


For the estimation of trend and seasonal effects, it is very important to smooth
out (or filter out) the effect of irregular fluctuations of time series so that the
effects of trend and seasonal components can be easily estimated. Smoothing
helps us to see better patterns of the time series such as trend. Generally
smoothing smooths out the irregular roughness to see a clearer trend.
Smoothing techniques are based on averaging values over multiple periods to
reduce irregular fluctuations. Since these techniques “smoothing out” the
short term/irregular fluctuations from the time-series data, therefore, they are
called smoothing techniques. After smoothing out the short-term fluctuation,
we can estimate and forecast and trend effect. They manage the data in the
sense that we can estimate time series components directly from the data
18 without a predetermined structure. In this section, we shall discuss two simple
Unit 10 Trend Component Analysis

and important smoothing methods for the time series data namely moving
averages and exponential smoothing methods.
10.5.1 Simple Moving Average
The moving average (MA) is the simplest method for smoothing time series
data. A moving average removes irregular fluctuations and short-term
fluctuations from a time series. This method is based on averaging each
observation of a series with its surrounding observations, that is, past and
future observations in chronological order. In this method, we find the simple
moving averages of time series data over m span/period of time, and these
averages are called m-period moving averages. These averages are
smoothed versions of the original time series. In this method, we put the
average on the middle value of the set of observations, therefore, we explain
the moving average for old and even periods as follows:
When m is odd
In some situations, the data may show seasonal effects over an odd period of
time, e.g., 5 days, 7 months, etc. It means that after every 5 days or 7 months,
data behave in a similar manner. Therefore, to remove the seasonal effects
from the time series, we calculate the moving average of an odd span/period
of time, in our example, it is 5 days or 7 months. For odd periods, the method
consists of the following steps:
Step 1: We calculate the average of the first m values of the time series and

place it against the middle value, i.e.,


(m + 1) th observation. For
2
example, if m = 3, we compute the average of the first three
observations of the time series as

y1 + y 2 + y 3
MA1 =
3
where y1, y 2 and y 3 are the first three observations of the time series.

and place it against the


(m + 1) th observation, i.e., ( 3 + 1) th = 2nd
2 2
observation (y2).
Step 2: We discard the first observation and include the next observation.
Then we take the average of m values again. For example, if m = 3,
we discard the first observation and determine the average of the
second, third and fourth observations and place it against the middle
of the second, third and fourth observations, that is, in front of 3rd
observation.
Step 3: We repeat this process until all data are exhausted. These steps
provide us with a new time series of m-period moving averages which
will be smoother than the original time series.
When m is even
Sometimes, there may be a seasonal effect over an even period, e.g.,
quarterly or yearly, etc. This means that after every fourth quarter or 12
months, data behave in a similar way. Since there is no centre of these four
observations, therefore, the simple moving averages for even periods need to 19
Block 3 Time Series Analysis
be centred. So, it is also known as centred moving averages. If we take a
centred moving average with m = 4 then it will filter (or eliminate) the effect of
the season by a quarter. This method consists of the following steps:
Step 1: We calculate the average of the first m values of the time series and
m
place it against the middle value, i.e., . For example, if m = 4, we
2
compute the average of the first four observations and place it
against the middle of the second and third observations.
Step 2: We discard the first observation and include the next observation and
then take the average of the next m observations again. For
example, if m = 4, we discard the first observation, find the average
of the second, third, fourth and fifth observations and place it against
the middle of the third and fourth observations. We repeat this
process until all data are exhausted as shown in Example 2.
Step 3: Since the period (m) is even and there is no exact midpoint, so we
cannot put the MA corresponding to any year. Therefore, we
determine the centred moving average. To determine the first
centred moving average, we compute the average of the first two
moving averages and place it against the middle value of the two
moving averages. For example, if m = 4, we calculate the average of
the first two moving averages and place it against the middle of the
first and second moving averages, i.e., against the third observation.
Step 4: We repeat this process until all data are exhausted.

Note: The moving average eliminates periodic variations if the span of the
period of the moving average (m) is equal to the period of the oscillatory
variation. Therefore, we should choose m which constitutes a cycle, for
example, if a cycle is completed in 3 months, we should calculate exactly 3
monthly moving averages. If there is a variation in the span of cycles, for
example, suppose, the first cycle is completed in 3 months, the second in 3
months and the third in 5 months and so on then we should use the average of
these time spans as m.
Let us take an example to explain the procedure of the moving average
method.
Example 1: The following table shows the number of fire insurance claims
received by an insurance company in each four-month period from 2018 to
2021:

Year 2018 2019 2020 2021

Period I II III I II III I II III I II III

No. of
17 13 15 19 17 19 22 14 20 23 19 20
Claims

Calculate and plot the three-period and five-period moving average series for
the number of fire insurance claims. Compare these two moving average
series.
Solution: Since m = 3 is odd, therefore, we take the average of the first three
observations and put the same in the middle of these observations, that is, in
20 front of the second observation. The first value of m = 3 years moving average
Unit 10 Trend Component Analysis
17 + 13 + 15
is the average of 17, 13 and 15 which equals to = 15 and we put
3
this value in front of II period of 2018. The second value of moving averages is
obtained by discarding the first observation i.e. 17 and including the next
observation, that is, 19, this gives an average of 13, 15 and 19, which is equal
13 + 15 + 19
to = 15.67 . And we put it against the third observation, that is III
3
period of 2018. We repeat the same procedure of calculating three-period
moving averages until all data are exhausted. Similarly, we can find the five-
period moving averages by following the same procedure of three-period
moving averages, that is, we calculate the average of the first five
observations 17, 13, 15, 19 and 17 and put the same in front of the third
period. We calculate the rest of the moving averages in the following table:
No. of
Year Period 3-period MA 5-period MA
Claims

I 17 --- ---

17 + 13 + 15 ---
2018 II 13 = 15.00
3
13 + 15 + 19 17 + 13 + 15 + 19 + 17
III 15 = 15.67 = 16.20
3 5
15 + 19 + 17 13 + 15 + 19 + 17 + 19
I 19 = 17 17 = 16.60
3 5
19 + 17 + 19 15 + 19 + 17 + 19 + 22
2019 II 17 = 18.33 = 18.40
3 5
17 + 19 + 22 19 + 17 + 19 + 22 + 14
III 19 = 19.33 = 18.20
3 5
19 + 22 + 14 17 + 19 + 22 + 14 + 20
I 22 = 18.33 = 18.40
3 5
22 + 14 + 20 19 + 22 + 14 + 20 + 23
2020 II 14 = 18.67 = 19.60
3 5
14 + 20 + 23 22 + 14 + 20 + 23 + 19
III 20 = 19.00 = 19.60
3 5
20 + 23 + 19 14 + 20 + 23 + 19 + 20
I 23 = 20.67 = 19.20
3 5

2021 23 + 19 + 20 ---
II 19 = 20.67
3

III 20 --- ---

From the above table, we observed that the original series varies between 13
and 22 whereas moving averages vary between 15 and 20.67 (3-period) and
16.20 to 19.60 (5-period) which are much smoother than the original series.
The moving averages fluctuate less than the fluctuation of the original
observations which are calculated as they smooth (or filter out) the effect of
seasonal/irregular components. This helps us to appreciate the effect of the
trend more clearly.

We now plot the original observations with both the 3-period and 5-period MA
values by taking them on the Y-axis and the period on the X- axis as shown in
Fig. 10.7.
21
Block 3 Time Series Analysis

Y
24 3-period MA 5-period MA
Original data
22

20

No. of Claims
18

16

14

12

10 X
I II III I II III I II III I II III
2018 2019 2020 2021
Period

Fig. 10.7: Insurance claims data with 3 and 5- period moving averages.

From a comparison of the line plots of the 3-period and 5-period moving
average values, we can see that there is less fluctuation (greater smoothing)
in the 5-period moving average series than in the 3-period moving average
series.
Therefore, we can conclude that the term, m, for the moving average affects
the degree of smoothing:
• A shorter period (m) of the moving average produces a more jagged
moving average curve.

• A longer period (m) of the moving average produces a smoother moving


average curve.

Now the problem is what should be the value of m. If m is increased then the
series becomes much smoother and it may also smooth out the effect of
cyclical and seasonal components, which are our main interest of study. To
take away seasonality from a series, we would use a moving average with a
length equal to the seasonal span. Thus, in the smoothed series, each
smoothed value has been averaged across all seasons. Sometimes 3-year, 5-
year or 7-year moving averages are used to expose the combined trend and
cyclical movement of time series.
The moving average can also be utilised as a forecasting model with some
simple steps. In simple moving average, we put the moving average at the
centre of the set of m observations as you have seen in Example 1 and we
have put the average of 17, 13 and 15 which equals 15 against the Period II of
2018. It means we forecast the value of the Period II of 2018. And for that, we
use both the past (observation of period I) and future (observation of period III)
of a given time point. In that sense, we cannot use moving averages as such
forecasting because, at the time of forecasting, the future is typically unknown.
Hence, for the purpose of forecasting, we use trailing moving averages. In
this method, we take an average of past consecutive m observations of the
series as follows:

y t + y t −1 + ... + y t −m+1
y′t +1 =
22 m
Unit 10 Trend Component Analysis
where y′t +1 is the forecast value of y t +1 . For example, if m = 3, we compute the
first forecast value by taking the average of the first three values as
y 3 + y 2 + y1
y′4 =
3
Furthermore, only the first forecast value is constructed by averaging only the Forecast Error
actual values of the series. As we move to the second forecast, the actual The error of an
values are replaced with the previously forecasted values. For instance, the individual forecast is the
difference between the
second forecast value is defined by the following expression:
actual value and the
y′t +1 + y t + y t −1 + ... + y t −m+ 2 forecast of that value. If
y′t + 2 = are the actual
m
and forecast of that
For example, if m = 3, we compute the second forecast value as value values at time t,
respectively then
y′4 + y 3 + y 2 forecast error can
y′5 =
3 defined as

If the forecast value for y t is y′t , then we can calculate the forecast error as

e=
t y t − y′t

10.5.2 Weighted Moving Average


The simple moving average described in the previous sub-section is not
generally recommended for measuring trend, although it can be useful for
removing seasonal variation. In simple moving averages, we give equal
importance to all observations, therefore, we assign equal weights but
sometimes we may observe that a certain time period has more importance in
comparison to the others. For example, a forecaster might believe that the
previous month’s value is two times as important in forecasting as other
months. Therefore, a moving average in which some time periods are
weighted differently than others is called a weighted moving average (WMA).
Generally, more weights are assigned to the recent observations and less to
past observations in the weighted moving average. We assign weights in such
a way that all weights are positive. If wi denotes the weight assigned to the ith
observation (i = 1, 2, ..., m) then we can compute the first weighted moving
average (WMA) as follows:
w1y1 + w 2 y 2 + ... + w m ym
WMA1 = such that w i ≥ 0
w1 + w 2 + ... + w m
The procedure for getting the smooth trend values by the weighted moving
average is the same as that for the simple moving average in spite of weights.
Therefore, we find the weighted average instead of the simple average in the
weighted moving average.
Let us take an example to illustrate this method.
Example 2: Compute 4-month weighted moving average for the number of fire
insurance claims data given in Example 1 using weights 1,1,2 and 4.

Solution: Here, the weights are given as


w1 1,=
= w 2 1,=
w 3 2,=
w4 4

Thus, we can find the first weighted moving average as 23


Block 3 Time Series Analysis
w1y1 + w 2 y 2 + ... + w m ym 1× 17 + 1× 13 + 2 × 15 + 4 × 19
=WMA1 = = 17.00
w1 + w 2 + ... + w m 1+ 1+ 2 + 4
In a similar way, you compute the rest weighted moving averages. Since
period (4) is even, therefore, we put the first WMA in the middle of the second
and third observations. For that, we create blank rows after each observation.
Also, we determine the centred moving average by averaging the first two
WMAs and placing it against the middle value, i.e., we calculate the average of
the first two WMAs and place it against the middle of the first and second
moving averages, i.e., against the third observation. We show these in the
following table:

No. of Centred 4-period


Year Period 4-period WMA
Claims WMA

I 17

II 13

2018 1× 17 + 1× 13 + 2 × 15 + 4 × 19
= 17.00
1+ 1+ 3 + 4
17 + 16.75
III 15 = 16.88
2
1× 13 + 1× 15 + 2 × 19 + 4 × 17
= 16.75
1+ 1+ 2 + 4
16.75 + 18
I 19 = 17.38
2
1× 15 + 1× 19 + 2 × 17 + 4 × 19
= 18.00
1+ 1+ 2 + 4
18 + 20.25
II 17 = 19.13
2
2019
1× 19 + 1× 17 + 2 × 19 + 4 × 22
= 20.25
1+ 1+ 2 + 4
20.25 + 17
III 19 = 18.63
2
1× 17 + 2 × 19 + 3 × 22 + 4 × 14
= 17.00
1+ 1+ 2 + 4
17 + 18.63
I 22 = 17.81
2
1× 19 + 1× 22 + 2 × 14 + 4 × 20
= 18.63
1+ 1+ 2 + 4
18.63 + 21
II 14 = 19.81
2
2020
1× 22 + 1× 14 + 2 × 20 + 4 × 23
= 21.00
1+ 1+ 2 + 4
21 + 19.5
III 20 = 20.25
2
1× 14 + 1× 20 + 2 × 23 + 4 × 19
= 19.50
1+ 1+ 2 + 4
19.5 + 20.13
2021 I 23 = 19.81
24 2
Unit 10 Trend Component Analysis

1× 20 + 1× 23 + 2 × 19 + 4 × 20
= 20.13
1+ 1+ 2 + 4

II 19

III 20

After understanding the moving average as a smoothing and forecast


technique, we now discuss the merits and demerits of the moving average.
Merits

1. It is simple as compared to the other method (the exponential method


discussed in the next section).

2. A moving average time series is a smoother series than the original time
series values. It has removed the effect of short-term fluctuations (i.e.
seasonal and irregular fluctuations) from the original observations by
averaging over these short-term fluctuations.

3. If the moving average period coincides with the period of cyclical


variations, the moving average method eliminates the regular cyclical
fluctuations. Even if the variations are not eliminated, it reduces their
intensity.

4. The method is very flexible in the sense that the addition of a few more
figures to the data simply results in a few more trend values without
affecting the previous calculations.

5. The method is suitable for determining trend when a linear trend is


present in the time series.

Demerits

1. As seen from the moving average calculations, its primary drawback is a


loss of information (data values) at both ends of the original time series.
However, this is not a significant drawback if the time series is long, say
50 time periods or more.

2. If a series consists of a non-linear trend, a moving average will not reveal


the trend present.

3. The selection of the extent or period of the moving average is quite


difficult particularly when the time series data exhibit cycles which are not
regular in period and amplitude. The effect of an inappropriate selection of
the extent or period is that moving averages may generate cycles or other
movements which were not present in the original data.

4. The moving averages are greatly affected by extreme values. To


overcome this somewhat, a weighted moving average with appropriate
weights is used.

Before moving to the next method of smoothing, i.e., exponential smoothing,


you can try the following Self Assessment Question for better understanding. 25
Block 3 Time Series Analysis

SAQ 3
The marketing manager of an electricity company recorded the following
quarterly demand levels for electricity (in 1000 megawatts) in a city from 2020
to 2022.
Season 2020 2021 2022
Summer 70 101 146
Monsoon 52 64 92
Winter 22 24 38
Spring 31 45 49

(i) Calculate the quarterly moving averages of the electricity demand.


(ii) Calculate the quarterly weighted moving averages taking weights as 1, 2,
3 and 4.
(iii) Plot both the quarterly simple and weighted moving averages together
with the original data on the same axis. Also, compare both methods.

10.5.3 Exponential Smoothing


A popular forecasting method in business is exponential smoothing. Its
adaptability, simplicity in automation, low cost, and high performance are the
main reasons for its popularity. Simple exponential smoothing is similar to the
moving average, except that instead of taking a simple average over the m
most recent values, we take a weighted average of all past values so that the
weights decrease exponentially into the past. The decay rate of the
observation weights is set by the smoothing parameter of the model α (0 < α <
1) and called the exponential smoothing constant. The idea is to give more
weight to recent information, but previous information should not be
completely ignored. Similar to the moving average, simple exponential
smoothing can be used for forecasting but the main assumption is that the
series stays at the same level (that is, the local mean of the series is constant)
over time, and therefore, this method is suitable for series with neither trend
nor seasonal components. As mentioned earlier, such a series can be
obtained by removing trend and/or seasonality from the original time series
and then applying exponential smoothing to the series of residuals (which are
assumed to contain no trend or seasonality). If y1, y 2 ,.., y t are the observations
of a time series, then the smoothed value at time t is given by
y′t = αy t + α (1 − α ) y t −1 + α (1 − α ) y t − 2 + ...
2

We can also write, the above expression as


y′t = αy t + (1 − α ) y′t −1

where α is called the exponential smoothing constant and lies between 0 and
1. It controls the rate at which weights decrease.
This method consists of the following steps:
Step 1: We take the first given value as the first smoothed value, i.e.,
y1′ = y1

Step 2: We compute the second smoothed value using the first smoothed
26 value. We compute the second smoothed value as
Unit 10 Trend Component Analysis
y′2 = α y 2 + (1 − α ) y1′

Step 3: We repeat this process until all data are exhausted. We compute the
tth smoothed value as follows:
y′t = α y t + (1 − α ) y′t −1

The popular choice of the smoother constant is α = 0.2. For this, we assign a
weight of 0.2 on the most recent observation and a weight of 1 − 0.2 = 0.8 on
the most recent forecast value.

Let us look at an example which helps you to understand how to compute


exponentially smooth values.
Example 3: Consider the data of the number of fire insurance claims received
by an insurance company given in Example 1. Smooth the given time series
data using smoothing factors 0.2, 0.4 and 0.8. Compute and compare the
forecast errors produced by using the different exponential smoothing
constants.
Solution: In the exponential smoother method, we take the first
smooth(forecast) value as the first given value, i.e.,
′ y=
y=
1 1 17
We can compute the forecast error as
e1 = y1 − y1′ = 17 − 17 = 0
We can compute the second smoothed value using the first smoothed value
and α = 0.2 as
y′2 =α y 2 + (1 − α ) y1′ =0.2 × 13 + (1 − 0.2) × 17 =16.20

We can compute the forecast error as


e1 = y 2 − y′2 = 13 − 16.20 = 3.80

Similarly, you can compute the rest values in the same manner and also for
α = 0.4 and 0.8.

No. of Exponential Smoothing Forecast Forecast Forecast


Year Period
Claims α = 0.2 α = 0.4 α = 0.8 Error (α = 0.2) Error (α = 0.4) Error (α = 0.8)
I 17 17.00 17.00 17.00 0 0 0
2018 II 13 16.20 15.40 13.80 –3.20 –2.40 –0.80
III 15 15.96 15.24 14.76 0.96 –0.24 0.24
I 19 16.57 16.74 18.15 2.43 2.26 0.85
2019 II 17 16.65 16.85 17.23 0.35 0.15 –0.23
III 19 17.12 17.71 18.65 1.88 1.29 0.35
I 22 18.10 19.42 21.33 3.90 2.58 0.67
2020 II 14 17.28 17.25 15.47 –3.28 –3.25 –1.47
III 20 17.82 18.35 19.09 2.18 1.65 0.91
I 23 18.86 20.21 22.22 4.14 2.79 0.78
2021 II 19 18.89 19.73 19.64 0.11 –0.73 –0.64
III 20 19.11 19.84 19.93 0.89 0.16 0.07
27
Block 3 Time Series Analysis
From the above table, we observe that as we increase the value of the
smoother constant then the forecast error decreases. We now demonstrate
the impact of the smoothing factor α using the time series graph as shown in
Fig. 10.8.

Y
24
α = 0.4
α = 0.8
22 α = 0.2
Original data

20
Claims

18

16

14

12 X
I II III I II III I II III I II III
2018 2019 2020 2021
Period

Fig. 10.8: Original and smoothed time series values of the claim data.

From the above figure, we observed that as we increase the smoothing


constant α, the series is smoother. Therefore, α plays the same role in
exponential smoothing as m in the moving average.
After understanding the exponential smoothing and forecast technique, we
now discuss the merits and demerits of this method.
Merits

1. It is very simple in concept and very easy to understand.


2. The primary merit of the exponential method over the moving average is
that there is no loss of information (data values) as in the case of the
moving average.

3. If we forecast using the moving averages method, then m prior values are
required. If we have to forecast many values, then this is time-consuming.
Whereas the exponential method uses only two pieces of data.
Demerits
1. The method is not flexible in the sense that if some figures are added to
the data, then we have to do all calculations again.
2. This method gives good results in the absence of seasonal or cyclical
variations. As a result, forecasts are not accurate when data with cyclical
or seasonal variations are present.
After understanding the exponential smoothing method, you may be interested
in doing the same yourself. For that, you can try the following Self Assessment
28 Question.
Unit 10 Trend Component Analysis

SAQ 4
The annual expenditure levels (in millions) to promote products and services
for the financial services sector such as banks, insurance, investments, etc.
from 2015 to 2022 are shown in the following table:
Year 2015 2016 2017 2018 2019 2020 2021 2022
Expenditure 5.5 7.2 8.0 9.6 10.2 11.0 12.5 14.0

Use exponential smoothing to obtain filtered values by taking α = 0.8 and


calculate the forecast errors. Also, plot the original and smoothed values.

We think that you have understood the importance of smoothing and how to
apply it in time series data. We shall discuss how to estimate the trend
component in the next session.

10.6 ESTIMATION OF TREND COMPONENT


USING METHOD OF LEAST SQUARES
There are several ways to determine trend effects in time series data and one
of the more prominent is the method of least squares. This method is one of
the most common methods for identifying and quantifying the relationship
between a dependent variable and single or multiple independent variables. It
can also be used to fit a trend. We can also use fitted trend for forecasting. To
create a trend model that captures a time series with a global trend, the
dependent/ response/output variable (Y) is set as the time series
measurement or some function of it, and the independent/predictor variable
(X) is set as a time period. In this method, we fit a curve in such a way that the
squares of the forecast errors should be minimum.
Many possible trends can be explored with time series data. In this section, we
examine only the linear model, the quadratic model and the exponential model
because they are the easiest to understand and simplest to compute. Because
seasonal effects can confound trend analysis, it is assumed here that no
seasonal effects occur in the time series data or they were removed prior to You will study how to
determining the trend. remove trend/seasonal
variations from a time
A linear trend means that the values of the series increase or decrease linearly series data in the next
in time, whereas an exponential trend captures an exponential increase or unit.
decrease.
10.6.1 Linear Trend
When the values of the time series increase or decrease linearly with time
then we use linear trend.
In the simplest case, the linear trend model allows for a linear relationship
between the forecast variable Y and a single predictor variable time t. In this
case, the linear trend line equation is as follows:
Yt = β0 + β1t

The coefficients β0 and β1 denote the intercept and the slope of the trend
line, respectively. The intercept β0 represents the predicted value of Y
when t = 0 and the slope β1 represents the average predicted change in 29
Block 3 Time Series Analysis
Y resulting from a one-unit change in t.
We can estimate the values of the constants β0 and β1 using the following
normal equations:

∑Y t = nβ0 + β1 ∑ t

∑ tY t = β0 ∑ t + β1 ∑ t 2

where n is the number of observations in the given time series. We obtain the
values of ∑ Yt , ∑ t, ∑ tYt and ∑ t 2 from the given time series data and solve
these normal equations for the values of β0 and β1 .

Generally, the time t is given in years, therefore, to calculate the values of


∑ t, ∑ tYt and ∑ t 2 manually becomes very cumbersome. Therefore, to
simplify the calculations, we may make the following transformations in t:
 t − middle value
 interval in t values ( when n is odd )

Xt = 
 t − average of two middle value
 ( when n is even )
 half of interval in t values

Therefore, the normal equations become:

∑Y t = nβ0 + β1 ∑ Xt

∑X Y t t = β0 ∑ Xt + β1 ∑ X2t

If βˆ 0 and βˆ 1 represent the estimated values of β0 and β1 , respectively, then the


fitted trend line for estimating or forecasting the trend values is given as
follows:
Yˆ t = βˆ 0 + βˆ 1Xt

After that, we put the value of Xt in terms of t to find the final trend line.
Let us take an example to understand how to fit a linear trend line for real-life
time series data.
Example 4: The sales director of a real estate company wants to study the
general direction (trend) of future housing sales. For that, he/she recorded the
number of houses sold from 2010 to 2018 as given in the following table:
Year 2010 2011 2012 2013 2014 2015 2016 2017 2018
Sales 52 54 48 60 61 66 70 80 92

(i) Construct a simple trend line for the house sales data for the real estate
company.
(ii) Find the trend values for the given data and find forecast errors.
(iii) Plot the given data with trend values.
(iv) Use the trend line of best fit to estimate the level of house sales for the
year 2022.
Solution: The linear trend line equation is given by

30 Yt = β0 + β1t
Unit 10 Trend Component Analysis

Since n (number of years) = 9 is odd and the middle value is 2014, therefore,
we make the following transformation in time t as
Xt = t − 2014

Therefore, the normal equations for estimating the constants are:

∑Y t = nβ0 + β1 ∑ Xt

∑X Y t t = β0 ∑ Xt + β1 ∑ X2t

We calculate the values of ∑ Y , ∑ X , ∑ X Y and ∑ X


t t t t
2
t in the following table:

Sales Xt = Trend Forecast


Year (t) XtYt Xt2
(Yt) t–2014 Value Error
2010 52 –4 –208 16 45.58 6.42
2011 54 –3 –162 9 50.38 3.62
2012 48 –2 –96 4 55.18 –7.18
2013 60 –1 –60 1 59.98 0.02
2014 61 0 0 0 64.78 –3.78
2015 66 1 66 1 69.58 –3.58
2016 70 2 140 4 74.38 –4.38
2017 80 3 240 9 79.18 0.82
2018 92 4 368 16 83.98 8.02
Total 583 0 288 60

Therefore, we find the values of β0 and β1 using the normal equations as


583
583= 9 × β0 + 0 × β1 ⇒ β0 = = 64.78
9
288
288= 0 × β0 + 60 × β1 ⇒ β1 = = 4.8
60
Thus, the final linear trend line is given by
=Ŷt 64.78 + 4.8X t

Ŷt = 64.78 + 4.8 ( t − 2014 )

We can find the trend values using the above trend line by putting values of t.
For example, t = 2010.
Ŷt = 64.78 + 4.8 ( 2010 − 2014 ) = 45.58

We can compute the forecast error as


e1 = y1 − yˆ 1 = 52 − 45.58 = 6.42

You can calculate the rest of the values in a similar manner. We have
calculated the same in the above table. We now plot the time series data and
trend line by taking years on the X-axis and the house sales and trend values
on the Y-axis. We get the time series plot as shown in Fig. 10.9.
We can estimate the trend value of house sales for 2022 by putting t = 2022 in
the above linear trend line as follows:
Ŷt = 64.78 + 4.8 ( 2022 − 2014 ) = 103.18 ≈ 103
31
Block 3 Time Series Analysis

Y
100

90 Trend line

80

House sales
Original data
70

60

50

40 X
2010 2011 2012 2013 2014 2015 2016 2017 2018
Year

Fig. 10.9: Computed trend line and house sales data.

10.6.2 Quadratic Trend


Sometimes the trend is not linear and shows some curvature. The simplest
curvilinear form is a second-degree polynomial. In this case, the quadratic
trend equation is given below:
Yt = β0 + β1t + β2 t 2

We proceed same as in the case of the trend line, the normal equations for
estimating β0 , β1 and β2 after the transform of the data are given as follows:

∑Y t = nβ0 + β1 ∑ Xt + β2 ∑ X2t

∑X Y t t = β0 ∑ Xt + β1 ∑ X2t + β2 ∑ X3t

∑X Y 2
t t = β0 ∑ X2t + β1 ∑ X3t + β2 ∑ Xt4

The values of ∑ Y , ∑ X , ∑ X , ∑ X Y , ∑ X , ∑ X Y and ∑ X


t t
2
t t t
3
t
2
t t
4
t are
obtained from the given data and we solve the normal equations for the
constants β0 , β1 and β2 .

If βˆ 0 , βˆ 1 and β̂2 represent the estimated values of β0 , β1 and β2 , respectively


then the fitted quadratic trend equation for estimating or forecasting the trend
values is given as follows:
Yˆ t = βˆ 0 + βˆ 1Xt + βˆ 2 X2t

After that, we put the value of Xt in terms of t to find the final quadratic trend.
To illustrate this, let us take an example to fit a quadratic trend.
Example 5: Fit a quadratic trend equation for the house sales data of the real
estate company given in Example 4. Also
(i) Find forecast errors.

(ii) Plot the given data with trend values.

(iii) Use the quadratic trend equation, to estimate the level of house sales for
year 2022.
32 Solution: The quadratic trend equation is given as
Unit 10 Trend Component Analysis
Yt = β0 + β1t + β2 t 2

Proceeding in the same way as in the case of Example 4, we make the


transform Xt = t − 2014 , then the normal equations are given as:

∑Y t = nβ0 + β1 ∑ Xt + β2 ∑ X2t

∑X Y t t = β0 ∑ Xt + β1 ∑ X2t + β2 ∑ X3t

∑X Y 2
t t = β0 ∑ X2t + β1 ∑ X3t + β2 ∑ Xt4

We calculate the values of ∑ Y , ∑ X , ∑ X Y , ∑ X Y , ∑ X ,∑ X


t t t t
2
t t
2
t
3
t and ∑X 4
t in
the following table:
Year Sales Xt = Trend Forecast
XtYt X 2t XtYt X 3t X 4t
(t) (Yt) t – 2014 Value Error
2010 52 –4 –208 16 832 –64 256 52.31 –0.31
2011 54 –3 –162 9 486 –27 81 52.07 1.93
2012 48 –2 –96 4 192 –8 16 53.27 –5.27
2013 60 –1 –60 1 60 –1 1 55.91 4.09
2014 61 0 0 0 0 0 0 59.99 1.01
2015 66 1 66 1 66 1 1 65.51 0.49
2016 70 2 140 4 280 8 16 72.47 –2.47
2017 80 3 240 9 720 27 81 80.87 –0.87
2018 92 4 368 16 1472 64 256 90.71 1.29

Total 583 0 288 60 4108 0 708

By putting the values from the table in the normal equations, we get
583= 9 × β0 + 0 × β1 + β2 × 60 ⇒ 9β0 + 60β2 = 583

288
288 = β0 × 0 + β1 × 60 + β2 × 0 ⇒ β1 = = 4.8
60
4108 = β0 × 60 + β1 × 0 + β2 × 708 ⇒ 60β0 + 708β2 = 4108

After solving the above equation for β0 , β1 and β2 get the estimate of these as

βˆ 0 =59.99 , βˆ 1 =4.8 , βˆ 2 =0.72

Thus, the final quadratic trend equation is given by


Ŷt = 59.99 + 4.8Xt + 0.72X2t

After putting the value of Xt in terms of t, we get the desired quadratic trend
equation as follows:

Ŷt = 59.99 + 4.8 ( t − 2014 ) + 0.72 ( t − 2014 )


2

We can find the trend values using the above quadratic trend equation by
putting t values. For example, for t = 2010.

Ŷt = 59.99 + 4.8 ( 2010 − 2014 ) + 0.72 ( 2010 − 2014 ) = 52.31


2

We can compute the forecast error as

e1 =y1 − yˆ 1 =
52 − 52.31 =
−0.31
33
Block 3 Time Series Analysis
You can calculate the rest of the values in a similar manner. We have
calculated the same in the table.
We can estimate the trend value of house sales for 2022 by putting t = 2022 in
the above linear trend line as follows:

Ŷt = 59.99 + 4.8 ( 2024 − 2014 ) + 0.72 ( 2024 − 2014 ) = 179.99 ≈ 180
2

We now plot the time series data and trend line by taking years on the X-axis
and the house sales and trend values on the Y-axis. We get the time series
plot as shown in Fig. 10.10.

Y
100

90 Quardetic trend
Trend line
80
Original data
House sales

70

60

50

40 X
2010 2011 2012 2013 2014 2015 2016 2017 2018
Year

Fig. 10.10: Fitted quadratic and linear trend models with house sales data.

If we compare the forecast errors that occurred in both linear and quadratic
form, then we observe that these are less in quadratic in comparison to the
linear so we can say that the quadratic trend fits better than linear on the
number of houses sold by the company.

Before going to the next session, you may like to fit linear or quadratic trend.
So, try a Self Assessment Question.

SAQ 5
The following table gives the gross domestic product (GDP) in 100 million for a
certain country from 2010 to 2020:
2019 2020
Year 2011 2012 2013 2014 2015 2016 2017 2018

GDP 35 37 51 54 62 64 74 71 83 80

(i) Fit a trend line for GDP data and find trend values with the help of trend
line.

(ii) Find forecast errors.

34 (iii) Use best-fit trend model to predict the country’s GDP for 2022
Unit 10 Trend Component Analysis

10.6.3 Exponential Trend


In many situations, the time series data relating to business and economic
activities show constant initial growth instead of annual increase as in the case
of linear trend. In such situations, the trend can be described best by
exponential function rather than linear or quadratic. This can be represented
by an exponential form as given below:
Yt = β0 eβ1t

We can transform this model to a linear trend model by taking the natural
logarithm (base e) on both sides of the above model as follows:
log ( Y=
t) log ( β0 ) + β1t log ( e )

Z t = a + β1t log ( e )= 1

where Z t = log ( Yt ) and=


a log ( β0 ) .

This is the equation of linear trend. Therefore, we proceed in the same way as
in the case of the linear trend line and find the estimate of a and β1 .

Once, we estimate of a and β1 i.e. â and β̂1 are obtained, then we can obtain
an estimate of β0 i.e. β̂0 with the help of â as

βˆ 0 =eâ

After that, we put the values of estimates of β0 and β1 in the exponential form
to get the equation of best fit.
Let us try a Self Assessment Question for the exponential trend in the same
manner as described above.

SAQ 6
The gross revenue of a company from 2015 to 2022 is given in the following
table:

Year 2015 2016 2017 2018 2019 2020 2021 2022

Gross Revenue 15 45 52 75 106 158 241 314

(i) Check which model of trend is the best fit to the given data.
(ii) Fit the suitable model.
(iii) Find the forecast errors.
(iv) Use the best fit trend model to predict the company’s gross revenue for
2025.

10.7 ESTIMATION OF TRENT COMPONENT


USING MOVING AVERAGE
We have discussed in Sec. 10.5 that the moving average method smooths out
(or filters out) the effect of irregular fluctuations by averaging values over
multiple periods. Also, if the time series has a seasonality effect, then we can
35
Block 3 Time Series Analysis
remove it by taking the moving average period equal to the season span. For
example, if a time series has been recorded monthly and there is a seasonal
effect of one year. This means that after twelve months data behave in a
similar way to twelve months ago, then we take a centred moving average with
m = 12 then it will smooth out (eliminate) the effect of season. Not only this, if
we increase m cyclical effect also smooths out from the time series. As you
have studied in Sec. 10.3 that the time series mainly has four components and
using the moving average method, we remove the seasonal, cyclic and
irregular components, therefore, after applying this method only the trend will
be left in the time series, hence, we can use the moving average method to
estimate the trend.
We end this unit by giving a summary of its contents.

10.8 SUMMARY
In this unit, we have discussed:
• A time series is a set of numeric data of a variable that is collected over
time at regular intervals and arranged in chronological (time) order.

• The different components of time series are trend, cyclical, seasonal and
irregularity;

• The general tendency of values of the data to increase or decrease during


a long period of time is called the trend.

• The variations which occur due to rhythmic or natural forces and operate
in a regular and periodic manner over a span of less than or equal to one
year are termed as seasonal variations.

• Apart from seasonal effects, some time series exhibit variation due to
some other physical causes, which is called cyclic variation. It has a
period greater than one year.

• The variations in a time series which do not repeat in a definite pattern are
called irregular variations or irregular components.

• Basic models of time series such as additive and multiplicative models.

• The methods of smoothing or filtering such as simple, weighted, and


exponential of the time series data.

• Method of least squares and moving average methods to estimate the


trend.

10.9 TERMINAL QUESTIONS


1. What is the difference between seasonal and cyclic components of time
series?
2. Explain various methods of smoothing.
3. For the gross domestic product (GDP) data for a country from 2010 to
2020 given in SAQ 5, find the trend values using 3-yearly simple moving
36 average. Also, compare with the linear trend.
Unit 10 Trend Component Analysis

4. Describe various methods of estimation of trend component.

10.10 SOLUTION/ANSWERS
Self-Assessment Questions (SAQs)
1. Refer Secs. 10.2 and 10.3.
2. Refer Sec. 10.4.
3. Since m = 4 is even, therefore, we compute the first moving average as
70 + 52 + 22 + 31
=MA1 = 43.75
4
We put the first MA in the middle of the second and third observations by
creating blank rows after each observation as explained in Example 2.
We can also calculate the weighted MAs by taking the weights w1 = 1,
w 2 2,=
= w 3 3 and w 4 = 4 as follows:

1× 70 + 2 × 52 + 3 × 22 + 4 × 31
WMA1 = 36.40
1+ 2 + 3 + 4

Also, we determine the centred moving average by averaging the first


two MAs and placing it against the middle value, i.e., we calculate the
average of the first two MAs and place it against the middle of the first
and second moving averages, i.e., against the third observation. We
have calculated the rest MAs and WMAs in the following table:

Demand Centred Centred


4-period 4-period
Year Season of 4-period 4-period
MA WMA
Electricity MA WMA

Summer 70

Monsoon 52

2020 43.75 36.40

Winter 22 47.63 47.85

51.50 59.30

Spring 31 53.00 61.80

54.50 64.30

Summer 101 54.75 58.20

55.00 52.10

Monsoon 64 56.75 50.10


2021
58.50 48.10

Winter 24 64.13 65.60

69.75 83.10

Spring 45.00 73.25 87.55

2022 76.75 92.00

37
Block 3 Time Series Analysis
Summer 146 78.50 84.25

80.25 76.50

Monsoon 92 80.75 70.25

81.25 64.00

Winter 38

Spring 49

We now plot the time series data and MAs by taking years on the X-axis and
the demand of electricity and centred MA and WMA on the Y-axis. We get the
time series plot as shown in Fig. 10.11.

Y
170

150

130 Centred
Demand of electricity

Centred 4-period WMA


4-period MA
110

90
Demand of
electricity
70

50

30

10 X

2020 2021 2022


Season

Fig. 10.11: Demand of electricity with centred MA and WMA.

From the above figure, we observed that WMA is smoother than the simple
MA.
4. In the exponential smoother method, we take the first smooth(forecast)
value as the first given value, i.e.,
′ y=
y=
1 1 5.5
We can compute the forecast error as
e1 = y1 − y1′ = 5.5 − 5.5 = 0
We can compute the second smoothed value using the first smoothed
value as
y′2 = α y 2 + (1 − α ) y1′

= 0.8 × 5.5 + (1 − 0.8) × 7.2 = 6.86

We can compute the forecast error as


38
Unit 10 Trend Component Analysis
e2 = y 2 − y′2 = 7.2 − 6.86 = 0.34

Similarly, you can compute the rest values in the same manner as
follows:

Exponential
Year Expenditure Smoothing Forecast Error
(α = 0.8)

2015 5.5 5.50 0

2016 7.2 6.86 0.34

2017 8.0 7.77 0.23

2018 9.6 9.23 0.37

2019 10.2 10.01 0.19

2020 11.0 10.80 0.20

2021 12.5 12.16 0.34

2022 14.0 13.63 0.37

We now demonstrate the impact of the smoothing factor α using the time
series graph shown in Fig. 10.12.

15

14

13 Smoothed
values α = 0.8
12
Expenditure

11
Original data
10

5
2015 2016 2017 2018 2019 2020 2021 2022
Year

Fig. 10.12: Annual expenditure with exponential smoothing.

From the above figure, we observed that the time series is not smoother so
α = 0.8 has less impact for smoothing the time series.
5. The linear trend line equation is given by
Yt = β0 + β1t

Since n = 10 is even, therefore, we make the following transformation in


time t:
t − average of two middle value
Xt =
half of interval in t values

t − 2015.5
= = 2 ( t − 2015.5 )
1/ 2 39
Block 3 Time Series Analysis
After the transformation, the normal equations for linear trend line are:

∑Y t = nβ0 + β1 ∑ Xt

∑X Y t t = β0 ∑ Xt + β1 ∑ X2t

We calculate the values of ∑ Y , ∑ X , ∑ X Y and ∑ X


t t t t
2
t in the following
table:
Xt = Trend Forecast
Year (t) GDP (Yt) XtYt X 2t
2(t-2015.5) Value Error

2011 35 –9 –315 81 36.89 –1.89

2012 37 –7 –259 49 42.27 –5.27

2013 51 –5 –255 25 47.65 3.35

2014 54 –3 –162 9 53.03 0.97

2015 62 –1 –62 1 58.41 3.59

2016 64 1 64 1 63.79 0.21

2017 74 3 222 9 69.17 4.83

2018 71 5 355 25 74.55 –3.55

2019 83 7 581 49 79.93 3.07

2020 80 9 720 81 36.89 –1.89

Total 611 0 889 330

Therefore, we find the values of β0 and β1 using normal equations as

611
611
= 10 × β0 + β1 × 0 ⇒=
β0 = 61.1
10
889
889 = β0 × 0 + β1 × 330 ⇒=
β1 = 2.69
330
Thus, the final linear trend line is given by
Ŷt 61.1 + 2.69X t
=

Ŷt = 61.1 + 2.69 × 2 ( t − 2015.5 )

We can find the trend values using the above line by putting t values.
For example, t = 2011.
Ŷt 61.1 + 2.69 × 2 ( 2011 − 2015.5
= = ) 61.6 − 2.69 × ( −9=) 36.89
We can compute the forecast error as
e1 =y1 − yˆ 1 =
35 − 36.89 =
−1.89

You can calculate the rest of the values in a similar manner. We have
calculated the same in the above table.
We can estimate the trend value of the GDP of the country for 2022 by
putting t = 2022 in the above linear trend line as follows:

Ŷt = 61.10 + 2.69 × 2 ( 2025 − 2015.5 ) = 112.21


40
Unit 10 Trend Component Analysis

We now plot the time series data and trend line by taking years on the X-
axis and the GDP and trend values on the Y-axis. We get the time series
plot as shown in Fig. 10.13.

Y Trend line
82

72
Original data

62
GDP

52

42

32 X
2010 2011 2012 2013 2014 2015 2016 2017 2018
Year

Fig. 10.13: Computed trend line and GDP data.

6. To check which model of trend is the best fit to the given data, we first
plot the given data by taking the year on the X-axis and corresponding
gross revenue on the Y-axis as shown in Fig. 10.14.
Y
350

300

250
Gross revenue

200

150

100

50

0 X
2015 2016 2017 2018 2019 2020 2021 2022

Year

Fig. 10.14: Gross revenue data of a company.

The shape of Fig. 10.14 is approximate as an exponential. So the


exponential model may be suitable for the data. The form of the model is
given as follows:

Yt = β0 eβ1t

We take the natural logarithm (base e) to convert this model to a linear


trend model as follows:
41
Block 3 Time Series Analysis
log ( Y=
t) log ( β0 ) + β1t log ( e )

Z t = a + β1t log ( e )= 1

Z t log ( Yt )=
where = ,a log ( β0 )

Since n = 8 is even, therefore, we make the following transformation in


time t as
t − average of two middle value
Xt =
half of interval in t values

t − 2018.5
= = 2 ( t − 2018.5 )
1/ 2
Therefore, the normal equations for estimating a and β1 are:

∑ Z= t na + β1 ∑ Xt

∑=
X Z a∑ X
t t t + β1 ∑ X2t

We calculate the values of ∑ Z ,∑ X ,∑ X Z


t t t t and ∑X 2
t in the following
table:

Gross
Year Xt = Zt = Trend Forecast
Revenue Xt Zt X 2t
(t) 2(t – 018.5) log(Yt) Value Error
(Yt)

2015 15 –7 2.71 –18.96 49 21.58 –6.58


2016 45 –5 3.81 –19.03 25 32.29 12.71
2017 52 –3 3.95 –11.85 9 48.03 3.97
2018 75 –1 4.32 –4.32 1 71.45 3.55
2019 106 1 4.66 4.66 1 106.28 –0.28
2020 158 3 5.06 15.19 9 158.11 –0.11
2021 241 5 5.48 27.42 25 235.20 5.80
2022 314 7 5.75 40.25 49 349.88 –35.88
Total 0 35.74 33.36 168

Therefore, we find the values of β0 and β1 using normal equations as

35.74
35.74 = 8 × a + β1 × 0 ⇒
= a = 4.47
8

33.36
33.36 = a × 0 + β1 × 168 =
⇒ β1 = 0.20
168

Therefore,

βˆ 0 =eâ

(=
2.20 )
4.47
= 87.60

Thus, the best fit of the exponential trend is given by

0.20×2( t − 2018.5 )
β0 eβ1t =
Ŷt = 87.60e

42
Unit 10 Trend Component Analysis

We can find the trend values using the above line by putting t values.
For example, for t = 2015

( ) 0.20×2 2015 − 2018.5


=Ŷ2015 87.60e
= 21.58

You can calculate the rest of the values in a similar manner. We have
calculated the same in the table.

We also calculate the forecast errors in the same table as follows:

y1 − Yˆ 2015 =
e1 = 15 − 21.58 =
−6.58

We can estimate the trend value of the gross revenue of the company
for 2025 by putting t = 2025 in the above trend equation as follows:
0.120×2( 2025 − 2018.5 )
Ŷt = 87.60e

= 1151.79

We now plot the time series data and trend values by taking years on the
X-axis and the gross revenue and trend values on the Y-axis. We get the
time series plot as shown in Fig. 10.15.

Y
400

350 Exponential
trend
300
Gross revenue

250

200

150 Original data

100

50
X
0
2015 2016 2017 2018 2019 2020 2021 2022
Year

Fig. 10.15: Fitted exponential trend model and gross revenue data.

Terminal Questions (TQs)


1. Refer Sec. 10.3.

2. Refer Sec. 10.5.

3. Since m = 3 is odd, therefore, we compute the first moving average as


35 + 37 + 51
=MA1 = 41
3
43
Block 3 Time Series Analysis
And put the same in the middle of these observations, that is, in front of
2012. This value is treated as the estimate of the trend for 2012.
Similarly, we estimate the trend value for the rest of the years. You can
calculate the rest of the values in a similar manner. We have calculated
the same in the following table:

MA/Trend Forecast Error Forecast Error


Year (t) GDP (Yt)
Value (MA) (linear trend)
2011 35 --- --- –1.89
2012 37 41.00 – 4.00 –5.27
2013 51 47.33 3.67 3.35
2014 54 55.67 –1.67 0.97
2015 62 60.00 2.00 3.59
2016 64 66.67 –2.67 0.21
2017 74 69.67 4.33 4.83
2018 71 76.00 –5.00 –3.55
2019 83 78.00 5.00 3.07
2020 80 --- --- –1.89

For comparison with the linear trend, we also calculate the forecast
errors in the same table as follows:
e2 =
y 2 − MA =
37 − 41 =
−4

By comparing the forecast errors that occur in both the moving average
and trend line, we observed that in most of the cases, the error is less in
the trend line in compression of the moving average.
We also pot the estimated trend using the method of least squares and
moving average method in Fig. 10.16.

Y Trend using MA
82

GDP data
72
Trend Using
62 method of least
squares
GDP

52

42

32 X
2010 2011 2012 2013 2014 2015 2016 2017 2018
Year

Fig. 10.16: GDP data with trend values using method of least squares and moving
average.

4. Refer Secs. 10.6 and 10.7.

44

You might also like