You are on page 1of 88

EMT 3201

PRESENTATION
GROUP 5

TOPIC
Simple Introduction to the relation
between function values under cyclic
behavior (Time Series).
Ergodic Behavior

Group Members
Marnel Altius 14/0935/2686
Juan Peterkin 13/0935/2213
Javed Khan 13/0935/2750
Godfrey Bess 14/0935/0202
Yonnick Adolph 14/0935/2094
Delon Thomas 13/0935/1787

TOPICS COVERED:
1.) Introduction into Time series
2.)Introduction in Ergodic Theory
3.) Time series decomposition
4.) Applications

Introduction into Time series


Definition of a time series
Purpose of Time series analysis
Components of a times series

Definition of a time series


It 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 series


Times 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


analysis
Ideally, 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


components
A time series generally is composed of
The Trend,
Cyclical component,
Seasonal component,
Irregular components.

The Trend
It 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 variations
This is the regular wavelike fluctuations of

constant period.
They have a period of no longer than a year.

Cyclical variation
They 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 process
Stationary process
ErgodicTheory

Random process
Random 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 process


Let {Xt} be a random process and

represent the cumulative distribution function


of the
joint distribution of
at times
Then
is said to be stationary if, for all
for all
and for all

Since

does not affect


function of time

is not a

ErgodicTheory
A 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.

ErgodicProcess
Ergodic-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.

