Stationary stochastic processes

Chapter 2 Stationary stochastic processes Maria Sandsten Lecture 2 August 30 2016 Maria Sandsten - [email protected] Stationary stochastic pro...
1 downloads 1 Views 790KB Size
Chapter 2

Stationary stochastic processes Maria Sandsten Lecture 2

August 30 2016

Maria Sandsten - [email protected]

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

Schedule for today

I

Definition of a stationary stochastic process (part2)

I

Covariance and correlation functions

I

Estimation of mean value function

Reading instructions: chapter 2.3, 2.4.1, 2.4.2, 2.5.1, 2.5.2, 2.6 and (2.5.3). Study examples 2.12-2.14.

Maria Sandsten - [email protected]

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

Definitions: stochastic processes

Definition 2.1: For any stochastic process, we define I

mean value function, m(t) = E [X (t)],

I

covariance function, r (s, t) = C [X (s), X (t)],

I

variance function, v (t) = V [X (t)] = C [X (t), X (t)],

I

correlation function, ρ(s, t) = √ C [X (s),X (t)] . V [X (s)]V [X (t)]

Maria Sandsten - [email protected]

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

Definition: Weakly stationary process

A process is defined as wide-sense or weakly stationary (svagt station¨ar) when: I

mean value function, m(t) = m (const.),

I

covariance function, r (s, t) = r (t − s) = r (τ ), τ = t − s,

I

variance function, v (t) = r (0) (const.),

I

correlation function, ρ(s, t) = ρ(τ ) = r (τ )/r (0).

Maria Sandsten - [email protected]

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

Example 2.5 again From a sequence Ut of independent random variables with mean zero and variance σ 2 , we construct a new process Xt by Xt = Ut + 0.5Ut−1 . r (0) = r (t, t) = V [Xt ] = C [Ut + 0.5Ut−1 , Ut + 0.5Ut−1 ] = 1.25σ 2 , r (−1) = r (t + 1, t) = C [Ut+1 + 0.5Ut , Ut + 0.5Ut−1 ] = 0.5σ 2 . The case r (t − 1, t) gives the same result, i.e., r (1) = 0.5σ 2 and one easily finds that r (±2) = 0.

Maria Sandsten - [email protected]

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

More properties of a weakly stationary process For a weakly stationary stochastic process we have (see Theorem 2.2): I

non-negative variance r (0) ≥ 0,

I

symmetrical covariance function r (−τ ) = r (τ ),

I

variance is the maximum of the covariance function r (0) ≥ |r (τ )|.

Note that the properties are for real-valued processes. Complex-valued processes are not covered in this course.

Maria Sandsten - [email protected]

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

Old exam, problem 3 (modified)

Determine which of the following that correspond to a valid covariance function of a weakly discrete-time stationary process. Justify your answers.   1.2 τ = 0 I a) r (τ ) = 0.5 τ = ±1  0 otherwise, sin(τ ) τ ,

I

b) r (τ ) =

I

c) r (τ ) = δ(τ − 1) + δ(τ + 1),

I

d) r (τ ) = cos(τ ).

Maria Sandsten - [email protected]

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

Correlation example

Maria Sandsten - [email protected]

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

Example 1 Correlation function ρ(τ ) = (−0.8)|τ | . Realization

4 2

0.5

x

t

ρ(τ)

0 -2

0 -0.5

-4 -6

0

4

10

20 t

30

40

-1

Correlation, ρ (1)=-0.8

5 τ

10

Correlation, ρ (2)=0.64

t+2

t+1

2

x

0

-2 -4 -4

0

4

2

x

Correlation function

1

0

-2

-2

0 x

2

4

t

Maria Sandsten - [email protected]

-4 -4

-2

0 x

2

t

Stationary stochastic processes

4

Chapter 2

Covariance and correlation Estimation of mean value

Example 2 Correlation function ρ(τ ) = 0.8|τ | . Realization

3 2

0.8 ρ(τ)

1 x

t

0

-1

0.6 0.4 0.2

-2 -3

0

4

10

20 t

30

0

40

Correlation, ρ (1)=0.8

5 τ

10

Correlation, ρ (2)=0.64

