Time-Series Analysis and Forecasting – Part IV To read at home.

30
Time-Series Analysis and Forecasting – Part IV To read at home

Transcript of Time-Series Analysis and Forecasting – Part IV To read at home.

Page 1: Time-Series Analysis and Forecasting – Part IV To read at home.

Time-Series Analysis and Forecasting – Part IV

To read at home

Page 2: Time-Series Analysis and Forecasting – Part IV To read at home.

Method of moving average

Page 3: Time-Series Analysis and Forecasting – Part IV To read at home.

Method of moving average consists in replacement of initial levels of

series by the average values, which are calculated for the successively

changing periods of time

Page 4: Time-Series Analysis and Forecasting – Part IV To read at home.

Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 19-4

Moving Averages

Example: Five-year moving average

First average:

Second average:

etc.

5

xxxxxx 54321*

5

5

xxxxxx 65432*

6

Page 5: Time-Series Analysis and Forecasting – Part IV To read at home.

Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 19-5

(2m+1)-Point Moving Average

A series of arithmetic means over time Result depends upon choice of m (the

number of data values in each average) Examples:

For a 5 year moving average, m = 2 For a 7 year moving average, m = 3 Etc.

Replace each xt with

m

mjjt

*t m)n,2,m1,m(tX

12m

1X

Page 6: Time-Series Analysis and Forecasting – Part IV To read at home.

sum sum average

2001 4,5 - - -

2002 4,3 - - -

2003 5,2 25 19,9 4,982004 5,3 26,5 21,35 5,342005 5,7 28,2 22,6 5,652006 6 28,9 23,3 5,832007 6 29,3 23,6 5,92008 5,9 - - -

2009 5,7 - - -

5,78

Five term moving averageYear yt

5,35,64

5,86--

Centered moving average

average

Four term moving average,

sum

--5 19,3

20,522,223

23,623,6

Page 7: Time-Series Analysis and Forecasting – Part IV To read at home.

Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 19-7

Year Sales

1

2

3

4

5

6

7

8

9

10

11

etc…

23

40

25

27

32

48

33

37

37

50

40

etc…

Annual Sales

0

10

20

30

40

50

60

1 2 3 4 5 6 7 8 9 10 11

Year

Sa

les

Page 8: Time-Series Analysis and Forecasting – Part IV To read at home.

Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 19-8

Calculating Moving Averages

Each moving average is for a consecutive block of (2m+1) years

Year Sales

1 23

2 40

3 25

4 27

5 32

6 48

7 33

8 37

9 37

10 50

11 40

Average Year

5-Year Moving Average

3 29.4

4 34.4

5 33.0

6 35.4

7 37.4

8 41.0

9 39.4

… …

5

322725402329.4

etc…

Let m = 2

Page 9: Time-Series Analysis and Forecasting – Part IV To read at home.

Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 19-9

Annual vs. 5-Year Moving Average

0

10

20

30

40

50

60

1 2 3 4 5 6 7 8 9 10 11

Year

Sal

es

Annual 5-Year Moving Average

Annual vs. Moving Average

The 5-year moving average smoothes the data and shows the underlying trend

Page 10: Time-Series Analysis and Forecasting – Part IV To read at home.

Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 19-10

Centered Moving Averages

Let the time series have period s, where s is even number i.e., s = 4 for quarterly data and s = 12 for monthly data

To obtain a centered s-point moving average series Xt

*:

Form the s-point moving averages

Form the centered s-point moving averages

(continued)

s/2

1(s/2)jjt

*.5t )

2

sn,2,

2

s1,

2

s,

2

s(txx

)2

sn,2,

2

s1,

2

