09.10.2023 Views

Advanced Data Analytics Using Python_ With Machine Learning, Deep Learning and NLP Examples ( 2023)

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Useful Methods

Let’s start with a moving average.

Moving Average Process

Chapter 6

Time Series

Suppose that {Z t } is a purely random process with mean 0 and variance σ z2 .

Then a process {X t } is said to be a moving average process of order q.

X = b Z + b Z + + b Z

t 0 t 1 t-1 q t-q

Here, {β i } are constants. The Zs are usually scaled so that β 0 = 1.

E( X )= 0

t

2 2

Var( X )= s b

t

q

å

Z

i=

0

i

The Zs are independent.

g ( k)= Cov ( X , X )

t t+

k

( t q t- q t+ k q t+ k-q)

= Cov b0Z + + b Z , b0Z + +

b Z

ì 0 k > q

q-k

ï 2

= ísZ

å bibi+

k

k= 01 ,, ¼,

q

ï i=

0

î

ï g (-k) k<

0

ìs Z

Cov ( 2

Zs,

Zt)=

í

î 0

s=

t

t

As γ(k) is not dependent on t and the mean is constant, the process is

second-order stationary for all values of {β i }.

131

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!