+ All Categories
Home > Documents > P5 - Time Series

P5 - Time Series

Date post: 04-Oct-2015
Category:
Upload: keshan-takchandra
View: 224 times
Download: 0 times
Share this document with a friend
Description:
Time series
88
EMT 3201 PRESENTATION GROUP 5
Transcript

EMT 321

EMT 3201

PRESENTATIONGROUP 5TOPICSimple Introduction to the relation between function values under cyclic behavior (Time Series). Ergodic BehaviorGroup MembersMarnel Altius 14/0935/2686Juan Peterkin 13/0935/2213Javed Khan 13/0935/2750Godfrey Bess 14/0935/0202Yonnick Adolph 14/0935/2094Delon Thomas 13/0935/1787TOPICS COVERED:1.) Introduction into Time series 2.)Introduction in Ergodic Theory

3.) Time series decomposition

4.) Applications

Introduction into Time seriesDefinition of a time seriesPurpose of Time series analysisComponents of a times series

Definition of a time seriesIt is a statistical series which tells how data has been behaving in the past.This data is measured at equally spaced time intervals.A time series is a sequential set of data points, measured typically over successive times. Types of Time seriesTimes series can be categorized depending on whether they represent continuous or discrete data.Continuous series data allow one to find the state of a system at any time within the series at the cost of much larger sample size. Discrete series are very common in electronic sensors such as those used to measure weather conditions and these are used over much longer durations than the former to allow for data compression.

Purpose of Time series analysisIdeally, Time the analysis of a time series should aid in the identification of patterns in correlated data .Once the system under investigation is understood to a certain degree, it can then be modeled and predictions of short-term trends can be made. In addition, deviations of a specified size from the model could indicate problems in the system.

The four main componentsA time series generally is composed of The Trend, Cyclical component,Seasonal component,Irregular components.The TrendIt is the general tendency of a time series to increase, decrease or stagnate over a long period of time. It can be linear, non-linear, i.e. exponential, quadratic

Seasonal variationsThis is the regular wavelike fluctuations of constant period. They have a period of no longer than a year.

Cyclical variationThey are medium-term quasi regular fluctuations in the series around the long-term trend.They repeat in cycles (Wavelike). Last longer than a year.

Irregular or random variations They are fluctuations due to unpredictable influences which do not repeat in a particular pattern. The irregular component is often called the noise in the series.

Introduction in Ergodic Theory

Random processStationary processErgodicTheory

Random processRandom process is a process representing the evolution of some system of random values over time.Since a random process is a function of time we can find the averages over some period of time, T , or over a series of events.Ergodic theory requires a type of process called the stationary process

Stationary process Inmathematicsandstatistics, astationary processis astochastic or random processwhosetotal probability distributionand parameters such as themeanandvariance, do not change when shifted in time and does not follow any trends.It can be defined mathematically by the following: Definition of a Stationary processLet {Xt} be a random process and represent the cumulative distribution function of the joint distribution of at timesThen is said to be stationary if, for all for all and for all

Since does not affect is not a function of time

ErgodicTheoryA simple definition would be the study of the long term average behavior of systems evolving in time. Ergodic Theory uses techniques and examples from many fields such as probability theory, statistical mechanics, number theory etc.

ErgodicProcessErgodic-This term denotes a system which progress in such a manner that, given sufficient time, will return to a state close to the initial one.Astochastic process is said to beergodicif its statistical properties (such as its mean and variance) can be deduced from a single, sufficiently long sample (realization) of the process.

Ergodic processes are a special case of stationary random processes whose statistics (expected values) ARE equal to the time averages.Thus everysequence orsample of sufficient size isequallyrepresentative of the whole.ExampleTakeNresistors (Nshould be very large) and plot the voltage across those resistors for a long period. Each resistor hasthermal noiseassociated with it and it depends on the temperature. For each resistor you will have a waveform. The calculated average value of that waveform gives you the time average. Also note that you have Nwaveforms as we haveNresistors. TheseNplots are known as an ensemble. Now take a particular instant of time in all those plots and find the average value of the voltage. That gives you the ensemble average for each plot. If both ensemble average and time average are the same then it is ergodic.

