0% found this document useful (0 votes)
62 views25 pages

Time Series Updated

Uploaded by

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

Time Series Updated

Uploaded by

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

1.

0 Introduction

Time series analysis is a statistical technique that deals with trend analysis and time series data.

Time series analysis made its way into medicine when the first practical electrocardio-grams

(ECGs), which can diagnose cardiac conditions by recording the electrical signals passing

through the heart, were invented in 1901. John Graunt’s actuarial tables were one of the first

results of time-series-style thinking applied to medical questions. In his book, Grant presented

the first life tables, which you may know as actuarial tables. These tables show the probability

that a person of a given age will die before their next birthday Data from time series are periodic

time periods that have been measured at regular intervals or gathered at certain times. To put

it another way, a time series is just a collection of data points arranged chronologically, and

time series analysis is the act of interpreting this data. The Gross Domestic Product (GDP), the

Consumer Price Index, the SP 500 Index, and unemployment rates are examples of time series

data in economics. Time series data in the social sciences could include information on

population growth, migration patterns, birth rates, and political variables. Here in the

presentation, we discuss the Definitions, Assumptions, Objectives, Application, Time series

models, and some solved examples.

2.0 Definitions

Time series analysis is a specific way of analysing a sequence of data points collected over an

interval of time. In time series analysis, analysts record data points at consistent intervals over

a set period of time rather than just recording the data points intermittently or randomly.

According to researchers their definition of time series are:

Mooris Hamburg: “A time series is a set of statistical observations arranged in chronological

order”.

1|25
W.Z. Hirsch: “The main objective in analyzing time series is to understand, interpret and

evaluate change in economic phenomena in the hope of more correctly anticipating the course

of future events”.

Time Series

A time series is a statistical data that are collected, observed or recorded at a regular interval of

time. It is denoted by {yt} where yt is the observed value at time t. A time series establishes a

relationship between two variables in which one of the variables is independent variable, that

is, the time and other variable y is the dependent variable whose value changes with regard to

time variable.

Examples:

a. Economic Time series: Total Agricultural production in different years, Share prices

on successive days, Export totals in successive years etc.

b. Physical Time series: Air or water quality over time, Rainfall in successive days, Air

temperature measured in successive hours, days or months.

c. Marketing Time series: Sales figure in successive weeks or month, Inventory level for

a product over time.

d. Demographic Time series: Population of an area measured annually, Total number of

birth recoded monthly.

Objectives of Time Series Analysis

a. To study the past behaviour of data.

b. To forecast for future.

2|25
Importance of Time Series Analysis

a. It helps to understand the past behaviour of data and enables the users to forecast the

future behaviour.

b. It is useful in planning, state administration business, social sciences and so on.

c. It is helpful in future operations.

d. It enables the users to compare the actual performance with the expected performance

and analyse the different causes of variation.

Components of Time Series

1. Secular Trend (Long-Term Variations): This is the smooth, regular and long-term

movement of a series showing continuous growth, stagnation or decline over a long

period of time. Examples include, Growth of population, Increase in the rate of capital

formation, long-term change in productivity, etc.

2. Seasonal Variations: Seasonal Variations are short-term periodic movements. It

involves patterns of change within a year that tend to be repeated from year to year.

Such variations are due to recurring events such as Easter, Christmas, summer travels,

weather conditions, etc.

3. Cyclical Variations: Cyclical variations are periodic movements in the time series

around the trend line. These variations do not follow any regular pattern and move in

somewhat unpredictable manner. They are upswings and downswings in the time series

that are observable over extended period of time. The most common example is

business cycle. The four phases of a business cycle are: Boom or Prosperity, Recession,

Depression and Recovery.

4. Irregular (Random) Variation: These are variations which either completely

unpredictable or caused by isolated special occurrences such as strikes, wars, earth-

3|25
quakes, flood, accidents, government policy, etc. They are erratic movement in a time

series that follow no recognisable or regular pattern. Such movement represent what is

“left over” in a time series when the other components have been accounted for.

Time Series Models

1. Multiplicative Model: This model is more appropriate for forecasting when the trend

