time series analysis by salah uddin

12
COURSE CODE: EMIS-506, BUSINESS STATISTICS DR. K. M. SALAH UDDIN, ASSOCIATE PROFESSOR DEPARTMENT OF MANAGEMENT INFORMATION SYSTEMS (MIS) UNIVERSITY OF DHAKA TIME SERIES ANALYSIS Time Series Analysis A time series is a set of observed values, such as production or sales data, for a sequentially ordered series of time periods. Examples of such data are sales of a particular product for a series of months and the number of workers employed in a particular industry for a series of years. Mathematically, A time series is a set of observations taken at specified times, usually at equal intervals. Mathematically, a time series is defined by the values Y 1 ,,Y 2 ,…..of a variable Y at times t 1 , t 2 ,….. Thus Y is a function of t , symbolized Y=F(t). Role of Time Series Analysis Time series analysis is of great significance in decision-making for the following reasons: 1. It helps in the understanding of past behavior by observing data over a period of time; one can easily understand what changes

Upload: nazim-uddin-mahmud

Post on 18-Aug-2015

215 views

Category:

Documents


0 download

DESCRIPTION

Time Series Analysis by salah uddin

TRANSCRIPT

COURSE CODE: EMIS-506, BUSINESS STATISTICS DR. K. M. SALAH UDDIN, ASSOCIATE PROFESSOR DEPARTMENT OF MANAGEMENT INFORMATION SYSTEMS (MIS) UNIVERSITY OF DHAKA TIME SERIES ANALYSIS Time Series Analysis Atimeseriesisasetofobservedvalues,suchasproductionorsales data, for a sequentially ordered series of time periods. Examples of such dataaresalesofaparticularproductforaseriesofmonthsandthe numberofworkersemployedinaparticularindustryforaseriesof years. Mathematically, A time series is a set of observations taken at specified times, usually at equalintervals.Mathematically,atimeseriesisdefinedbythevalues Y1,,Y2,..ofavariableYattimest1,t2,..ThusYisafunctionoft, symbolized Y=F(t). Role of Time Series Analysis Timeseriesanalysisisofgreatsignificanceindecision-makingforthe following reasons: 1.I t helps in the understanding of past behavior byobservingdata overaperiodoftime;onecaneasilyunderstandwhatchanges COURSE CODE: EMIS-506, BUSINESS STATISTICS DR. K. M. SALAH UDDIN, ASSOCIATE PROFESSOR DEPARTMENT OF MANAGEMENT INFORMATION SYSTEMS (MIS) UNIVERSITY OF DHAKA havetakenplaceinthepast.Suchanalysiswillbeextremely helpful in predicting future behavior.2.I thelpsinplanningfutureoperations.Infact,thegreatest potential of time series lies in predicting an unknown value of the series.Fromthisinformationintelligentchoicescanbemade concerningcapitalinvestmentdecisions,decisionsconcerning production and inventory etc.3.I thelpsinevaluatingcurrentaccomplishments.Theactual performancecanbecomparedwiththeexpectedperformanceand the cause of variation analyzed. For example, if expected sales for 2013 were 20 lacs colored T. V. sets and the actual sales were only 19 lacs; one can investigate the cause for shortfall in achievement.4.I t facilitates comparison. Different time series are often compared and important conclusions drawn therefrom.Method of Least Squares Themethodofleastsquaresisthemostfrequentbasisusedfor identifyingthetrendcomponentofthetimeseriesbydeterminingthe equationforthebest-fittingtrendline.Whenthismethodisapplied,a trendlineisfittedtothedatainsuchamannerthatthefollowingtwo conditions are satisfied: COURSE CODE: EMIS-506, BUSINESS STATISTICS DR. K. M. SALAH UDDIN, ASSOCIATE PROFESSOR DEPARTMENT OF MANAGEMENT INFORMATION SYSTEMS (MIS) UNIVERSITY OF DHAKA 1)(Y-Yc)=0 i.e.,thesumofdeviationoftheactualvaluesofYandthecomputed values of Y is zero. 2) (Y-Yc)2is least, i.e., the sum of the squares of the deviations of the actual and computed valuesisleastfromthisline.Thatiswhythismethodiscalledthe method of least squares. The straight line trend is represented by the equation Yc=a+b X WhereYc denotes the trend (computed) values to distinguish them from theactualYvalues,aistheYinterceptorthevalueoftheYvariable whenX=0,brepresentsslopeofthelineortheamountofchangeinY variable that is associated with a change of one unit in Xvariable. The Xvariable in time series represents time.In order to determine the value of the constantsaandb, the following two normal equations are to be solved: Y=N a+b X XY= aX+bX2 COURSE CODE: EMIS-506, BUSINESS STATISTICS DR. K. M. SALAH UDDIN, ASSOCIATE PROFESSOR DEPARTMENT OF MANAGEMENT INFORMATION SYSTEMS (MIS) UNIVERSITY OF DHAKA Thetimevariableismeasuredasadeviationfromitsmean.Since X=0, the above two normal equations would take the form: Y=N a XY= bX2 the values of a and bcan now be determined easily. SinceY=N a YNYa Since XY= bX2