Ergodic TheoremsSince the main concern of ergodic theory is the behavior of a dynamic system over time, precise information is required to study these systems. More precise information is provided with the use of ergodic theorems.ErgodicityInmathematics, the termergodicis used to describe adynamical systemwhich generally has the same behavior averaged over time as averaged over the space of all the system's states (phase space). Inphysicsthe term is used to imply that a system satisfies theergodic hypothesisofthermodynamics.Instatistics, the term describes arandom processfor which the time average of one sequence of events is the same as theensemble average. It is in this field where it is known to be used, specifically concerning random processes.

Residual Influences

Residuals influences are random external events which affects our variables . Sometimes the effect is negligible; at other times it is great ; some occurrences will increase our figures ; others will reduce them. We cannot see what is going to happen in the future and so we cannot forecast such events.

Time Series decompositionTime Series ModelsTrend AnalysisSeasonal VariationDecomposition of a Time series separating each component from the observed data is referred to as time series decomposition.

This allows one to predict the future by using qualitative or quantitative techniques (forecast).

2. Multiplicative Decomposition ModelIn other time series, The amplitudes of the other components are relative to the trend. In this situation, a multiplicative model is usually appropriate. G = T x S x I x C

Where:G Observed SeriesT Trend S Seasonal ComponentI Irregular ComponentC - Cyclic Component

28Time Series Models1. Additive Decomposition ModelIn some time series, the amplitude of both the seasonal and irregular variations is invariant to trend. In such cases, an additive model is appropriate. G = T + S + I + C

29An annual series is a product of trend and cyclical fluctuations: G = T x C C Cyclic Component as an normalized index

30Multiplicative model is based on the assumption that the four components of a time series are not necessarily independent and they can affect one another; whereas in the additive model it is assumed that the four components are independent of each other.COMBINATION OF MULTIPLICATIVE AND ADDITIVE MODELOther Models exist which usually take the form of a combination of additive and multiplicative elements, such as:

y = S + T x C x I or y = C + T x S x I

Trend AnalysisTrend Analysis can be done using a variety of methods under linear filtering of a time series. In this case the moving average method is a simple and effective method for simple scenarios. 33Trend AnalysisThis refers to collecting data with the aim of determining patterns within the time series.Linear Filtering:This aims to smoothen the irregular portions of the Data Set thus detecting trends or seasonal components. Simple Moving Average:A simple moving average (SMA) is a arithmetic mean where sections of data are averaged using constant widths in a larger sample of data.

Advantages & Disadvantages of Moving Averages Method AdvantagesDisadvantagesRequires a lot of previously saved data points.It lags behind a trendEach moving average calculated only considers data over a limited number of periods and ignores earlier data. It smoothens the data and makes it easier to spot trends. It is way easier to use compared to other methods such as the regression method.Short term noise is eliminated from the data set.Regression: involves lengthy formulas and graphing of valuesNoise: this noise means meaningless or corrupt data35To find the Trend, simply compute all the moving averages of the observed data. This is called smoothing the series. First, determine the moving totals of the same period. Then find the moving averages from the totals.

Regression can also be used to find the trendBoth regression and smoothing can be used to improve results.

Exponential Smoothing Unlike SMA, this technique involves the automatic weighting of past data with weights that decrease exponentially with time. That is, the older observations get a decreasing weighting while new observations receives a greater weighting.

New forecast = old forecast + (latest observation old forecast) = 2/(m+1) m = number of obervations comparable to the SMAwhere is the smoothing constant and can be between 0 to 1.Note Higher valves of produces a forecast which is adjusted to observed data faster.