is increasing or decreasing over time, whereby variations about the trend are not of

within a constant band with.

Yt = T x S x C x I

2. Additive model: This is most appropriate where variations about the trend are within

a constant band with that is of a similar magnitude.

Yt = T + S + C + I

Where;

o Yt (Observed Value): This represents the actual value of the time series at time t. It is

the product of the trend, seasonal, cyclical, and irregular components at that specific

time.

o T (Trend Component): The trend component reflects the long-term progression or

direction in the data. It captures the overall movement of the series, whether it's

increasing, decreasing, or remaining constant over time. Trends can be linear or

nonlinear.

o S (Seasonal Component): The seasonal component represents regular and repeating

patterns within a fixed period, such as daily, monthly, or yearly cycles. It accounts for

variations that occur at specific intervals due to seasonal factors, like higher ice cream

sales in summer or increased retail sales during holidays.

4|25
o C (Cyclical Component): The cyclical component captures fluctuations in the data that

occur at irregular intervals but are not of a fixed period like the seasonal component.

These cycles are typically influenced by broader economic or business cycles, such as

periods of economic growth or recession.

o I (Irregular Component): The irregular component, also known as the residual or

noise component, includes random variations and anomalies in the data that cannot be

attributed to the trend, seasonal, or cyclical components. It accounts for unpredictable,

irregular influences that affect the time series.

Measurement of Trend

a. Freehand method or graphical method

b. Method of least squares

c. Method of semi-average

d. Method of moving average

• Freehand Method:

Original data are plotted (Time Plot or Histogram) on a graph paper with time on x-axis and

the quantity of measurement on y-axis. Trend line is drawn free hand in such a way that it

appears to lie evenly between the recorded points. This line can be extended to get the predicted

values for future. And the line is referred to as line of best fit drawn by “eye”. This method is

subjective, because the values of trend obtained by different statisticians would be different

and hence, not reliable.

5|25
Example 1: Determine the Trend of the following time series data by graphic method and

estimate the sales in 2012:

Year (t) 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Sales (M) 23 32 29 18 52 12 28 25 36 22 58

Solution

70

60

50
Sales (in Million)

40

Sales (in M)
30
Linear (Sales (in M))

20

10

0
2000 2002 2004 2006 2008 2010 2012
Time

6|25
• Method of Least Squares

The goal of the least squares method is to find the best-fitting line or curve to a set of observed

data points. In time series analysis, this typically involves fitting a trend line or a regression

model to the time-ordered data.

The equation of a straight line is of the form yt = α + βx. Where ‘α’ is the intercept, ‘β’ is the

slope and yt is the time series data depending on time (x). By the method of least squares, the

normal equations to find the values of α and β are:

Σy = na + bΣx

Σxy = aΣx + bΣx²

X is taken as time period and is treated as an independent variable. If the values of X are large,

we redefine X by taking deviations from some constant value, i.e., x = X-A.

If the number of time periods is odd, the deviations are taken from the middle value so that Σx

becomes zero.

But if the number of time periods is even then we define x = X - (Average of the two middle

values).

7|25
Example

Using the method of least squares to solve the problem above, we have the table and the graph

below:

Year y x = X-2006 x² xy ̂
𝒚

2001 23 -5 25 -115 23.82

2002 32 -4 16 -128 25.15

2003 29 -3 9 -87 26.47

2004 18 -2 4 -36 27.80

2005 52 -1 1 -52 29.13

2006 12 0 0 0 30.45

2007 28 1 1 28 31.78

2008 25 2 4 50 33.11

2009 36 3 9 108 34.44

2010 22 4 16 88 35.76

2011 58 5 25 290 37.09

Total 335 0 110 146

̂= a + bx
𝒚

Σxy 146
b= = = 1.327273 ≈ 1.33
Σx² 110

Σy 335
a= = = 30.45
n 11

̂ = 30.45 + 1.33 (X-2006)


𝒚

8|25
x= ̂
𝒚
Year y
[X-(2006+2007) /2] x² xy

2001 23 -5.5 30.25 -126.5 23.82

2002 32 -4.5 20.25 -144 25.15