s(t

2

xxx

*.5t

*.5t*

t

Page 11: Time-Series Analysis and Forecasting – Part IV To read at home.

Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 19-11

Centered Moving Averages Used when an even number of values is used in the moving

average Average periods of 2.5 or 3.5 don’t match the original

periods, so we average two consecutive moving averages to get centered moving averages

Average Period

4-Quarter Moving

Average

2.5 28.75

3.5 31.00

4.5 33.00

5.5 35.00

6.5 37.50

7.5 38.75

8.5 39.25

9.5 41.00

Centered Period

Centered Moving

Average

3 29.88

4 32.00

5 34.00

6 36.25

7 38.13

8 39.00

9 40.13

etc…

Page 12: Time-Series Analysis and Forecasting – Part IV To read at home.

Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 19-12

Calculating the Ratio-to-Moving Average

Now estimate the seasonal impact Divide the actual sales value by the centered

moving average for that period

*t

t

x

x100

Page 13: Time-Series Analysis and Forecasting – Part IV To read at home.

Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 19-13

Calculating a Seasonal Index

Quarter Sales

Centered Moving Average

Ratio-to-Moving Average

1

2

3

4

5

6

7

8

9

10

11

23

40

25

27

32

48

33

37

37

50

40

29.88

32.00

34.00

36.25

38.13

39.00

40.13

etc…

83.7

84.4

94.1

132.4

86.5

94.9

92.2

etc…

83.729.88

25(100)

x

x100

*3

3

Page 14: Time-Series Analysis and Forecasting – Part IV To read at home.

Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 19-14

Calculating Seasonal Indexes

Quarter Sales

Centered Moving Average

Ratio-to-Moving Average

1

2

3

4

5

6

7

8

9

10

11

23

40

25

27

32

48

33

37

37

50

40

29.88

32.00

34.00

36.25

38.13

39.00

40.13

etc…

83.7

84.4

94.1

132.4

86.5

94.9

92.2

etc…

1. Find the median of all of the same-season values

2. Adjust so that the average over all seasons is 100

Fall

Fall

Fall

(continued)

Page 15: Time-Series Analysis and Forecasting – Part IV To read at home.

Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 19-15

Interpreting Seasonal Indexes

Suppose we get these seasonal indexes:

SeasonSeasonal

Index

Spring 0.825

Summer 1.310

Fall 0.920

Winter 0.945

= 4.000 -- four seasons, so must sum to 4

Spring sales average 82.5% of the annual average sales

Summer sales are 31.0% higher than the annual average sales

etc…

Interpretation:

Page 16: Time-Series Analysis and Forecasting – Part IV To read at home.

Analytical smoothing of time series

Page 17: Time-Series Analysis and Forecasting – Part IV To read at home.

Levels of time series are considered as the function of time

tˆ f(t)y

Page 18: Time-Series Analysis and Forecasting – Part IV To read at home.

The procedure of smoothing has 3 steps    choice of the form of function;

   determination of parameters of the function; receiving the smoothed values of the levels of series on the basis of the function

Page 19: Time-Series Analysis and Forecasting – Part IV To read at home.

Let’s consider this method on the example of linear trend equation

where a & b – parameters; t – time

ty a b t,

Page 20: Time-Series Analysis and Forecasting – Part IV To read at home.

The best way to use linear trend in cases, when the preliminary

investigation shows, that levels of series change with approximately the same speed, i.e. when chain absolute

increases are approximately equal

Page 21: Time-Series Analysis and Forecasting – Part IV To read at home.

Parameters a & b are determined by the least square method LSM

Page 22: Time-Series Analysis and Forecasting – Part IV To read at home.

The usage of LSM gives the following system of equations for

determining the parameters:

tytbna

t)(ytbta t2

Page 23: Time-Series Analysis and Forecasting – Part IV To read at home.

The given system of equations can be significantly simplified, if we

enumerate the time in the way, that

0t

Page 24: Time-Series Analysis and Forecasting – Part IV To read at home.

If the series contains odd number of levels, then the central level of series is enumerated as 0. Levels to the side of

decrease of time are enumerated by -1;-2;-3..., to the side of increase of time –

by 1;2;3...

Page 25: Time-Series Analysis and Forecasting – Part IV To read at home.

If the series contains even number of levels, then the closest levels to the

center are enumerated by -1 and 1, then numeration is the same as with odd

number of levels but only with the step 2: ...-5,-3,-1,+1,+3,+5...

Page 26: Time-Series Analysis and Forecasting – Part IV To read at home.

tyna

n

ya t

2

t

t

t)(ybt)(ytb t

2

Page 27: Time-Series Analysis and Forecasting – Part IV To read at home.

Year

2005 800 - -2 4 -1600 798,2 0,24

2006 857 57 -1 1 -857 857,7 0,49

2007 915 58 0 0 0 917,2 4,84

2008 976 61 1 1 976 976,7 0,49

2009 1038 62 2 4 2076 1036,2 3,24

Total: 4586 - 0 10 595 4586,0 12,3

ty цtΔ t 2t ty t t

Λ

y2

Λ

tt )y(y

Page 28: Time-Series Analysis and Forecasting – Part IV To read at home.

917,25

4586a

59,510

595b

ty 917,2 59,5 t

Page 29: Time-Series Analysis and Forecasting – Part IV To read at home.

Year

2005 800 - -2 4 -1600 798,2 0,24

2006 857 57 -1 1 -857 857,7 0,49

2007 915 58 0 0 0 917,2 4,84

2008 976 61 1 1 976 976,7 0,49

2008 1038 62 2 4 2076 1036,2 3,24

Total: 4586 - 0 10 595 4586,0 12,3

ty цtΔ t 2t ty t t

Λ

y 2Λ

tt )y(y

Page 30: Time-Series Analysis and Forecasting – Part IV To read at home.

End of Part IV

To be continued…

Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 19-30