38ActualExponential forecastsQuarterSales (units) values 0.2 values 0.8Spring450Summer440448442Fall460452456Winter480464476Linear TrendNon linear tendsIn estimating the trend in a time series, there are systems which do not change equally in successive time frames.For those systems, nonlinear methods such as exponential curve fitting must be used instead.The equation y = a.xm can be rearranged in the form, log I = m.log.t + log.k

Where,y = Trend x = time a = y intercept m = gradient of the line

Then use the least squares method to find the trend equation.To apply the moving-average method to a time series, the data should follow a fairly linear trend and have a definite rhythmic pattern of fluctuationsIf the duration of the cycles is constant, and if the amplitudes of the cycles are equal, the cyclical and irregular fluctuations can be removed entirely using the moving-average method. The result is a line.Seasonal VariationBy definition, is repetitive and predictable movement around the trend line in one year or less.

Time intervals must be measured in small increments such as days, weeks, months or quarters.

Seasonal Index/offset- It is a ratio or an offset to the actual observation which gives a value relative to the observation without the effect of seasonality.

44Seasonally adjustment of an additive series Step 1 the moving averages of the original observations are calculated.

Step 2Because (T+C+S+I)-(T+C)= S+I Difference between observed value and the moving average which is => X G = D

G = [ x1 + x2 + x3 xn +xn+1 ]/nOR G = [x1 + x2 + x3 xn+1 ]/n45

Step 1 + 246Step 3The irregular component is reduced calculating the averages S' over all years, one for each quarter. It is assumed that the irregular component will cancel when summed together.

47Step 4The final seasonal estimates have to sum up to 0. A correction value is used to allow this to happen.

48Step 5When the seasonal figures have been calculated the seasonal adjustment is performed by a subtraction of the seasonal factors from the original data series.

49Seasonal adjustment of a multiplicative seriesStep 1 First the symmetric moving averages of the observations are calculated by G=TC as a first estimate over the trend and the cycle.

50Step 2T and C are then removed from the series, and this is done in a multiplicative model by division, i.e. the fraction Q is calculated

51Step 3The different seasonal estimates are joint, exactly as it was done in the additive model, by calculation of an average over the years, S.

52Step 4The averages S' are normalized so that the calculated seasonal factors each varies around 1, i.e. they sum up to 4. The normalization is here performed by a multiplication of each seasonal factor with 4, and then dividing each factor with their sum.

53Step 5When the seasonal factors have been calculated, the seasonal adjustment is performed by dividing the original series with the seasonal factors. X/S=TCSI/S=TCI

54ResidualsThey are what remains after the seasonal, Cyclic and trend components of a time series, have been removed

55A residual is simply the difference between the observed value of G (the response variable of interest) and the value of G predicted by the model:Residual = G observed - G predicted

Residuals from any model are helpful in evaluating the adequacy of the model itself relative to the data and any assumptions you might make in the analysis. Residuals are external random events, that causes short-term fluctuations in the series.Effect can either be large or negligibleCan cause an increase or a decrease

The effect of residuals on a time seriesThey mask the trends and seasonal components of the series, therefore affecting the forecast.Large residual large fluctuations forecast badly affectedSmall residual small fluctuations forecast not badly affected

59Residuals vs Predicted ValuesIf the model gives an adequate fit to the data and the typical assumption of independent normally distributed residuals is satisfied, the plot of the residuals versus predicted values would show no pattern or trend.

When you observe a nonrandom pattern, you should consider changing the form of the model. One pattern commonly observed is an increasing variation in the residuals as the predicted values increase (V-shaped pattern or megaphone shape).

This indicates the assumption of equal variance of the residuals is not satisfied by the data. The V-shaped pattern suggests the variation increases with the average.

A curved relationship between the residuals and predicted values suggests that curvilinear terms should be included in the model. With several predictor (x) variables, it often helps to plot the residuals versus each x variable to pinpoint the source of the curvature.

ApplicationsApplicationsTrend Analysis can be applied to a wide cross section of study fields and disciplines some of which are:Population dynamicsPrice dynamicsProductivity dynamics

Two basic purposes are: Quality ControlForecasting