2XXYbTheconstantagivethearithmeticmeanofYandtheconstantb indicates the rate of change. Problem 01: Fit a straight line trend by the method of least squares to the following data and find the trend values: Years200320042005200620072008 Saleofairconditioners(in lakhs ) 101316212430 COURSE CODE: EMIS-506, BUSINESS STATISTICS DR. K. M. SALAH UDDIN, ASSOCIATE PROFESSOR DEPARTMENT OF MANAGEMENT INFORMATION SYSTEMS (MIS) UNIVERSITY OF DHAKA Solution: Fitting straight line trend by the method of least squares YearSales (in lakhs ) Y Deviation from 2005 X XYX2 Trend values Yc 200310-2-2049.143 200413-1-13113.086 200516016017.029 200621+121120.972 200724+248424.915 200830+390928.858 N=6Y=114X=3 XY=126X2=19Yc=114.003 The equation of the straight line trend is : Yc=a+b X SinceXisnotzero,wehavetosolvethetwonormalequations simultaneously, Y=N a+b X XY= aX+bX2 114=6a+3b(i) 126=3a+19 b(ii) Multiplying equation (ii) by 2 COURSE CODE: EMIS-506, BUSINESS STATISTICS DR. K. M. SALAH UDDIN, ASSOCIATE PROFESSOR DEPARTMENT OF MANAGEMENT INFORMATION SYSTEMS (MIS) UNIVERSITY OF DHAKA 114=6a+3b 252=6a+38 b -35 b=-138 Or, b=3.943 Putting the value of b in equation (i) 114=6a+33.943 6a=114-11.829 6a=102.171 a=17.029 the equation of the straight line trend is : Y=17.029+3.943 X Y2003=17.029+3.943 (-2)=9.143 Y2004=9.143+3.943=13.086 Second Degree Parabola: Thesimplestexampleofthenon-lineartrendistheseconddegree parabola, the equation of which is written in the form: COURSE CODE: EMIS-506, BUSINESS STATISTICS DR. K. M. SALAH UDDIN, ASSOCIATE PROFESSOR DEPARTMENT OF MANAGEMENT INFORMATION SYSTEMS (MIS) UNIVERSITY OF DHAKA Yc=a+b X+c X2 whenthenumericalvaluesforconstantsa,bandchavebeenderived, thetrendvalueforanyyearmaycomputedsubstitutingthevalueofX forthatyear.Thevaluesofa,bandccanbeobtainedbysolvingthe following three normal equations simultaneously: i.Y=N a+b X+cX2 ii.XY= aX+bX2+cX3 iii.X2Y= aX2+bX3+cX4 When time origin is taken between two middle years X and X3 would be zero. In that case the above equations are reduced to i.Y=N a +cX2 ii.XY= bX2 iii.X2Y= aX2 +cX4 Problem 02: The price (in dollars) of a commodity during 2003-2008 is givenbelow.FitaparabolaY=a+bX+cX2tothisdata.Estimatethe price of commodity for the year 2007 and also compute the trend values. Year2003`20042005200620072008 Price100107128140181192 COURSE CODE: EMIS-506, BUSINESS STATISTICS DR. K. M. SALAH UDDIN, ASSOCIATE PROFESSOR DEPARTMENT OF MANAGEMENT INFORMATION SYSTEMS (MIS) UNIVERSITY OF DHAKA Solution:Todeterminethevalueofa,bandc,wesolvethe following normal equations: Y=N a+b X+cX2 XY= aX+bX2+cX3 X2Y= aX2+bX3+cX4 YearY Price X X2 X3 X4 XY X2Y Yc Trend values 2003100-24-816-20040097.744 2004107-11-11-107107110.426 2005128000000126.680 2006140+1111140140146.506 2007181+24816363724169.904 2008192+3927815761728196.874 N=6Y=848 X=3X2=19 X3=27 X4=115XY=771 X2Y=3099Yc=848.134 Substituting these values 848=6a+3b+19c(i) 771=3a+19b+27c(ii) 3099=19a+27b+115c(iii) COURSE CODE: EMIS-506, BUSINESS STATISTICS DR. K. M. SALAH UDDIN, ASSOCIATE PROFESSOR DEPARTMENT OF MANAGEMENT INFORMATION SYSTEMS (MIS) UNIVERSITY OF DHAKA Solving equations(i) and (ii), we get 35b+35c=694(iv) Multiplying equation (ii) by 19 and Equation (iii) by 3 and subtracting, we get 53.52=280b+168c(v) Solving equations (iv) and (v), we get c=1.786 substituting the value of c in equation (iv), we get b=18.04 putting the value of b and c in equation (i), we get a=126.68 Thus, a=126.68, b=18.04 and c=1.786 Substituing the values in the equation Y=126.68+18.04X+1.786 X2 When X=2, Y2007=126.68+18.04(2)+1.786(2)3 =169.904 COURSE CODE: EMIS-506, BUSINESS STATISTICS DR. K. M. SALAH UDDIN, ASSOCIATE PROFESSOR DEPARTMENT OF MANAGEMENT INFORMATION SYSTEMS (MIS) UNIVERSITY OF DHAKA Exponential or Logarithmic Trend:The equation of the exponential curve is of the form Y=a bx Putting the equation logarithmic form, we get log Y=log a+ X log b when plotted on a semi-logarithmic graph, the curve gives a straight line. However,onanarithmeticchartthecurvegivesanonlineartrend.In ordertofindoutthevaluesofaandb,thetwonormalequationstobe solved are: log Y=N log a +log b X (X. log Y)=log a X +log b.X2 whendeviationsaretakenfrommiddleyear,i.e.,X=0,theabove equations take the following form: log Y=N log a (X. log Y)= log b.X2 COURSE CODE: EMIS-506, BUSINESS STATISTICS DR. K. M. SALAH UDDIN, ASSOCIATE PROFESSOR DEPARTMENT OF MANAGEMENT INFORMATION SYSTEMS (MIS) UNIVERSITY OF DHAKA 2log .log and ;loglogXY XbNYaTake the antilogs of these expressions to arrive at the actual trend values. Problem 04: Fit a logarithmic straight line to the following data: Years200320042005200620072008 Production (m. tons of steel)647075828895 Solution: YearProduction Y Deviation from 2006 X log YX2 X. log Y 200364-31.80629-5.4186 200470-21.845143.6902 200575-11.87511-1.8751 20068201.913800 200788+11.944511.9445 200895+21.977743.9554 N=6Y=474X=-3 log Y=11.3624X2=19X. log Y=-5.084 The logarithmic straight line trend is given by log Y=log a+ X log b COURSE CODE: EMIS-506, BUSINESS STATISTICS DR. K. M. SALAH UDDIN, ASSOCIATE PROFESSOR DEPARTMENT OF MANAGEMENT INFORMATION SYSTEMS (MIS) UNIVERSITY OF DHAKA The two normal equations are: log Y=N log a +log b X (X. log Y)=log a X +log b.X2 Substituting the values 11.3624=6 log a-3 log b(i) -5.084=-3 log a+19 log b(ii) Multiplying equation (ii) by 2 and adding to (i) 11.3624=6 log a-3 log b -10.168=-6 log a+38 log b 35 log b=1.1944 log b=1.1944/35=0.034 Putting the value oflog b in equation (i) 11.3624=6 log a-30.034 => 6 log a=11.4644 => log a=1.911 Hence, log Y=1.911-0.034 X