Professional Documents
Culture Documents
Structure
10.1 Introduction Exponential Smoothing
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.
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
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
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
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
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.
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
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.
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?
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
y1 + y 2 + y 3
MA1 =
3
where y1, y 2 and y 3 are the first three observations of the time series.
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:
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
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.
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
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
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.
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.
Demerits
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
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.
Similarly, you can compute the rest values in the same manner and also for
α = 0.4 and 0.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.
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
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.
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 .
∑Y t = nβ0 + β1 ∑ Xt
∑X Y t t = β0 ∑ Xt + β1 ∑ X2t
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
∑Y t = nβ0 + β1 ∑ Xt
∑X Y t t = β0 ∑ Xt + β1 ∑ X2t
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
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
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
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.
(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
∑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
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
After putting the value of Xt in terms of t, we get the desired quadratic trend
equation as follows:
We can find the trend values using the above quadratic trend equation by
putting t values. For example, for t = 2010.
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.
34 (iii) Use best-fit trend model to predict the country’s GDP for 2022
Unit 10 Trend Component Analysis
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 )
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:
(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.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 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.
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
Summer 70
Monsoon 52
51.50 59.30
54.50 64.30
55.00 52.10
69.75 83.10
37
Block 3 Time Series Analysis
Summer 146 78.50 84.25
80.25 76.50
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
90
Demand of
electricity
70
50
30
10 X
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′
Similarly, you can compute the rest values in the same manner as
follows:
Exponential
Year Expenditure Smoothing Forecast Error
(α = 0.8)
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
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
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
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
=
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:
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
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
Yt = β0 eβ1t
Z t log ( Yt )=
where = ,a log ( β0 )
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
Gross
Year Xt = Zt = Trend Forecast
Revenue Xt Zt X 2t
(t) 2(t – 018.5) log(Yt) Value Error
(Yt)
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
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
You can calculate the rest of the values in a similar manner. We have
calculated the same in the table.
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
100
50
X
0
2015 2016 2017 2018 2019 2020 2021 2022
Year
Fig. 10.15: Fitted exponential trend model and gross revenue data.
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.
44