ApplicationsImportance of Seasonal VariationKnowledge of past trends can be projected into the future To measure seasonal effectTo eliminate seasonalityIt aids short term forecasting and planning.64SourcesTime Series and Forecasting ->www.mcgrawhill.ca/college/lindhttp://web.mit.edu/13.42/www/handouts/reading-randomprocesses.pdfFor the questions 1 and 5 below, the additive or multiplicative models can be used. However state why whichever one was used.Question 1The enrolment in the School of Engineering at the local college by quarter since 2001 is:

YearsQuarterobserved values2001Winter2033Spring1871Summer 714 Fall23182002Winter2174Spring2069Summer 840 Fall24132003Winter2370Spring2254Summer 927 Fall27042004Winter2625Spring2478Summer 1136 Fall30012005Winter2803Spring2668Summer Falla. Determine the four quarterly indexes.b. Interpret the quarterly pattern of enrolment. Does the seasonal variation surprise you?c. Compute the trend equationmultiplicativeadditive Normalized Quaterly AverageDeseasonalized Values1726169715581.26195010918371.17767379718461.10221184718770.458164246183319122012204520232143222922482479237823802421 Normalized Quaterly AverageDeseasonalized Values165516591847542.87760421775377.90885421796212.29427081857-1133.08073197318701992204220602161224722662269245824252456Question 2

Find the trend using a 4 year simple moving average.

Year Sales199658436199759994199861515199963182200067989200170448200272601200375482200478341200581111a.Plot a simple graph showing your results. Then use regression to find the equation of the trend.b.What is the result of applying the moving average method to the data set? Use exponential smoothing using a coefficient of 0.5 and compare with the simple moving average.

c.Why is there no seasonal component in this data?

3 year moving Average4 year moving AverageEMA 0.55765759981.6759233.561563.6760781.7560681.564228.676317060778.567206.3365783.566759.5703466855569371.572843.677163071160.575474.677421874052.578311.3376883.7576956EMA is more responsive than the 4 year SMA or it follows the actual data more closely

Question 3

The inventory turnover rates for Bassett Wholesale Enterprises, by quarter, are:

YearQuarterObsevered Value X2001I4.4II6.1III11.7IV7.22002I4.1II6.6III11.1IV8.62003I3.9II6.8III12IV9.72004I5II7.1III12.7IV92005I4.3II5.2III10.8IV7.6a.find the four typical quarterly turnover rates for the Bassett company

b. Deseasonalize the datamultiplicativeadditiveCorrected Quarterly AverageDeseasionalized Values7.97.47.96.30.5553767.40.8261388.01.4814997.51.1369877.67.08.28.18.59.08.68.67.97.76.37.36.7Corrected Quarterly AverageDeseasionalized Values7.97.57.96.1-3.500267.6-1.384648.03.8341157.31.0507817.57.48.28.28.68.58.58.97.97.86.67.06.5Question 4

Sales of roof material, by quarter, since 1999 for Carolina Home Construction, Inc. are shown below (in $ thousands).YearQuarterObsevered Value X1999I210II180III60IV2462000I214II216III82IV2302001I246II228III91IV2802002I258II250III113IV2982003I279II267III116IV3042004I302II290III114IV3102005I321II291III120IV320a.Determine the typical seasonal patterns for sales.b.Deseasonalize the data

multiplicativeCorrected Quarterly AverageDeseasionalized Values1771611371961.1875021801.1192361930.4382421871.255019183207204208223217223258237235239265242254259260247270260274255Corrected Quarterly AverageDeseasionalized Values16815418518942.3392917226.00595190-124.85120756.50595173204202216223216224238241237241241247260264239253279265245263Work Gloves Corp. is reviewing its quarterly sales of Toughie, the most durable glove they produce. The numbers of pairs produced (in thousands) by quarter are:

YearQuarterObsevered Value X2000I142II312III488IV2082001I146II318III512IV2122002I160II330III602IV1872003I158II338III572IV1762004I162II380III563IV2002005I162II362III587IV205a. determine the four typical quarterly indexes.b. Interpret the typical seasonal patternc. deseaonalize the data

