Você está na página 1de 11

CHAPTER 15 Time Series Analysis page 651 15. Introduction page 651 Chapter 15 deals ith the !

asic components o" time series# time series decomposition# and simple "orecasting. At the end o" this chapter# you should $no the "ollo ing% The "our possi!le components o" a time series. Ho to use smoothing techni&ues to remo'e the random 'ariation and identi"y the remaining components. Ho to use the linear and &uadratic regression models to analy(e the trend. Ho to measure the cyclical e""ect using the percentage o" trend method. Ho to measure the seasonal e""ect !y computing the seasonal indices. Ho to calculate )A* and R)SE to determine hich "orecasting model or$s !est. *e"inition A time series is a collection o" data o!tained !y o!ser'ing a response 'aria!le at periodic points in time. *e"inition I" repeated o!ser'ations on a 'aria!le produce a time series# the 'aria!le is called a time series 'aria!le. +e use ,i to denote the 'alue o" the 'aria!le at time i.

-our possi!le components% Trend . secular trend/ 00 1ong term pattern or direction o" the time series Cycle . cyclical e""ect/ 00 +a'eli$e pattern that 'aries a!out the long0term trend# appears o'er a num!er o" years e.g. !usiness cycles o" economic !oom hen the cycle lies a!o'e the trend line and economic recession hen the cycle lies !elo the secular trend. Seasonal 'ariation 00 Cycles that occur o'er short periods o" time# normally 2 1 year e.g. monthly# ee$ly# daily. Random 'ariation . residual e""ect/ 00Random or irregular 'ariation that a time series sho s Could !e additi'e% ,i 3 Ti 4 Ci 4 Si 4 Ii or multiplicati'e% ,i 3 Ti 5 Ci 5 Si 5Ii

-orecasting using smoothing techni&ues The t o commonly used smoothing techni&ues "or remo'ing random 'ariation "rom a time series are mo'ing a'erages and e5ponential smoothing. )o'ing a'erage% . )A/ )o'ing a'erages in'ol'e a'eraging the time series o'er a speci"ied num!er o" periods. +e usually choose odd num!er o" periods so e can center the a'erages at particular periods "or graphing purposes. I" e use an e'en period# e may center the a'erages !y "inding t o0 period mo'ing a'erages o" the mo'ing a'erages. )o'ing a'erages aid in identi"ying the secular trend o" a time series !ecause the a'eraging modi"ies the e""ect o" cyclical or seasonal 'ariation. i.e. a plot o" the mo'ing a'erages yields a 6smooth7 time series cur'e that clearly sho s the long term trend and clearly sho s the e""ect o" a'eraging out the random 'ariations to re'eal the trend. )o'ing a'erages are not restricted to any periods or points. -or e5ample# you may ish to calculate a 80point mo'ing a'erage "or daily data# a 190point mo'ing a'erage "or monthly data# or a 50point mo'ing a'erage "or yearly data. Although the choice o" the num!er o" points is ar!itrary# you should search "or the num!er : that yields a smooth series# !ut is not so large that many points at the end o" the series are ;lost.; The method o" "orecasting ith a general 10point mo'ing a'erage is outlined !elo here 1 is the length o" the period.

-orecasting <sing an 10Point )o'ing A'erage 1. Select 1# the num!er o" consecuti'e time series 'alues ,1# Y2. . . ,1 that ill !e a'eraged. .The time series 'alues must !e e&ually spaced./ 9. Calculate the 10point mo'ing total# !y summing the time series 'alues o'er 1 ad=acent time periods. >. Compute the 10point mo'ing a'erage# )A# !y di'iding the corresponding mo'ing total !y 1

?. @raph the mo'ing a'erage )A on the 'ertical a5is ith time i on the hori(ontal a5is. .This plot should re'eal a smooth cur'e that identi"ies the long0term trend o" the time series./ E5tend the graph to a "uture time period to o!tain the "orecasted 'alue o" )A.

