Create - Mathematics and Statistics - Study Notes, Study notes of Mathematical Statistics

Main points of this file are Create, Cumulative Sum, Differences of Order, Running Median of Length, The T4253H Smoothing Function, Fast Fourier Transform, Inverse Fast Fourier Transform of Two Series

Typology: Study notes

2011/2012

Uploaded on 10/31/2012

sangawar
sangawar ๐Ÿ‡ฎ๐Ÿ‡ณ

4.5

(4)

118 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
CREATE
CREATE produces new series as a function of existing series.
Notation
The following notation is used throughout this chapter unless otherwise stated:
Existing Series XX
n1,,K
New Series YY
n1,,K
Cumulative Sum (CSUM(X))
YXjn
ji
i
j
==
=
โˆ‘
1
1, ,K
Differences of Order m (DIFF(X,m))
Define
Zk Zk Z k k m j k n
jj j
16 16 16
=โˆ’โˆ’ โˆ’ = =+
โˆ’
111 1
1,, ,,KK
with
ZXj n
jj
01
16
==,,K
then
YZm j m n
jj
==+
%
&
'
16 1, ,K
SYSMIS otherwise
pf3
pf4
pf5
pf8

Partial preview of the text

Download Create - Mathematics and Statistics - Study Notes and more Study notes Mathematical Statistics in PDF only on Docsity!

1

CREATE produces new series as a function of existing series.

Notation

The following notation is used throughout this chapter unless otherwise stated: Existing Series X 1 , K,X (^) n New Series Y 1 , K,Yn

Cumulative Sum (CSUM( X ))

Y (^) j X (^) i j n i

j = = =

โˆ‘ 1

1, K,

Differences of Order m (DIFF( X , m ))

Define

Z (^) j 1 6k = Z (^) j 1 k โˆ’ 16 โˆ’ Z (^) jโˆ’ 11 k โˆ’ 16 k = 1 , K, m j = k + 1 , K,n

with

Z (^) j 1 6 0 = X (^) j j = 1 , K,n

then

Y (^) j = %&Z^ jm^ j^ =^ m^ + n '

1 6 1,^ K, SYSMIS otherwise

Lag of Order m (LAG( X , m ))

Y

X j m n j (^) j m = j^ m =^ + =

% & '

K

SYSMIS K

Lead of Order m (LEAD( X , m ))

Y X^ j^ n^ m j (^) j n m n = j^ m =^ โˆ’ = โˆ’ +

% & '

K

SYSMIS K

Moving Average of Length m (MA( X , m ))

If m is odd, define

q = mโˆ’^1 2

then

Y (^) j X^ j^ k m^ j^ q^ n^ q k q

q = =^ +^ โˆ’

% &

KK

'

KK

=โˆ’

โˆ‘ 1,^ K, SYSMIS otherwise

If m is even, define q = m 2 and

Z (^) j X (^) j k m j q n q k q

q = (^) + = โˆ’ =โˆ’ +

โˆ‘ 1

, K,

then

Y (^) j = Z^ j^ +^ Z^ j j^ =^ q^ +^ n^ โˆ’q

% &

K 'K^

(^3) โˆ’ 1 8 2 1 ,^ K, SYSMIS otherwise

where

Z (^) j 1 6 0 = X (^) j j = 1 , K,n

then

Y (^) j = Z (^) j1 6m j = mp +1, K,n

The T4253H Smoothing Function (T4253H( X ))

The original series is smoothed by a compound data smoother based on Velleman (1980). The smoother starts with:

  • A running median of 4: Let Z be the smoothed series, then

Z (^) j + 1 2 = median 3 X (^) j โˆ’ 1 , X (^) j , X (^) j + 1 , X (^) j+ 2 8 j = 2 , K,nโˆ’ 2

and

Z X Z^ X^ X^ X^ X

Z (^) n X (^) n X (^) n X (^) n X (^) n Z (^) n Xn

0 5

1 1 1 5^1 1 2 12 1

(^1) 1 2 1 12 1 1 1 2

.

( ) ( ).^ median^ ,