2003 29 -3.5 12.25 -101.5 26.47

2004 18 -2.5 6.25 -45 27.80

2005 52 -1.5 2.25 -78 29.13

2006 12 -0.5 0.25 -6 30.45

2007 28 0.5 0.25 14 31.78

2008 25 1.5 2.25 37.5 33.11

2009 36 2.5 6.25 90 34.44

2010 22 3.5 12.25 77 35.76

2011 58 4.5 20.25 261 37.09

2012 30 5.5 30.25 165

Total 365 0 143 143.5

̂= a + bx
𝒚

Σxy 143.5
b= = = 1.0034 ≈ 1.00
Σx² 143

Σy 365
a= = = 30.4166
n 12

̂ = 30.42 + 1.00 (X-2006)


𝒚

9|25
Trend
45.00
40.00 37.09
33.11 34.44 35.76
35.00 31.78
29.13 30.45
Sales in million

26.47 27.80
30.00
23.82 25.15
25.00
20.00
15.00
10.00
5.00
0.00
2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Time

10 | 2 5
• Semi Average Method:

Fitting line by this method requires four steps.

a. Divide the series into two equal parts, but if the series cover an odd number of periods,

omit or ignore the middle one in order to make the two parts equal.

b. Take average of each part separately.

c. Plot the average of each part against the middle of the time period covered by the

respective parts.

d. Join the plotted points.

Example 2: The sales of a commodity in tonnes varied from 2001 to 2010 in the following

manner: 280, 300, 280, 280, 270, 240, 230, 230, 220, 200, 210 and 200. Fit a trend by the

method of semi-average.

11 | 2 5
Solution

Sales 280 300 280 280 270 240 230 230 220 200 210 200
Semi-
275 215
Average
Time 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012

350

300

250

200
Sales

150

100

50

0
2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
Year

Fitting the Trend Line

The semi-average method draws a line between the two averages. The trend line will connect

the point (2003.5, 275) and (2009.5, 215).

Tabular Method

The forecasted sales for 2003 will be 282 and the increment within a period of 5 years is 218-

282 = (-64). The increment per year is -12.8 (that is,-64/5). We can now forecast as follows:

Time 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Sales 307.6 294.8 282 269.2 256.4 243.6 230.8 218 205.2 192.4 179.6

12 | 2 5
Method of Moving Averages: A moving average is an average taken at the end of each

successive period of time and is related to the midpoint of an overall period. We take the

average of a definite number of terms (time period) in a time series in succession, each time

dropping one value at the beginning and taking up the new value (in sequence) from the

remaining entries in the series. This method helps in eliminating cyclical, seasonal and random

fluctuations. The period of moving average can be odd or even.

a. Odd period: When odd period of moving averages is used for computing trend values,

moving totals and moving averages are placed against the centre of the period covered.

b. Even period: The moving totals and moving averages do not correspond to any period

but fall between two time periods, therefore the process of centring the values is

adopted. In this process two periods moving average of the previously computed

moving averages is taken.

Example 3: The output (‘000 units) of a factory over the last three weeks has been as follows:

Day Week 1 Week 2 Week 3

Mon 80 82 84

Tue 104 110 116

Wed 94 97 100

Thu 120 125 130

Fri 62 64 66

Determine the seasonal variation and seasonal adjustment using appropriate n- point moving

averages assuming:

• Additive model

• Multiplicative model

13 | 2 5
Solution (Additive Model)

Seasonal Irregular
Time Y 5PT MT Trend (T) S=Y-T Indices: C I=S-C
Mon-wk1 80 - - - - -
Tue 104 - - - - -
Wed 94 460 92.0 2.0 1.34 0.7
Thu 120 462 92.4 27.6 28.24 -0.6
Fri 62 468 93.6 -31.6 -32.46 0.9
Mon-wk2 82 471 94.2 -12.2 -13.06 0.9
Tue 110 476 95.2 14.8 15.94 -1.1
Wed 97 478 95.6 1.4 1.34 0.1
Thu 125 480 96.0 29.0 28.24 0.8
Fri 64 486 97.2 -33.2 -32.46 -0.7
Mon-wk3 84 489 97.8 -13.8 -13.06 -0.7
Tue 116 494 98.8 17.2 15.94 1.3
Wed 100 496 99.2 0.8 1.34 -0.5
Thu 130 - - - - -
Fri 66 - - - - -