Corrected Quarterly AverageDeseasionalized Values2742791.8193078812680.5446661323820.5181273312821.117898656284281389309295331343305302314323313340309367313324323376Corrected Quarterly AverageDeseasionalized Values296283242.0759608246-94.09070583302-154.374039230028.67596084289270306314301360281312309330270316351321294316333345299Trend equationsQ1) = 49.29022498t + 1567.660482 (multi)48.5059232t + 1584.071334 (add)

Q2) = 2624.575758t +544747.3333

Chart291.1491.1468.8468.8447.6647.6620.0620.065.795.79

Duration (hrs.)Intensity (mm/hr)Graph Showing the Intensity against Duration for Georgetown on a specific day.y = 66.155x-0.7237

Sheet130 Mins. Rainfall1 Hr. Rainfall2 Hrs. Rainfall6 Hrs. Rainfall24 Hrs. RainfallYearRainfallIntensityYearRainfallIntensityRank (m)Return Period [(n+1)/m]ProbabilityYearRainfallIntensityRank (m)Return Period [(n+1)/m]ProbabilityYearRainfallIntensityRank (m)Return Period [(n+1)/m]ProbabilityYearRainfallIntensityRank (m)Return Period [(n+1)/m]Probability198031.863.6198031.831.8201.3076.92198056.628.3161.6361.54198096.816.13146.21980104.14.34153198136.5731981666646.5015.38198175.237.664.3323.081981110.718.45114.41981110.84.62146.3198220.841.619823737171.5365.38198251.125.55191.3773.08198281.313.55113.21982100.44.18146.2198328.256.4198340.440.4161.6361.54198340.420.2231.1388.4619836.71.12110.7198368.52.85141.9198419.438.8198425.825.8231.1388.46198440.120.05241.0892.31198462.110.351091984933.88114.219853672198549.949.9102.6038.4619855527.5171.5365.38198570.711.78100.8198570.72.95110.8198621.543198636.936.9181.4469.2319865427181.4469.23198666.811.1398.4198670.22.93105.4198756.5113198778.578.5126.003.851987122.761.35126.003.851987146.224.3797.81987146.26.09105.319883774198853.253.273.7126.92198874.537.2573.7126.92198810918.1796.81988146.36.10104.119892856198941.241.2151.7357.69198973.336.6583.2530.77198980.213.3795.3198993.23.88100.4199050100199067.267.238.6711.5419907135.592.8934.62199073.112.1889.9199080.23.34100199132641991515192.8934.621991783955.2019.231991100.816.8087.41991994.1399199233.567199253.153.183.2530.77199283.941.9546.5015.38199297.816.3081.31992743.0897.319932652199348.648.6112.3642.31199391.245.638.6711.541993113.218.8780.2199390.23.7693.2199428.657.2199456.256.264.3323.08199463.431.7112.3642.31199487.414.5777.819941004.1793199531.262.4199545.345.3132.0050.00199565.132.55102.6038.46199595.315.8876.219951536.3890.2199636.973.8199647.847.8122.1746.15199659.729.85132.0050.00199689.914.9875.51996105.34.3982.8199731621997575755.2019.23199760.430.2122.1746.151997114.419.0774199782.83.4580.2199828.657.2199833.733.7191.3773.0819984824201.3076.92199876.212.7073.1199897.34.0578.2199921.442.8199924.824.8251.0496.1519993819251.0496.1519997412.3370.71999105.44.3975.5200024.949.8200041.341.3141.8653.85200057.828.9151.7357.69200077.812.9766.8200078.23.2674200119.539200125.125.1241.0892.31200158.129.05141.8653.85200164.110.6864.12001114.24.7670.7200231.663.2200231.631.6211.2480.77200242.221.1211.2480.77200275.512.5862.1200275.53.1570.2200328.356.6200328.328.3221.1884.62200340.520.25221.1884.62200359.19.8559.12003682.8368.520044488200468.968.9213.007.69200493.946.95213.007.69200498.416.406.72004141.95.9168Total783.20Total1140.60Total1594.10Total2127.50Total2468.40Mean31.33Mean45.62Mean63.76Mean85.10Mean98.74Standard Deviation9.04Standard Deviation14.74Standard Deviation20.04Standard Deviation26.08Standard Deviation25.4910 years91.1410 years68.8410 years47.6610 years21.0310 years5.7925 years25 years25 years25 years25 years50 years50 years50 years50 years50 years100 years100 years100 years100 years100 years