E5ponential smoothing% Ane pro!lem ith using a mo'ing a'erage to "orecast "uture 'alues o" a time series is that 'alues at the ends o" the series are lost# there!y re&uiring that e su!=ecti'ely e5tend the graph o" the mo'ing a'erage into the "uture. :o e5act calculation o" a "orecast is a'aila!le since the mo'ing a'erage at a "uture time period t re&uires that e $no one or more "uture 'alues o" the series. E5ponential smoothing is a techni&ue that leads to "orecasts that can !e e5plicitly calculated. 1i$e the mo'ing a'erage method# e5ponential smoothing de0emphasi(es .or smoothes/ most o" the residual e""ects. To o!tain an e5ponentially smoothed time series# e "irst need to choose a eight +# !et een B and 1# called the e5ponential smoothing constant. The e5ponentially smoothed series# denoted Ei# is then calculated as "ollo s% Ei3 + ,i4.10 +/Ei01 ."or iC39/ here Ei 3 e5ponentially smoothed time series ,i 3 o!ser'ed 'alue o" the time series at time i Ei01 3 e5ponentially smoothed time series at time i01 + 3 smoothing constant# here B23 + 231 Degin !y setting E13,1 E93 + ,94.10 +/E1 E>3 + ,>4.10 +/E9 . . Ei3 + ,i4.10 +/Ei01 ,ou can see that the e5ponentially smoothed 'alue at time i is simply a eighted a'erage o" the current time series 'alue# ,i# and the e5ponentially smoothed 'alue at the pre'ious time period# Ei01. Smaller 'alues o" + gi'e less eight to the current 'alue# , i. +hereas larger 'alues gi'e more eight to ,i The "ormula indicates that the smoothed time series in period i depends on all the pre'ious o!ser'ations o" the time series. The smoothing constant + is chosen on the !asis o" ho much smoothing is re&uired. A small 'alue o" + produces a great deal o" smoothing. A large 'alue o" + results in 'ery little smoothing. E5ponential smoothing helps to remo'e random 'ariation in a time series. Decause it uses the past and current 'alues o" the series# it is use"ul "or "orecasting time series. The o!=ecti'e o" the time series analysis is to "orecast the ne5t 'alue o" the series# -i41. The e5ponentially smoothed "orecast "or -i413 Ei here Ei3 + ,i4.10 +/Ei01

is the "orecast o" ,i41 since the e5ponential smoothing model assumed that the time series has little or no trend or seasonal component. The "orecast -i is used to "orecast not only ,i41 !ut also all "uture 'alue o" ,i.
i.e. -i 3

+ ,i4.10 +/Ei01# i 3 n 4 1# n 4 9# . . .

This points out one disad'antage o" the e5ponential smoothing "orecasting techni&ue. Since the e5ponentially smoothed "orecast is constant "or all "uture 'alues# any changes in trend andEor seasonality are not ta$en into account. There"ore# e5ponentially smoothed "orecasts are appropriate only hen the trend and seasonal components o" the time series are relati'ely insigni"icant.

-orecasting% The Regression Approach


)any "irms use past sales to "orecast "uture sales. Suppose a holesale distri!utor o" sporting goods is interested in "orecasting its sales re'enue "or each o" the ne5t 5 years. Since an inaccurate "orecast may ha'e dire conse&uences to the distri!utor# some measure o" the "orecastFs relia!ility is re&uired. To ma$e such "orecasts and assess their relia!ility# an in"erential time series "orecasting model must !e constructed. The "amiliar general linear regression model represents one type o" in"erential model since it allo s us to calculate prediction inter'als "or the "orecasts.

,EAR SA1ES t y 1 ?.G 9 ?.B > 5.5 ? 15.6 5 9>.1 6 9>.> 8 >1.? G ?6.B H ?6.1 1B ?1.H 11 ?5.5 19 5> 5

,EAR SA1ES ,EAR SA1ES t y t y 1> ?G.? 95 1BB.> 1? 61.6 96 111.8 15 65.6 98 1BG.9 16 81.? 9G 115.5 18 G>.? 9H 11H.9 1G H>.6 >B 195.9 1H H?.9 >1 1>6.> 9B G5.? >9 1?6.G 91 G6.9 >> 1?6.1 99 GH.H >? 151.? 9> GH.9 >5 15B.H 9? HH.1

To illustrate the techni&ue o" "orecasting ith regression# consider the data in the Ta!le a!o'e. The data are annual sales .in thousands o" dollars/ "or a "irm .say# the sporting goods distri!utor/ in each o" its >5 years o" operation.

A scatter plot o" the data is sho n !elo and re'eals a linearly increasing trend # ANNUAL SALES
200 150 100 50 0 0 10 20 YEARS 30 40

Sales

SALES y

so the "irst0order .straight0line/ model E.,i/ 3 Io 4 I1i seems plausi!le "or descri!ing the secular trend. The regression analysis printout "or the model gi'es R9 3 .HG# - 3 1#615.89? .p0'alue 2 .BBB1/# and s 3 6.>G59?. The least s&uares prediction e&uation is Yi = Bo + B1i = .?B151> 4 ?.9H56>Bi
The prediction inter'als "or i 3 >6# >8# . . .# ?B iden as e attempt to "orecast "arther into the "uture. Intuiti'ely# e $no