median ,

= =^ =^ +

โˆ’ =^ โˆ’ =^ โˆ’ +^ + =

1 6 1 6

0 5 1 6 1 6 0 5

  • A running median of Z:

Z 1 1 6^1 = Z (^) 0 5. Z (^) n1 6^1 = Zn+1 2

and

Z 1 6j 1 = 21 4 Z (^) j โˆ’1 2 + Z (^) j+1 2 9 j = 2 , K, nโˆ’ 1.

  • A running median of 5 on Z 1 ( )^1 , K ,Z (^) n( )^1 from the previous step:

Let Z 1 6^2 be the resulting series, then

Z Z Z Z

Z Z Z Z

Z Z Z Z

n n

n n n n

1

2 1

(^1 2 )

2

2 1

1 2

1 3

1

1

2 2

1 1

1 1

0 5 0 5 0 5 0 5

0 5 0 5 0 5 0 5

0 5 0 5 0 5 0 5

4 9

4 9

median , ,

median , ,

and

Z 1 6j 2 = median Z 1 6j 1 โˆ’ 2 , Z 1 6j 1 โˆ’^1 , Z 1 6j 1 , Z 1 6j 1 + 1 , Z 1 6j^1 +^2  j = 3 , K,nโˆ’ 2

  • A running median of 3 on Z 1 ( )^2 , K, Z (^) n( )^2 from the previous step:

Let Z 1 6^3 be the resulting series, then

Z Z Z Z j n

Z Z Z Z Z

Z Z Z Z Z

j j j j

n n n n n

3 1

2 2 1

2

13 23 33 12 23

(^3313 )

0 5 0 5 0 5 0 5

0 5 0 5 0 5 0 5 0 5

0 5 0 5 0 5 0 5 0 5

4 9

4 9

4 9

โˆ’ +

โˆ’ โˆ’ โˆ’

median , , , , ,

median , ,

median , ,

K

  • Hanning (Running Weighted Averages):

Z Z Z Z j n

Z Z Z Z

j j j j

n n

(^4 ) 4 1

(^3 ) 2

(^3 ) 4 1

3

14 13 4 3

0 5 0 5 0 5 0 5 2 1

0 5 0 5 0 5 0 5

โˆ’ + ,^ ,

K

Thus a, b are two sequences generated by FFT and they are called real and imaginary, respectively.

a n

X f t k r

b n

X f t k r

k t k t

n

k t k t

n

=

=

1

1

cos , ,

sin , ,

ฯ€

ฯ€

1 0 56

1 0 56

K

K

where

r n^ n n n

= %& โˆ’ '

1 6 if^ is odd if is even

and

a X b n

X (^) t t t

n 0 0 1

=

โˆ‘ cos^2 ฯ€^1

Inverse Fast Fourier Transform of Two Series (IFFT( a , b ))

The inverse Fourier Transform of two series {a, b} is defined as

X (^) t a b t a (^) k f (^) k t b (^) k f (^) kt k

q

k

q = โˆ’ โˆ’ + โˆ’ โˆ’ โˆ’



!

"

$

(^0 0) โˆ‘= 1 โˆ‘= 1 # cos 2 ฯ€ 1 16 7 2 cos 2 2 ฯ€ 1 16 7 sin 22 ฯ€ 1 167

References

Brigham, E. O. 1974. The fast fourier transform. Englewood Cliffs, N.J.: Prentice- Hall.

Monro, D. M. 1975. Algorithm AS 83: Complex discrete fast Fourier transform. Applied Statistics, 24: 153โ€“160.

Monro, D. M., and Branch, J. L. 1977. Algorithm AS 117: The chirp discrete Fourier transform of general length. Applied Statistics, 26: 351โ€“361.

Velleman, P. F. 1980 Definition and comparison of robust nonlinear data smoothing algorithms. Journal of the American Statistical Associations, 75: 609โ€“615.

Velleman, P. F., and Hoaglin, D. C. 1981. Applications, basics, and computing of exploratory data analysis. Boston: Duxbury Press.