Explanation:

1. Y: Actual data.

2. 5PT MA: Five-Point Moving Average.

3. Trend (T): Value obtained from the moving average.

4. S = Y - T: Seasonal component.

5. Seasonal Indices (C): Pre-determined seasonal index values.

6. Irregular (I = S - C): Irregular component obtained by subtracting the seasonal

indices from the seasonal component.

14 | 2 5
Detailed Calculation Steps:

1. Five-Point Moving Average (5PT MA):

o Calculate the average of the five surrounding data points for the center point.

For example, for Wed of wk1, the 5PT MA is calculated as: 5PT

o Continue this for other values.

2. Trend (T):

o Trend is the moving average value.

3. Seasonal Component (S = Y - T):

o Subtract the trend value from the actual data to get the seasonal component.

4. Irregular Component (I = S - C):

o Subtract the seasonal indices from the seasonal component to get the irregular

component.

Graphing:

• Y vs. Time: Plot the actual data points.

• Trend (T) vs. Time: Plot the trend line based on the moving average.

• Seasonal Component (S) vs. Time: Plot the deviations from the trend.

• Irregular Component (I) vs. Time: Plot the remaining variability after accounting for

the seasonal component.

15 | 2 5
Seasonal Adjustment (Additive Model)

Week Mon Tue Wed Thu Fri


1 - - 2.0 27.6 -31.6
2 -12.2 14.8 1.4 29.0 -33.2
3 -13.8 17.2 0.8 - - Total
Average -13 16 1.4 28.3 -32.4 0.3
Adjustment -0.06 -0.06 -0.06 -0.06 -0.06 -0.3
Seasonal
Component -13.06 15.94 1.34 28.24 -32.46 0

To forecast for week 4, we need to estimate trend value for each day of the week and add to

each day trend value their corresponding seasonal indices.

Incremental Rate IR = TL-TF = 99.2-92 = 7.2 =0.72


Tn-1 11-1 10

Wk 4 Trend S 𝑦̂=T+S

Mon 101.36 -13.06 88.3

Tue 102.08 15.94 118.02

Wed 102.80 1.34 104.14

Thu 103.52 28.24 131.76

Fri 104.24 -32.46 71.78

16 | 2 5
Solution (Multiplicative Model)

Time Y 5PT MT Trend (T) S=(Y/T)*100 C I=S-C

Mon-wk1 80 - - - - -

Tue 104 - - - - -

Wed 94 460 92.0 102.2 101.41 0.8

Thu 120 462 92.4 129.9 129.96 -0.1

Fri 62 468 93.6 66.2 65.91 0.3

Mon-wk2 82 471 94.2 87.0 86.36 0.7

Tue 110 476 95.2 115.5 116.36 -0.8

Wed 97 478 95.6 101.5 101.41 0.1

Thu 125 480 96.0 130.2 129.96 0.2

Fri 64 486 97.2 65.8 65.91 -0.1

Mon-wk3 84 489 97.8 85.9 86.36 -0.5

Tue 116 494 98.8 117.4 116.36 1.0

Wed 100 496 99.2 100.8 101.41 -0.6

Thu 130 - - - - -

Fri 66 - - - - -

17 | 2 5
Seasonal Adjustment (Multiplicative Model)

Week Mon Tue Wed Thu Fri

1 - - 102.2 129.9 66.2

2 87 115.5 101.5 130.2 65.8

3 85.9 117.4 100.8 - - Total

Average 86.45 116.45 101.5 130.05 66 500.5

Adj -0.09 -0.09 -0.09 -0.09 -0.09 -0.45

SC 86.36 116.36 101.41 129.96 65.91 500

Forecast for week 4

Wk
Trend S 𝑦̂=(TxS)/100
4

Mon 101.36 86.36 87.53