t+2

t+1

2

x

0

-2 -4 -4

0

4

2

x

Correlation function

1

0

-2

-2

0 x

2

4

t

Maria Sandsten - [email protected]

-4 -4

-2

0 x

2

t

Stationary stochastic processes

4

Chapter 2

Covariance and correlation Estimation of mean value

Data and correlation function The main period of data is reflected in the period of the correlation and covariance function. Realization

Correlation function

20

1

0

0

−20

0

10

20

30

−1

20

1

0

0

−20

0

10

20

30

−1

20

1

0

0

−20

0

10

20

30

t

Maria Sandsten - [email protected]

−1

0

10

20

30

0

10

20

30

0

10

20

30

τ

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

Data and correlation function High correlation for large values of τ is connected to a more periodic data sequence. Realization

Correlation function

20

1

0

0

−20

0

10

20

30

−1

0

10

20

30

0

10

20

30

0

10

20

30

1 10 0

0

−10 0

10

20

30

−1

10

1

0

0

−10

0

10

20

30

t

Maria Sandsten - [email protected]

−1

τ

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

Same covariance - different processes The weakly stationary processes are not unambiguous (entydigt) defined. However, if we specify the distribution function, the process is strictly stationary.

Maria Sandsten - [email protected]

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

Strictly stationary processes

A process is strictly stationary if its statistical distribution remain unchanged after a shift of the time scale. A strictly stationary process is always weakly stationary.

In this course we mainly deal with two strictly stationary processes: I

The Gaussian process, (chapter 5)

I

The random harmonic function.

Maria Sandsten - [email protected]

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

The random harmonic function Realizations of X (t) = A cos(2πf0 t + φ), with f0 = 1/2π, and; (a): φ = 0; (b): φ ∈ Rect(0, π); (c): φ ∈ Rect(0, 2π). 10 (a) 0 −10 0 10

2

4

6

8

10

2

4

6

8

10

2

4

6

8

10

(b) 0 −10 0 10 (c) 0 −10 0

The processes a) and b) are non-stationary and c) is strictly stationary. Maria Sandsten - [email protected]

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

Ergodicity (Ergodicitet) The mean value m = m(t) = E [Xt ] can be estimated from many realizations of Xt at one time instant t0 using the ensemble mean (ensembelmedelv¨arde). 20

15

10

5

0

-5

-10

-15

-20

0

10

20

30

40

50

60

70

80

90

100

Stationary stochastic processes Seconds

Maria Sandsten - [email protected]

Chapter 2

Covariance and correlation Estimation of mean value

Ergodicity (Ergodicitet) More practical is to estimate the mean value m, from the averaged value of just one realization of the data xt , t = 1 . . . n, using the estimator n 1X m ˆn = Xt , n t=1

the mean value over time (tidsmedelv¨arde). For a linearly ergodic (linj¨art ergodiska) process, E [m ˆ n ] = m. A stationary process is linearly ergodic.

Maria Sandsten - [email protected]

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

Estimation of mean If Xt , t = 1, 2 . . . is stationary with the unknown expected value m then n 1X m ˆn = Xt n t=1

is an unbiased (v¨antev¨ardesriktigt) estimate of m as n

E [m ˆn] =

1 1X E [Xt ] = (m + m + . . . + m) = m. {z } n n| t=1

Maria Sandsten - [email protected]

n

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

Variance of m ˆn The variance is calculated as V [m ˆn] = C [

n n n n 1X 1X 1 XX Xt , Xs ] = 2 r (s − t). n n n t=1

s=1

s=1 t=1

With s − t = u we get 1 V [m ˆn] = 2 n

n−1 X

(n − |u|)r (u).

u=−n+1

For large n, V [m ˆn] ≈

1X r (u), n u

and if V [m ˆ n ] → 0 when n → ∞, m ˆ n is consistent (konsistent).

Maria Sandsten - [email protected]

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

