You are on page 1of 5

TIME SERIES

Frequently, the data consist of numbers recorded by time period. For example, sales by
year, units of output by week, expenses by month and so on.

A series of values of a variable recorded for succeeding (berturut turut) time period is
called a time series. For example:

Year 1999 2000 2001 2002 2003 2004 2005 2006 2007
Sales 930 1028 1267 1035 1057 1332 1567 1757 1616
(hundreds)

Time series are analyzed to obtain measures that can be used for making current decision,
forecasting, and for planning future operations.

A time series has four components : long term trend (T), cycles(C), seasonal (S),
irregular(I).

A line describing a time series movements that persists(berlangsung) for many years is
called a long term trend.
Movements of the average level of a time series above and bellow the long term trend are
called cyclical movements.
A seasonal pattern is a within-a-year pattern whose shape repeats year after year.

Irregularities are random variations in a time series.

Trend

Linear Trend:

Trend equation is : Y’= a + b X,

Semi average Method

Steps
1. Divide the time series in two groups
2. Compute average of group I ( Y 1) and group II ( Y 2)
3. Trend equation is : Y’= a + b X , where Y= trend value, a= Y 1, b=( Y 2- Y 1)/n,
n=(middle time of group II - middle time of group I), X = year - middle time of
group I (as a base period/base year/tahun dasar).

If amount of years is odd, the mid year must not include either in group I or group II.
X=0 represents the mid year of Group I

1
Least Square Method

1. Linear Trend

Y’= a + b X
Where:
n Σ XY -(ΣX) (ΣY)
b= ________________
nΣ X2 -(Σ X )2

a = (Σ Y)/n - b (Σ X)/n

To simplify the formula, we code the year to make Σ X=0

Σ XY
b= ______
Σ X2

a = (Σ Y)/n

Example-1
The following time series data describes sales ( in thousands unit) of a company from
1990 to 1999.

Year 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999
Unit 23 28 34 35 40 41 48 50 58 60

Find Linear Trend Equation:


Year Y X Xy x2
1990 23 -9 -207 81
1991 28 -7 -196 49
1992 34 -5 -170 25
1993 35 -3 -105 9
1994 40 -1 -40 1
1995 41 1 41 1
1996 48 3 144 9
1997 50 5 250 25
1998 58 7 406 49
1999 60 9 540 81
Total 417 0 663 330
b= 663/330 = 2.01
a= 417/10= 41.7
Linear Trend Equation: Y’= 41.7 + 2.01 X
It means average sales at base is 41,700 and it increase by 2,010 per semester.

2
2. Quadratic Trend

Y’= a + b1 X + b2 X2
We use the following linear equation systems to find a and b2
(1) Σ Y = n a + b2 ΣX2
(2) Σ X2Y = a ΣX2+ b2 ΣX4
And We use the following formula to find b1
Σ XY
b1 = ______
Σ X2

Example-2
The following time series data describes amount of loan ( in billions rupiah) of a bank
from 1990 to 2000.
Year 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000
Loan 600 714 778 856 915 990 1025 1070 1100 1130 1140

Find Quadratic Trend Equation:


Year Y X XY X2 X2Y X4
1990 600 -5 -3000 25 15000 625
1991 714 -4 -2856 16 11424 256
1992 778 -3 -2334 9 7002 81
1993 856 -2 -1712 4 3424 16
1994 915 -1 -915 1 915 1
1995 990 0 0 0 0 0
1996 1025 1 1025 1 1025 1
1997 1070 2 2140 4 4280 16
1998 1100 3 3300 9 9900 81
1999 1130 4 4520 16 18080 256
2000 1140 5 5700 25 28500 625
Total 10318 0 5868 110 99550 1958

Find a and b2

10318 = 11 a + 110 b2 x 10
99550 = 110 a + 1958 b2

103180 = 110 a + 1100 b2


99550 = 110 a + 1958 b2

3630 = 0 a+ -858 b2

b2 = 3630 = -4,231
-858
a = 980,31

b1 = 5868 = 53,345
110

Quadratic Trend Equation: Y’= 980,31+ 53,345 X -4,23 X2

3
3. Exponential Trend
Y’= a b X
To find a and b, the first step is to convert Y’= a b X into linear model.
Y’= a b X
Log Y’= Log a b X
Log Y’= Log a + Log b X
Log Y’= Log a + X Log b
Y” = a’ + b’ X (linear model)

Where,

ΣY” ΣLogY
a’ = ______ = ______
n n

Σ XY” Σ XLogY
b’ = ______ = ______
ΣX2 ΣX2

Example-3
The following time series data describes production from 1990 to 2000.
Year 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000
Production 405 420 441 465 490 522 552 585 620 670 725

Find Exponential Trend Equation:

Year y x Log y x logy x2


1990 405 -5 2,607455 -13,03728 25
1991 420 -4 2,623249 -10,493 16
1992 441 -3 2,644439 -7,933316 9
1993 465 -2 2,667453 -5,334906 4
1994 490 -1 2,690196 -2,690196 1
1995 522 0 2,717671 0 0
1996 552 1 2,741939 2,741939 1
1997 585 2 2,767156 5,534312 4
1998 620 3 2,792392 8,377175 9
1999 670 4 2,826075 11,3043 16
2004 725 5 2,860338 14,30169 25
Total 5895 0 29,93836 2,770725 110

29.93836
a’=
11
a’= 2.721669

a= 102,721669=526.83

4
2.770725
b’=
110
b’= 0.025188

b= 100.025188=1.06

Exponential Trend Equation: Y’= 526.83 (1.06) X

4. Comparing Trend Fits


Statisticians use the sum of the squares of the Y-Y’ differences, Σ (Y-Y’)2 to measure
how well different trend fit a time series. For a given time series, a linear, a
parabolic(quadratic) and a exponential trend will not lead to the same Σ (Y-Y’)2 . The
best-fitting trend is the one that has the smallest Σ (Y-Y’)2.

Year 2000 2001 2002 2003 2004 2005


Y 6,2 6,4 6,9 7,7 8,8 10,4

The linear, parabolic(quadratic) and exponential trend for the time series are:
Linear Trend
Y= 7,733333 + 0,414286 X

Quadratic Trend
2
Y= 7,24375 + 0,414286 X + 0,041964 X

Exponential Trend
X
Y= 7,601592 1,053546

Linear Quadratic Exponential


Year Y Y' (Y-Y')2 Y' (Y-Y')2 Y' (Y-Y')2
2000 6,2 5,661905 0,289546 6,221429 0,000459 5,856473 0,118011
2001 6,4 6,490476 0,008186 6,378571 0,000459 6,500452 0,010091
2002 6,9 7,319048 0,175601 6,871429 0,000816 7,215242 0,099377
2003 7,7 8,147619 0,200363 7,7 7,89E-31 8,008631 0,095253
2004 8,8 8,97619 0,031043 8,864286 0,004133 8,889261 0,007967
2005 10,4 9,804762 0,354308 10,36429 0,001276 9,866725 0,284383
Sum 1,059048 0,007143 0,615082

The best-fitting trend is quadratic trend.

You might also like