Tue 102.08 116.36 118.78

Wed 102.80 101.41 104.25

Thu 103.52 129.96 134.53

Fri 104.24 65.91 68.70

18 | 2 5
MOVING AVERAGE OF AN EVEN NUMBER

Example 4: Calculate the 4-point moving average trend line of the following data on volume

sales.

Year Quarter 1 Quarter 2 Quarter 3 Quarter 4

1995 600 840 420 720

1996 640 860 420 740

1997 670 900 430 760

Determine the seasonal variation and seasonal adjustment using appropriate n- point moving

averages assuming:

• Additive model

• Multiplicative model

Solution (Additive Model)

Quarter 4PT 2 PT Seasonal Irregular


Year Y MT MT Trend (T) S=Y-T Indices: C I=S-C
1995 1 600 - - - - - -
2 840 - - - - - -
3 420 2580 5200 650 -230 -239.45 9.45
4 720 2620 5280 657.5 62.5 62.45 0.05
1996 1 640 2620 5280 660 -20 -16.95 -3.05
2 860 2640 5300 662.5 197.5 204.95 -7.45
3 420 2660 5350 668.8 -248.8 -239.45 -9.35
4 740 2790 5420 677.5 62.5 62.45 0.05
1997 1 670 2730 5470 683.8 -13.8 -16.95 3.15
2 900 2740 5500 687.5 212.5 204.95 7.55
3 430 2760 - - -
4 760 - - - -

19 | 2 5
Seasonal Adjustment (Additive Model)

Year/ Quarter Q1 Q2 Q3 Q4
1995 - - -230 62.5
1996 -20 197.5 -248.8 62.5
1997 -13.8 212.5 - - Total
Average -16.9 205 -239.4 62.5 11.2
Adjustment -0.05 -0.05 -0.05 -0.05 -0.2
Seasonal
Component -16.95 204.95 -239.45 62.45 11

To forecast for year 1998, we need to estimate trend value for each quarter and add to each

quarter trend value their corresponding seasonal indices.

Incremental Rate IR = TL-TF = 687.5-650 = 37.5 = 5.36


Tn-1 8-1 7

1998 Trend S 𝑦̂=T+S

Q1 703.58 -16.95 686.63

Q2 708.94 204.95 913.89

Q3 714.3 -239.45 474.85

Q4 719.66 62.45 782.11

20 | 2 5
Solution (Multiplicative Model)

Quarter 4PT 2 PT Trend S= Seasonal Indices: Irregular


Year Y MT MT (T) (Y/T)*100 C I=S-C
1995 1 600 - - - - - -
2 840 - - - - - -
3 420 2580 5200 650 64.61538 -239.45 9.45
4 720 2620 5280 657.5 109.5057 62.45 0.05
1996 1 640 2620 5280 660 96.9697 -16.95 -3.05
2 860 2640 5300 662.5 129.8113 204.95 -7.45
3 420 2660 5350 668.8 62.79904 -239.45 -9.35
4 740 2790 5420 677.5 109.2251 62.45 0.05
1997 1 670 2730 5470 683.8 97.98187 -16.95 3.15
2 900 2740 5500 687.5 130.9091 204.95 7.55
3 430 2760 - - -
4 760 - - - -

Seasonal Adjustment (Multiplicative Model)

Year/ Quarter Q1 Q2 Q3 Q4
1995 - -
64.62 109.51
1996
96.97 129.81 62.80 109.23
1997 - - Total
97.98 130.91
Average 97.475 130.36 63.71 109.37 400.92
Adjustment -0.23 -0.23 -0.23 -0.23 -0.92
Seasonal
Component 97.245 130.13 63.48 109.14 400

To forecast for year 1998, we need to estimate trend value for each quarter and add to each

quarter trend value their corresponding seasonal indices.

Incremental Rate IR = TL-TF = 687.5-650 = 37.5 = 5.36


Tn-1 8-1 7

21 | 2 5
1998 Trend S 𝑦̂=(T*S)/100

Q1 703.58 97.245 684.20

Q2 708.94 130.13 922.54

Q3 714.3 63.48 453.44