Example: Mean value estimator The stationary process {Xt , t = 0, ±1, ±2, . . .} has mean value, mX = E [Xt ] = 0, (zero-mean) and covariance function   1.2 τ = 0 0.5 τ = ±1 rX (τ ) =  0 otherwise. A new process is defined as Yt = Xt + mY , where the average level mY should be estimated. We have two choices for the estimation of mY , Yt + Yt−1 Yt + Yt−2 or m ˆ2 = . m ˆ1 = 2 2 Which of these two estimates is the best, i.e., has the lowest variance?

Maria Sandsten - [email protected]

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

Example 2.11 ”Dependence can deceive the eye”, p. 43, Example 2.11 AR1

4

independent

4

3

3

2

2

1

1

0

0

-1

-1

-2

-2

-3

-3

-4

-4 0

5

10

15

20

25

Maria Sandsten - [email protected]

0

5

10

15

20

25

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

Example 2.11 ”Dependence can deceive the eye”, p. 43, Example 2.11 AR1

4

independent

4

3

3

2

2

1

1

0

0

-1

-1

-2

-2

-3

-3

-4

-4 0

5

10

15

20

25

Maria Sandsten - [email protected]

0

5

10

15

20

25

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

Example 2.11 We can study this using Figure 2.14 page 44 to see the larger variance of the dependent process.) 40 samples of 25 dependent AR(1)−observations 4 2 0 −2 −4 0

5

10

15

20

25

30

35

40

35

40

40 samples with 25 independent observations 4 2 0 −2 −4 0

5

10

15

Maria Sandsten - [email protected]

20

25

30

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

Exercise 2.16: Number in the average Suppose that, {Xt , t = 0, ±1, ±2...}, is a stationary process with unknown mean m, known variance σ 2 and correlation function ρ(τ ) = 0.5|τ | ,

τ = 0, ±1, ±2, . . . .

We would like to estimate m by averaging N consecutive samples of the process. Suppose that N is large and approximate the variance of the estimator. Also, find the value of N, that would have been necessary in order to achieve the same variance, if the elements of the process Xt had been uncorrelated.

Maria Sandsten - [email protected]

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

Example: Mean value estimator again The stationary process {Xt , t = 0, ±1, ±2, . . .} has mean value, mX = E [Xt ] = 0, and covariance function  τ =0  1.2 −0.5 τ = ±1 rX (τ ) =  0 otherwise. A new process is defined as Yt = Xt + mY , where the average level mY should be estimated. We have two choices for the estimation of mY , Yt + Yt−1 Yt + Yt−2 or m ˆ2 = . m ˆ1 = 2 2 Which of these two estimates is the best, i.e., has the lowest variance?

Maria Sandsten - [email protected]

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

Estimation of covariance function

If Xt , t = 1, 2 . . . is a stationary Gaussian process and the covariance function fulfills n

1X r (τ )2 → 0 when n → ∞ n τ =1

then the process is ergodic of second order and we can estimate expected value and the covariance function as time averages from one realization.

Maria Sandsten - [email protected]

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

Estimation of covariance function Theorem 2.5: If the expected value m is known, n−τ

rˆn (τ ) = E [ˆ rn (τ )] =

1X (Xt − m)(Xt+τ − m), n 1 n

t=1 n−τ X

r (τ ) =

t=1

1 (n − τ )r (τ ) → r (τ ) n

when n → ∞, i.e., the estimate is asymptoticallyP (asymptotiskt) unbiased. If m is unknown the estimate m ˆ n = n1 nt=1 Xt is used.

Maria Sandsten - [email protected]

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

Example: Biased estimate The usual (biased) covariance estimates from a few realizations of a stationary stochastic process are made. The true covariance function is shown with crosses. Covariance estimates 3.5 3 2.5 2 1.5 1 0.5 0 −0.5 −1

0

5

10

15

Maria Sandsten - [email protected]

20 τ

25

30

35

40

Stationary stochastic processes

Chapter 2

Covariance and correlation Estimation of mean value

Example: Unbiased estimate The covariance estimate is divided with n − τ instead of n (unbiased). The variation of the estimates for large τ will be high as they are based on very few data values. Covariance estimates (unbiased) 4

3

2

1

0

−1

−2

0

5

10

15

Maria Sandsten - [email protected]

20 τ

25

30

35

40

Stationary stochastic processes

Suggest Documents