accuracy o" the "orecast since some une5pected change in !usiness and economic conditions may ma$e the model inappropriate. Since e ha'e less con"idence in the "orecast "or# say# i 3 ?B than "or t 30>6# it "ollo s that the prediction inter'al "or i 3 ?B must !e ider to attain a H5J le'el o" con"idence. -or this reason# time series "orecasting .regardless o" the "orecasting method/ is generally con"ined to the short term.
that the "arther into the "uture e "orecast# the less certain e are o" the

)ultiple regression models can also !e used to "orecast "uture 'alues o" a time series seasonal 'ariation. +e illustrate ith an e5ample. EKA)P1E Re"er to the 1HH101HH? &uarterly po er loads listed in the attached Ta!le . a. Propose a model "or &uarterly po er load# yL# that trend and seasonal 'ariation present in the series.

ith

ill account "or !oth the secular

!. -it the model to the data# and use the least s&uares prediction e&uation to "orecast the utility companyMs &uarterly po er loads in 1HH5. Construct H5J con"idence inter'als "or the "orecasts.

Solution a. A common ay to descri!e seasonal di""erences in a time series is ith dummy 'aria!les. -or &uarterly data# a model that includes !oth trend and seasonal components is E.Yi/ 3 Do 4 Dli 4 D9K1 4 D>K9 4 D?K> Trend Seasonal component
here

here
i 3 Time period# ranging "rom i 3 1 "or &uarter I o" 1HH1 to i 3 16 "or &uarter IN o" 1HH? ,i 3 Po er load .mega atts/ in time i

X1O3 1 i" &uarter I


A i" not

K9 31 i" &uarter II
A i" not

K> 31 i" &uarter III


A i" not The coe""icients associated

Dase le'el 3 &uarter IN

ith the seasonal dummy 'aria!les determine the mean increase .or decrease/ in po er load

"or each &uarter# relati'e to the !ase le'el &uarter# &uarter IN. !. The model is "itted to the data using the SAS multiple regression routine. The resulting SAS printout is sho n !elo . 9 :ote that the model appears to "it the data &uite ell% R 3 .HH89# indicating that the model accounts "or HH.8J o" the sample 'ariation in po er loads o'er the ?0year periodP - 3 H6G.H69 strongly supports the hypothesis that the model has predicti'e utility .p0'alue 3 .BBB1/P and the standard de'iation# Root )SE 3 1.5>9?9# implies that the model predictions ill usually !e accurate to ithin appro5imately 49.1.5>/# or a!out 4>.B6 mega atts. -orecasts and corresponding H5J prediction inter'als "or the 1HH5 po er loads are reported in the !ottom portion o" the printout . -or e5ample# the "orecast "or po er load in &uarter I o" 1HH5 is 1G?.8 mega atts inter'al .1GB.5# 1GG.H/. There"ore# using a H5J prediction inter'al# ith the H5J prediction

e e5pect the po er load in &uarter I o" 1HH5 to "all

!et een 1GB.5 and 1GG.H mega atts. Recall "rom the Ta!le that the actual 1HH5 &uarterly po er loads are 1G1.5# 185.9# 1H5.B and1GH.># respecti'ely. :ote that each o" these "alls ithin its respecti'e H5J prediction inter'al sho n.

)any descripti'e "orecasting techni&ues ha'e pro'ed their merit !y pro'iding good "orecasts "or particular applications. :e'ertheless# the ad'antage o" "orecasting using the regression approach is clear% Regression analysis pro'ides us ith a measure o" relia!ility "or each "orecast through prediction inter'als. Ho e'er# there are t o pro!lems

associated ith "orecasting time series using a multiple regression model.

PRAD1E) 1 +e are using the least s&uares prediction e&uation to "orecast 'alues outside the region o" o!ser'ation o" the independent 'aria!le# t. -or e5ample# suppose e are "orecasting "or 'alues o" t !et een 18 and 9B .the "our &uarters o"

1HH5/# e'en though the o!ser'ed po er loads are "or t 'alues !et een 1 and 16. As noted earlier# it is ris$y to use a least s&uares regression model "or prediction outside the range o" the o!ser'ed data !ecause some unusual changeQeconomic#

political# etc.Qmay ma$e the model inappropriate "or predicting "uture e'ents. Decause "orecasting al ays in'ol'es predictions a!out "uture 'alues o" a time series# this pro!lem o!'iously cannot !e a'oided. Ho e'er# it is important that the "orecaster recogni(e the dangers o" this type o" prediction.