Q4 719.66 109.14 785.44

Conclusion

Time series analysis is a powerful and versatile tool that allows us to understand and predict

patterns within sequential data points collected over time. By applying various methods such

as moving averages, exponential smoothing, and decomposition techniques, we can uncover

underlying trends, seasonal effects, and irregular components that drive the behavior of the

data.

The semi-average method, as demonstrated, is particularly useful for identifying and

illustrating long-term trends by dividing data into segments and averaging them. This

simplicity makes it accessible and practical for initial trend detection and analysis.

Time series analysis extends beyond just academic or theoretical applications; it plays a vital

role in numerous real-world contexts. For businesses, it aids in sales forecasting, inventory

management, and financial planning. In economics, it helps in analyzing market trends and

economic indicators. For environmental studies, it assists in monitoring climate changes and

predicting weather patterns. Essentially, any field that relies on chronological data can benefit

from time series analysis.

Furthermore, time series analysis fosters a deeper understanding of past behaviors and equips

us with the foresight to make informed decisions about the future. By comprehensively

22 | 2 5
analyzing patterns and trends, organizations and individuals can anticipate changes, optimize

strategies, and mitigate risks.

The journey of mastering time series analysis is not only about grasping statistical techniques

but also about cultivating an intuitive sense of how time influences various phenomena. It

involves a blend of mathematical rigor and creative thinking, making it both a challenging and

rewarding endeavour.

In conclusion, time series analysis is an essential tool that offers deep insights and practical

solutions. It has wide-ranging applications that affect multiple fields and improve our ability

to handle the intricacies of time-dependent data. As we advance more sophisticated methods

and computational tools, the potential for time series analysis to drive innovation and enhance

decision-making will continue to expand. Approaching this analytical method with curiosity

and dedication paves the way for a better understanding of the ever-changing world around us.

23 | 2 5
References

Box, G. E. P., Jenkins, G. M., Reinsel, G. C., & Ljung, G. M. (2015). Time Series Analysis:
Forecasting and Control. Wiley.

Chatfield, C. (2003). The Analysis of Time Series: An Introduction. CRC Press.

DeLurgio, S. A. (1998). Forecasting Principles and Applications. McGraw-Hill.

Hamburg, M. (1985). Statistical Analysis for Decision Making. Harcourt Brace Jovanovich.

Hamilton, J. D. (1994). Time Series Analysis. Princeton University Press.

Harvey, A. C. (1990). Forecasting, Structural Time Series Models and the Kalman Filter.
Cambridge University Press.

Hirsch, W. Z. (1964). The Economics of State and Local Government. McGraw-Hill.

Kaplan, R. M., & Peskoe, S. B. (1972). John Graunt’s Natural and Political Observations Made
upon the Bills of Mortality. Johns Hopkins University Press.

Kendall, M. G., & Stuart, A. (1976). The Advanced Theory of Statistics (Vol. 3). Charles
Griffin.

Makridakis, S., & Hibon, M. (2000). The M3-Competition: Results, Conclusions and
Implications. International Journal of Forecasting.

Makridakis, S., Wheelwright, S. C., & Hyndman, R. J. (1998). Forecasting: Methods and
Applications. Wiley.

Montgomery, D. C., Jennings, C. L., & Kulahci, M. (2015). Introduction to Time Series
Analysis and Forecasting. Wiley.
Olufolabo, O., Talabi, C. O., Olufolabo, A. A., & Ayodeji, A. A. (2015). Time Series Analysis.
Principles & Practice of Statistics (pp. 484-515). Surulere, Lagos State, Nigeria:
COMSTA RESOURCES. Retrieved July 23, 2024

Rangayyan, R. M. (2001). Biomedical Signal Analysis: A Case-Study Approach. IEEE Press.

24 | 2 5
Hyndman, R. J., & Athanasopoulos, G. (2018). Forecasting: principles and practice. OTexts.
Chapter 2: Time Series Graphics.

Shumway, R. H., & Stoffer, D. S. (2017). Time Series Analysis and Its Applications: With R
Examples. Springer.

25 | 2 5

You might also like