time series analysis a time series is a collection of data recorded over a period of time –...
TRANSCRIPT
Time Series Analysis
A time series is a collection of data recorded over a period of time – weekly, monthly, quarterly or yearly.
Examples:
1. The hourly temperature recorded at a locality for a period of years.2. The weekly prices of wheat in Dhaka.3. The monthly consumption of electricity in a certain town.4. The monthly total passengers carried bay a train.5. The quarterly sales of a certain fertilizer.6. The annual rainfall at a place for a number of years.7. The students enrolment of a college over a number of years.
Application
Time Series Analysis is used for many applications such as:
Economic Forecasting Sales ForecastingBudgetary Analysis Stock Market AnalysisYield Projections Process and Quality ControlInventory Studies Workload ProjectionsUtility Studies Census Analysis
and many, many more...
Components of a time series
There are four components of a time series:
1. The trend2. The cyclical variation3. The seasonal variation and 4. The irregular variation.
Secular trend
The smooth long-term direction of a time series. The long-term trends of sales, employment, stock prices and other business and economic series follow various patterns. Some move steadily upward, others decline, and still others stay the same over time.
Example: Wheat production of Chittagong district from 1991 to 1995.
Year 1991 1992 1993 1994 1995
Production (M. ton)
20 22 25 26 32
1990 1991 1992 1993 1994 1995 1996
20
22
24
26
28
30
32
Year
Pro
duct
ion
(M. t
on)
Example: Number of officers in Sonali bank from 1985 to 1990.
Year 1985 1986 1987 1988 1989 1990
Officer 1000 700 500 400 300 300
1984 1986 1988 1990
300
400
500
600
700
800
900
1000
Year
No.
of o
ffice
r
Cyclical variation
A typical business cycle consists of a period of prosperity followed by periods of recession, depression, and then recovery.
In a recession, for example, employment, production, the Dow Jones Industrial Average, and many other business and economic series are below the long term trend lines. Conversely, in periods of prosperity they are above their long-term trend lines.
Example: Following figure shows the number of batteries sold by National Battery Sales, Inc. from 1988 to 2005. The cyclical nature of business is highlighted.
Seasonal variation
Patterns of change in a time series within a year. These patterns tend to repeat themselves each year. The unit of time reported is either quarterly or monthly.
Example: Men’s and boy’s clothing have extremely high sales just prior to Eid-ul-fitr and relatively low sales after it.
Example: Following figure shows the quarterly sales, in millions dollars, of a sporting goods company that specializes in selling baseball and softball equipment for high schools, colleges and youth leagues. There is a distinct seasonal pattern to their business. Most of the sales are in the first and second quarters of the of the year, when schools and organizations are purchasing equipment for the upcoming season.
Irregular variation
The irregular variations occur in a completely unpredictable manner as they are caused by some unusual events such as floods, droughts, strikes, fires, earthquakes, wars and political events and so forth.
Example: Monthly Value of Building Approvals, Australian Capital Territory (ACT).
Measures of trend
To measure a trend which can be represented by a straight line or some type of smooth curve, the following methods are used:
1. Freehand curve2. Semi average method3. Moving average method and4. Method of least squares
Freehand curve
Plot the given data on a graph paper and join the plotted points by segments of straight line. Draw a straight line freehand passing through the plotted points in a way such that the general direction of change in values is indicated.
Example: Export quantity in ton of a food from 1971 to 1978:
Year 1971 1972 1973 1974 1975 1976 1977 1978
Export(ton) 70 90 103 75 85 115 120 130
1970 1972 1974 1976 19780
20
40
60
80
100
120
Year
Ton
Semi average method
Divide the values in the series into two equal parts. Find the average values of each part and place the average values against the respective mid points of the two parts. Plot these two average values on the graph of the original values and draw a straight line connecting the two points and extend the line to cover the whole series.
Example: Export (Lac ton) information of Bangladesh from 1990 to 1998:
Year Export Total Average
1990 100
1991 110
1991.5 485 121.25
1992 125
1993 150
1994 130
1995 135
1996 160
1996.5 600 150
1997 145
1998 160
1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 199960
80
100
120
140
160
Year
Exp
ort
Moving average method
The moving average method is not only useful in smoothing a time series to see its trend, it is the basic method used in measuring the seasonal fluctuation. The moving average only smooths the fluctuations in the data. This is accomplished by ‘moving’ the average values through the time series.
The k period moving averages are defined as the averages calculated using the k consecutive values of the observed series.
Each k period moving average is placed against the middle of its time period.
These average values are plotted on the graph of the original values and the line connecting these points is the moving average trend.
Example: From the information below draw a 3-year moving average trend.
Year Export 3-year total
3-year average
1973 9
1974 10 31 10.3
1975 12 33 11
1976 11 40 13.3
1977 17 44 14.7
1978 16 53 17.7
1978 20 57 19
1980 21
1972 1973 1974 1975 1976 1977 1978 1979 1980 19818
10
12
14
16
18
20
22
Year
Exp
ort
original
3-year
Exercise 1: From the information below draw 4-year moving average trend.
Year Export 4-year mid average 4-year average
1982 52
1983 63
67
1984 75 70.75
74.5
1985 78 77.87
81.25
1986 82 83.75
86.25
1987 90 89
91.75
1988 95
1989 100
Method of least squares
A trend can be represented by a mathematical equation of the form of a straight line. The straight line equation can be represented by
bxay '
y’ is the projected value of y and y is the time series variable.a is the y intercept. It is the estimated value when x=0.b is the slope of the line, or the average change in y.x is the value of time.
If we can convert x is such a way that the sum of converted x is zero, then the value of a and b can be estimated as:
2,
x
xybya
Example: From the information below using least square method draw the trend.
Year (X)
Production (y)
x xy y’
1985 27 -4 -108 16 25.58
1986 29 -3 -87 9 26.63
1987 30 -2 -60 4 27.68
1988 24 -1 -24 1 28.73
1989 28 0 0 0 29.78
1990 25 1 25 1 30.83
1991 34 2 68 4 31.88
1992 35 3 105 9 32.93
1993 36 4 144 16 33.98
Total 268 0 63 60 268
2x
xy
a
b
05.178.29'
78.299/268
05.160/63
1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994
24
26
28
30
32
34
36
Year
Pro
du
ctio
n
original
least square
Exercise 2: From the information below draw a trend using least square method.
Year (X)
Production (y)
x xy y’
1988 800 -7 -5600 49 743.74
1989 750 -5 -3750 25 730.35
1990 800 -3 -2400 9 716.96
1991 550 -1 -550 1 703.57
1992 600 1 600 1 690.18
1993 650 3 1950 9 676.78
1994 675 5 3375 25 663.40
1995 750 7 5250 49 650.00
Total 5575 0 -1125 168 5574.98
2x
xy
a
b
696.6875.696'
875.6968/5575
696.6168/1125