Sheet191.1491.1468.8468.8447.6647.6620.0620.065.795.79

Duration (hrs.)Intensity (mm/hr)Graph Showing the Intensity against Duration for Georgetown on a specific day.y = 66.155x-0.7237

Sheet230 Mins. Rainfall1 hr. Rainfall2 hrs. Rainfall6 hrs. Rainfall24 hrs. RainfallYearRainfallYearRainfallYearRainfallYearRainfallYearRainfall198031.8198031.8198056.6198096.81980104.1198136.5198166198175.21981110.71981110.8198220.8198237198251.1198281.31982100.4198328.2198340.4198340.419836.7198368.5198419.4198425.8198440.1198462.1198493198536198549.9198555198570.7198570.7198621.5198636.9198654198666.8198670.2198756.5198778.51987122.71987146.21987146.2198837198853.2198874.519881091988146.3198928198941.2198973.3198980.2198993.2199050199067.2199071199073.1199080.21991321991511991781991100.8199199199233.5199253.1199283.9199297.8199274199326199348.6199391.21993113.2199390.2199428.6199456.2199463.4199487.41994100199531.2199545.3199565.1199595.31995153199636.9199647.8199659.7199689.91996105.3199731199757199760.41997114.4199782.8199828.6199833.7199848199876.2199897.3199921.4199924.81999381999741999105.4200024.9200041.3200057.8200077.8200078.2200119.5200125.1200158.1200164.12001114.2200231.6200231.6200242.2200275.5200275.5200328.3200328.3200340.5200359.1200368200444200468.9200493.9200498.42004141.9Total783.20Total1140.60Total1594.10Total2127.50Total2468.40Mean31.33Mean45.62Mean63.76Mean85.10Mean98.74Standard Deviation9.04Standard Deviation14.74Standard Deviation20.04Standard Deviation26.08Standard Deviation25.49

Sheet291.14106.84118.5130.0691.14106.84118.5130.0668.8481.6491.14100.5768.8481.6491.14100.5747.6656.3762.8269.2447.6656.3762.8269.2420.0623.0925.3327.5620.0623.0925.3327.565.796.717.318.075.796.717.318.07

Table 5: Data for the Return Period of 25 yearsTable 5: Data for the Return Period of 25 yearsDuration (hrs.)Intensity (mm/hr)Graph Showing the Intensity against Duration for the Return Periods of 10 years, 25 years, 50 years and 100 years for Georgetown

Sheet3Duration (hrs.)Depth of Rainfall (mm)Intensity (mm/hr)0.545.5791.14168.8468.84295.3247.666126.1820.0624138.895.79Table 5: Data for the Return Period of 25 yearsDuration (hrs.)Depth of Rainfall (mm)Intensity (mm/hr)0.553.42106.84181.6481.642112.7456.376148.8423.0924161.046.71Table 6: Data for the Return Period of 50 yearsDuration (hrs.)Depth of Rainfall (mm)Intensity (mm/hr)0.559.25118.5191.1491.142125.6462.826165.6425.3324175.457.31Table 7: Data for the Return Period of 100 yearsDuration (hrs.)Depth of Rainfall (mm)Intensity (mm/hr)0.565.03130.061100.57100.572138.4769.246182.3327.5624193.778.07

Sheet3

Table 5: Data for the Return Period of 25 years


Recommended