PRAD1E) 9 Recall the standard assumptions made a!out the random error component o" a multiple regression model . +e assume that the errors ha'e mean B# constant 'ariance# normal pro!a!ility distri!utions# and are inde pendent. The latter assumption is o"ten 'iolated in time series that e5hi!it short term trends. As an illustration# re"er to the plot o" the sales re'enue data. :otice that the o!ser'ed sales tend to de'iate a!out the least s&uares line in positi'e and negati'e runs. That is# i" the di""erence !et een the o!ser'ed sales and predicted sales in year t is positi'e .or negati'e/# the di""erence in year t 4 1 tends to !e positi'e .or negati'e/. Since the 'ariation in the yearly sales is systematic# the implication is that the errors are correlated. Niolation o" this standard regression assumption could lead to unrelia!le "orecasts.

)easuring "orecast accuracy .)A*/ -orecast error is de"ined as the actual 'alue o" the series at time i minus the "orecast 'alue# i.e. ,i 0 R i. This can !e used to e'aluate the accuracy o" the "orecast. T o o" the procedures "or the e'aluation are to "ind the mean a!solute de'iation )A*3 S ,i 0 R i S E: and .9/ R)SE3 . ,i 0 R i/9 E: .1/ *escripti'e Analysis% Inde5 num!ers Time series data li$e other sets o" data are su!=ect to t o $inds o" analyses% *escripti'e and in"erential analysis The most common method to descri!e a !usiness or economic time series is to compute inde5 num!ers. I:*EK :<)DERS *e"inition% An inde5 num!er is a num!er that measures the change in a 'aria!le o'er time relati'e to the 'alue o" the 'aria!le during a speci"ic !ase period. The t o most important are price inde5 and &uantity inde5. Price inde5es measure changes in price o" a commodity or a group o" commodities o'er time. The Consumer Price Inde5 .CPI/ is a price inde5# hich measures price changes o" a group o" commodities o'er time. An the other hand# an inde5 constructed to measure the change in the total num!er o" commodities produced annually is a good e5ample o" a &uantity inde5# computations here could !e complicated.

Simple Inde5 :um!ers% *e"inition% +hen an inde5 num!er is !ased on the price or &uantity o" a single commodity# it is called a simple inde5 num!er. e.g. to construct a simple inde5 T "or the price o" sil'er !et een 1H8501HH5# e might choose a !ase period# say 1H85. To calculate the simple inde5 num!er "or any year# e di'ide that yearFs price !y the price during the !ase year and multiply !y 1BB e.g. "or 1HGB# sil'er price inde5 3.9B.6?E?.?9/U1BB3?66.H8 The inde5 T "or the !ase year is al ays 1BB. The increase ?66.H8 V 1BB3 >66.H8 gi'es the increase in the price o" sil'er o'er the year.

)easuring the cyclical e""ect% *i""erences !et een cyclical and seasonal 'ariation is the length o" time period. Also# seasonal e""ects are predicta!le hile cyclical e""ects are &uite unpredicta!le. +e use percentage o" trend to identi"y cyclical 'ariation. The calculation is carried out as "ollo s% .1/ *etermine the trend line .!y regression/ .9/ -or each time period# compute the trend 'alue R .>/ The J o" trend is .,E R/U1BB See study guide pages 9H?0 9H6 +hether graphed or not# e should loo$ "or cycle hose pea$s and 'alleys and time periods are appro5imately e&ual. Ho e'er# in practice# random 'ariation is li$ely to ma$e it di""icult to see cycles. )easuring the Seasonal E""ect% Seasonal e""ect may occur ithin a year# month# ee$ or day. To measure seasonal e""ect# e construct seasonal inde5es# hich attempt to gauge the degree to hich the seasons di""er "rom one another. Ane re&uirement "or this method is that e ha'e a time series su""iciently long to allo us to o!ser'e the 'aria!le o'er se'eral seasons. The seasonal inde5es are computed as "ollo s% .1/ Remo'e the e""ect o" seasonal and random 'ariation. This can !e accomplished in one o" t o ays%