Example
TakeNresistors (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 Theorems
Since 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.

Time Series decomposition


Time Series Models
Trend Analysis
Seasonal Variation

Decomposition 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 Model


In other time series, The amplitudes of the other
components are relative to the trend. In this situation,
a multiplicative model is usually appropriate.
G=TxSxIxC
Where:
G Observed Series
T Trend
S Seasonal Component
I Irregular Component
C - Cyclic Component

Time Series Models


1. Additive Decomposition Model
In 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

An annual series is a product of trend and

cyclical fluctuations:
G=TxC
C Cyclic Component as an normalized
index

Multiplicative 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 MODEL
Other Models exist which usually take the

form of a combination of additive and


multiplicative elements, such as:
y=S+TxCxI
or
y=C+TxSxI

Trend Analysis
Trend 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.

Trend Analysis
This 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.

To 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 trend
Both 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 SMA
where 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.

Actual

Exponential forecasts

Quarter

Sales (units)

values 0.2

values 0.8

Spring

450

Summer

440

448

442

Fall

460

452

456

Winter

480

464

476

38

Linear Trend
When
the graph of a trend component takes the shape of a straight line the forecast
value can be determined by the linear regression method of the following equations:
Least squares method:

b1 = n() ()()
n() ()2
b0 = ( b1 /n
Where- b1 is the gradient of a line
b0 is the intercept of the y axis
n is the number of values

Non linear tends


In 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.

Time series are often used to describe data

that increase or decrease at a constant


proportion overtime. Data taking this form can
be approximated by an equation referred to as
the exponential curve:

The form of the exponential curve depends on


the values of a and m.

Seasonal Variation
By 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

Seasonally adjustment of an additive series


Step 1
the moving averages of the original observations
are calculated.
G = [ x1 + x2 + x3 xn
+xn+1 ]/n
OR G = [x1 + x2 + x3 xn+1 ]/n

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

Step 1 + 2

Step 3
The 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.

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

Step 5
When the seasonal figures have been

calculated the seasonal adjustment is


performed by a subtraction of the seasonal
factors from the original data series.

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

Step 2
T 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

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

Step 4
The 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.

Step 5

When 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

Residuals
They are what remains after the seasonal,

Cyclic and trend components of a time series,


have been removed

A 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 negligible
Can cause an increase or a decrease

The effect of residuals on a time


series
They mask the trends and seasonal

components of the series, therefore affecting


the forecast.
Large residual large fluctuations forecast

badly affected
Small residual small fluctuations forecast
not badly affected

Residuals vs Predicted
Values
If 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.

Applications

Applications
Trend Analysis can be applied to a wide cross

section of study fields and disciplines some of


which are:
Population dynamics
Price dynamics
Productivity dynamics

Two basic purposes are:


Quality Control
Forecasting

Applications
Importance of Seasonal Variation
Knowledge of past trends can be projected
into the future
To measure seasonal effect
To eliminate seasonality
It aids short term forecasting and planning.

Sources
Time Series and Forecasting

->www.mcgrawhill.ca/college/lind
http://web.mit.edu/13.42/www/handouts/readi
ng-randomprocesses.pdf

For the questions 1 and 5 below, the additive

or multiplicative models can be used.


However state why whichever one was used.

Question 1
The enrolment in the School of Engineering at

the local college by quarter since 2001 is:

Years

Quarter

observed values

2001

2002

2003

2004

2005

Winter
Spring
Summer
Fall
Winter
Spring
Summer
Fall
Winter
Spring
Summer
Fall
Winter
Spring
Summer
Fall
Winter
Spring
Summer
Fall

2033
1871
714
2318
2174
2069
840
2413
2370
2254
927
2704
2625
2478
1136
3001
2803
2668

a. Determine the four quarterly indexes.


b. Interpret the quarterly pattern of

enrolment. Does the seasonal variation


surprise you?
c. Compute the trend equation

multiplicative
Normalized
Quaterly
Average

1.261950109
1.177673797
1.102211847
0.458164246

additive

Deseasonaliz
ed Values
1726
1697
1558
1837
1846
1877
1833
1912
2012
2045
2023
2143
2229
2248
2479
2378
2380
2421

Normalize Deseasonalize
d Quaterly
d Values
Average

1655

1659

1847
542.87760
1775
42
377.90885
1796
42
212.29427
1857
08
1133.0807
1973
3

1870

1992

2042

2060

2161

2247

2266

2269

2458

2425

2456

3500

3000

2500
f(x) = 49.29x + 1567.66
2000
observed values
Deseasonalized Values
1500

Linear (Deseasonalized Values)

1000

500

0
1

10

11

12

13

14

15

16

17

18

Question 2
Find the trend using a 4 year simple moving

average.

Year
Sales
1996

58436

1997

59994

1998

61515

1999

63182

2000

67989

2001

70448

2002

72601

2003

75482

2004

78341

2005

81111

a.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

3 year moving
Average

59981.67
61563.67
64228.67
67206.33
70346
72843.67
75474.67
78311.33

4 year moving
Average

60781.75
63170
65783.5
68555
71630
74218
76883.75

EMA 0.5

57657
59233.5
60681.5
60778.5
66759.5
69371.5
71160.5
74052.5
76956

85000

EMA is more
80000

f(x) = 2624.58x + 54474.73

responsive than the 4


year SMA or it follows
the actual data more
closely

75000

Sales

70000

Linear (Sales)
4 year moving
Average

65000

EMA 0.5

60000
55000
50000

10

Question 3
The inventory turnover rates for Bassett

Wholesale Enterprises, by quarter, are:

Year

2001 I
II
III
IV
2002 I
II
III
IV
2003 I
II
III
IV
2004 I
II
III
IV
2005 I
II
III
IV

Quarter

Obsevered
Value X
4.4
6.1
11.7
7.2
4.1
6.6
11.1
8.6
3.9
6.8
12
9.7
5
7.1
12.7
9
4.3
5.2
10.8
7.6

a.find the four typical quarterly turnover rates

for the Bassett company


b. Deseasonalize the data

multiplicative
Correct
Deseasi
ed
onalize
Quarterl
d
y
Values
Average

7.9

7.4

7.9

6.3
0.55537
6
7.4
0.82613
8
8.0
1.48149
9
7.5
1.13698
7
7.6

7.0

8.2

8.1

8.5

9.0

8.6

8.6

7.9

7.7

6.3

7.3

6.7

additive
Correct
Deseasi
ed
onalize
Quarterl
d
y
Values
Average

7.9

7.5

7.9

6.1
3.50026
7.6
1.38464
8.0
3.83411
5
7.3
1.05078
1
7.5

7.4

8.2

8.2

8.6

8.5

8.5

8.9

7.9

7.8

6.6

7.0

6.5

14

12

10

8
Obsevered Value X
Deseasionalized Values

0
1

10

11

12

13

14

15

16

17

18

19

20

Question 4
Sales of roof material, by quarter, since 1999

for Carolina Home Construction, Inc. are


shown below (in $ thousands).

Year

1999

2000

2001

2002

2003

2004

2005

Quarter

I
II
III
IV
I
II
III
IV
I
II
III
IV
I
II
III
IV
I
II
III
IV
I
II
III
IV
I
II
III
IV

Obsevered
Value X
210
180
60
246
214
216
82
230
246
228
91
280
258
250
113
298
279
267
116
304
302
290
114
310
321
291
120
320

a.Determine the typical seasonal patterns for

sales.
b.Deseasonalize the data

multiplicative
Correct
ed
Deseasi
Quarter onalize
ly
d
Averag Values
e

177

161

137

196
1.1875
02
180
1.1192
36
193
0.4382
42
187
1.2550
19
183

207

204

208

223

217

223

258

237

235

239

265

242

254

259

260

247

270

260

274

255

Correct
ed
Deseasi
Quarter onalize
ly
d
Averag Values
e

168

154

185

189
42.339
29
172
26.005
95
190
124.85
1
207
56.505
95
173

204

202

216

223

216

224

238

241

237

241

241

247

260

264

239

253

279

265

245

263

350

300

250

200
Obsevered Value X
Deseasionalized Values

150

100

50

0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

Work 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:

Year

Quarter

Obsevered Value X

2000

2001

2002

2003

2004

2005

I
II
III
IV
I
II
III
IV
I
II
III
IV
I
II
III
IV
I
II
III
IV
I
II
III
IV

142
312
488
208
146
318
512
212
160
330
602
187
158
338
572
176
162
380
563
200
162
362
587
205

a. determine the four typical quarterly

indexes.
b. Interpret the typical seasonal pattern
c. deseaonalize the data

Corrected
Quarterly
Average

Deseasionalize
d Values

1.819307881
0.544666132
0.518127331
1.117898656

274
279
268
382
282
284
281
389
309
295
331
343
305
302
314
323
313
340
309
367
313
324
323
376

Corrected
Quarterly
Average

Deseasionalized
Values

242.0759608
-94.09070583
-154.3740392
28.67596084

296
283
246
302
300
289
270
306
314
301
360
281
312
309
330
270
316
351
321
294
316
333
345
299

700

600

500

400

300

200

100

0
1

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

Solution process for all questions are given below (multiplicative):


Step one: Calculate Moving Averages G using the equation ([X 1/2]+X2+X3+X4+[X5/2])/4 or

(X1+X2+X3+X4)/4
Step two: Remove the trend and cyclical component and compute the value Q, where Q=X/G.
Step three: For the same quarter of each year find the sum of the average of the Q values.
This value is S.
Step four: find the normalized averages or seasonal factor S using the equation S= (4S/)
Step five: the seasonal adjustment is conducted by dividing the X values by the seasonal
factor S.
Additive method:
Step one: Calculate Moving Averages G using the equation ([X 1/2]+X2+X3+X4+[X5/2])/4 or

(X1+X2+X3+X4)/4
Step two: Remove the trend and cyclical component and compute the value Q, where Q=X-G.
Step three: For the same quarter of each year find the sum of the average of the Q values.
This value is S.
Step four: find the normalized averages or seasonal factor S using the equation S=S - ()/4
Step five: the seasonal adjustment is conducted by subtracting the X values by the seasonal
factor S.

Trend equations
Q1) = 49.29022498t + 1567.660482 (multi)
48.5059232t + 1584.071334 (add)
Q2) = 2624.575758t +544747.3333