-irst% Calculate mo'ing a'erage !y setting the num!er o" periods in the mo'ing a'erage e&ual to the num!er o" types o" seasons# e.g. i" the seasons represent &uarters# then a ?0period mo'ing a'erage ill !e most suita!le. The e""ect o" the )i is seen as "ollo s% Assuming a multiplicati'e model# ,i 3 Ti 5 Ci 5 Si 5Ii

)A remo'es Si and Ri lea'ing )Ai 3 Ti 5 Ci Dy ta$ing the ratio o" the time series and the )A# e o!tain ,i E )Ai 3 Ti 5 Ci 5 Si 5Ii E Ti 5 Ci 3 Si 5Ii Second )ethod% I" the time series is not cyclical# e ha'e ,i 3 Ti 5 Si 5Ii So# ,iERi3 Si 5Ii Since Ri represents the trend 3 Ti The t o methods thus yield the same results. .9/ -or each type o" seasons# calculate the a'erage o" the ratios in step 1. This procedure remo'es most o" the random 'ariation. The a'erage is a measure o" seasonal di""erences. The seasonal inde5es are the a'erage ratio "rom step9 ad=usted to ensure that the a'erage seasonal inde5 is 1.

*etecting Residual Correlation% The *ur!inQ+atson Test )any types o" !usiness data are o!ser'ed at regular time inter'als thus gi'ing rise to time series data. +e o"ten use regression models to estimate the Trend component o" a time series 'aria!le. Ho e'er# regression models o" time series may pose a special pro!lem. Decause !usiness time series tend to "ollo economic trends and seasonal cycles# the 'alue o" a time series at time t is o"ten indicati'e o" its 'alue at time .i 4 1/. That is# the 'alue o" a time series at time t is correlated ith its 'alue at time .i 4 1/. I" such a series is used as the dependent 'aria!le in a regression analysis# the result is that the random errors are correlated# and this 'iolates one o" the assumptions !asic to the least s&uares in"erential procedures. Conse&uently# e cannot apply the standard least s&uares in"erence0ma$ing tools and ha'e con"idence in their 'alidity. In this section# e present a method o" testing "or the presence o" residual correlation. Consider the time series data in the Ta!le !elo # hich gi'es sales data "or the >5 year history o" a company. The computer printout sho n !elo gi'es the regression analysis "or the "irst0order linear model ,i 3 DB 4 D1i 4 e This model seems to "it the data 'ery ell# since R9 3 .HG and the - 'alue .1#615.89/ that tests the ade&uacy o" the model is signi"icant. The hypothesis that the D1 coe""icient is positi'e is accepted at almost any alpha le'el .i 3 ?B.9 ith >> d"/ The residuals e0hat 3 , 0 .DB 4 D1i/ are plotted in . :ote that there is a distinct tendency "or the residuals to ha'e long positi'e and negati'e runs. That is# i" the residual "or year i is positi'e# there is a tendency "or the residual "or year

.i4 1/ to !e positi'e. These cycles are indicati'e o" possi!le positi'e correlation !et een residuals. T A D 1 E A -innMs Annual Sales Re'enue .thousands o" dollars/ ,EAR SA1ES t y 1 ?.G 9 ?.B > 5.5 ? 15.6 5 9>.1 6 9>.> 8 >1.? G ?6.B H ?6.1 1B ?1.H 11 ?5.5 19 5> 5 ,EAR SA1ES ,EAR SA1ES t , t y 1> ?G.? 95 1BB.> 1? 61.6 96 111.8 15 65.6 98 1BG.9 16 81.? 9G 115.5 18 G>.? 9H 11H.9 1G H>.6 >B 195.9 1H H?.9 >1 1>6.> 9B G5.? >9 1?6.G 91 G6.9 >> 1?6.1 99 GH.H >? 151.? 9> GH.9 >5 15B.H 9? HH.1

-or most economic time series models# e ant to test the null hypothesis Ho% :o residual correlation against the alternati'e Ha% Positi'e residual correlation e5ists since the hypothesis o" positi'e residual correlation is consistent ith economic trends and seasonal cycles. The *ur!in0+atson d statistic is used to test "or the presence o" residual correlation. This statistic is gi'en !y the "ormula at the !ottom o" page 81? and has 'alues that range "rom B0? ith interpretations as "ollo s%

Summary o" the interpretations o" the *ur!in0+atson d statistic 1. I" the residuals are uncorrelated# d is appro5. 3 9 9. I" the residuals are positi'ely correlated# d 2 9# and i" the correlation is 'ery strong# d is appro5. 3 B >. I" the residuals are negati'ely correlated# d C 9# and i" the correlation is 'ery strong# d is appro5. 3 ?

10

As indicated in the printout "or the sales e5ample# the computed 'alue o" d, .G91# is less than the ta!ulated 'alue o" d1# 1.?B. Thus# e conclude that the residuals o" the straight0line model "or sales are positi'ely correlated.

)o'ing a'erages can also !e used to pro'ide some measure o" seasonal e""ects in a time series. The ratio !et een the o!ser'ed ,i and the mo'ing a'erage measures the seasonal e""ect "or that period.

11

Você também pode gostar