Stochastic Processes Markov Processes Hamid R. Rabiee 1 Overview - - PowerPoint PPT Presentation

โ–ถ
stochastic processes
SMART_READER_LITE
LIVE PREVIEW

Stochastic Processes Markov Processes Hamid R. Rabiee 1 Overview - - PowerPoint PPT Presentation

Stochastic Processes Markov Processes Hamid R. Rabiee 1 Overview o Markov Property o Markov Chains o Definition o Stationary Property o Paths in Markov Chains o Classification of States o Steady States in MCs. Stochastic Processes 2 Markov


slide-1
SLIDE 1

Hamid R. Rabiee

Stochastic Processes

Markov Processes

1

slide-2
SLIDE 2

Overview

  • Markov Property
  • Markov Chains
  • Definition
  • Stationary Property
  • Paths in Markov Chains
  • Classification of States
  • Steady States in MCs.

2

Stochastic Processes

slide-3
SLIDE 3

Markov Property

3

  • A discrete process has the Markov property if given its

value at time t, the value at time t+1 is independent of values at times before t. That is: ๐‘„๐‘  ๐‘Œ$%& = ๐‘ฆ$%& ๐‘Œ$ = ๐‘ฆ$, ๐‘Œ$*& = ๐‘ฆ$*&, โ€ฆ , ๐‘Œ& = ๐‘ฆ& = ๐‘„๐‘  ๐‘Œ$%& = ๐‘ฆ$%& ๐‘Œ$ = ๐‘ฆ$ For all t, x-%&, x-, ๐‘ฆ$*&, ๐‘ฆ$*., โ€ฆ , ๐‘ฆ&.

slide-4
SLIDE 4

Stationary Property

  • A Markov Process is called stationary if

Pr ๐‘Œ$%& = ๐‘ฃ|๐‘Œ$ = ๐‘ค = ๐‘„๐‘  ๐‘Œ& = ๐‘ฃ| ๐‘Œ0 = ๐‘ค for all t.

  • The evolution of stationary processes donโ€™t change over

time.

  • For defining the complete joint distribution of a

stationary Markov Process it is sufficient to define ๐‘„๐‘  ๐‘Œ& = ๐‘ฃ| ๐‘Œ0 = ๐‘ค and ๐‘„๐‘  ๐‘Œ0 = ๐‘ค for all u and v.

  • We will mainly consider stationary Markov processes

here.

4

slide-5
SLIDE 5

Example (Coin Tossing Game)

  • Consider a single player game in which at every step a

biased coin is tossed and according to the result, the score will be increased or decreased by one point.

  • The game ends if either the score reaches 100

(winning) or -100 (losing).

  • Score of the player at each step ๐‘ข โ‰ฅ 0 is a random

variable and the sequence of scores as the game progresses forms a random process ๐‘Œ7, ๐‘Œ&, โ€ฆ , ๐‘Œ$.

5

slide-6
SLIDE 6

Example (Coin Tossing Game)

  • It is easy to verify that X is a stationary Markov chain:

At the end of each step the score solely depends on the current score ๐‘ก9 and the result of tossing the coin (which is independent of time and previous tosses).

  • Stating this mathematically (for ๐‘ก9 โˆ‰ {โˆ’100,100}):

๐‘„๐‘  ๐‘Œ$%& = ๐‘ก ๐‘Œ$ = ๐‘ก9, ๐‘Œ$*& = ๐‘ก$*&, โ€ฆ , ๐‘Œ7 = 0 = ? ๐‘ž ; ๐‘ก = ๐‘ก9 + 1 1 โˆ’ ๐‘ž ; ๐‘ก = ๐‘ก9 โˆ’ 1 ; ๐‘๐‘ขโ„Ž๐‘“๐‘ ๐‘ฅ๐‘—๐‘ก๐‘“ = ๐‘„๐‘  ๐‘Œ$%& = ๐‘ก ๐‘Œ$ = ๐‘ก9 = ๐‘„๐‘  ๐‘Œ& = ๐‘ก ๐‘Œ7 = ๐‘ก9

  • If value of p was subject to change in time, the process

would not be stationary.

  • In the formulation we would have ๐‘ž$ instead of p.

6 Independent of t and ๐‘ก7, โ€ฆ , ๐‘ก$*&

slide-7
SLIDE 7

Example (Tracking)

  • Assume we want to track a target in XY plane, and so we need to

model its movement.

  • Assuming that current position and speed of the target describes

everything about its future movements, we can consider the 4- dimensional state:

๐‘‡$ = (๐‘Œ$, ๐‘

$, ฬ‡

๐‘Œ$, ฬ‡ ๐‘

$)

  • It is common to consider linear relation between ๐‘‡$ and ๐‘‡$*& with a

Gaussian additive noise: ๐‘‡$ = ๐ต$๐‘‡$*& + ๐‘ค$ ; ๐‘ค$~๐‘‚(0, ฮฃ) Or equivalently: ๐‘”

ST|STUV ๐‘ก$ ๐‘ก$*& = ๐‘‚(๐‘ก$; ๐ต$๐‘ก$*&, ฮฃ)

  • There exists efficient algorithms to work with these linear-

Gaussian models. 7

slide-8
SLIDE 8

Example (Tracking)

  • Considering the kinematics relations of a moving object we

can define linear relation as: ๐ต$ = 1 ฮ”๐‘ข 1 ฮ”๐‘ข 1 1

  • This approach can not model Acceleration
  • the speed is changed only because of noise.
  • We can model arbitrary speed change by appropriately

setting the 3rd and 4th rows of the matrix at each time.

  • An example of a non stationary Markov process.
  • Another approach is to extend the states to 6-

dimensions containing ฬˆ

๐‘Œ$ and ฬˆ

๐‘

$.

8 Independent of t (stationary)

slide-9
SLIDE 9

Example (Speech)

  • A basic model for speech signal considers the value at time

t to be a linear combination of its d previous values with a Gaussian additive noise: ๐‘‡$ = Y

Z[& \

๐›ฝZ ๐‘‡$*Z + ๐‘ค$ ; ๐‘ค$~๐‘‚(0, ฮฃ)

  • ๐‘‡$ is not a Markov process.

9

slide-10
SLIDE 10

Example (Speech)

  • We can make a stationary Markov process by considering

the d-dimensional state ๐‘‰$ = ๐‘‡$, ๐‘‡$*& โ€ฆ , ๐‘‡$*\ _:

๐‘‰$ = ๐ต๐‘‰$*& + ๐‘ค`๐ถ

Where: ๐ต = ๐›ฝ& ๐›ฝ. โ‹ฏ ๐›ฝ\ 1 โ‹ฏ 1 โ‹ฎ โ‹ฑ 1 , ๐ถ = 1 โ‹ฎ 1

  • Equivalently:

๐‘”

eT|eTUV ๐‘ฃ$ ๐‘ฃ$*& = ๐‘‚ ๐‘ฃ$;

๐ต$๐‘ฃ$*& & , ฮฃ ๐• โˆ€ 1 โ‰ค ๐‘— โ‰ค ๐‘’ โˆถ ๐‘ฃ$ Z*& = ๐‘ฃ$*& Z

  • Which (๐‘ฆ)Z is the ๐‘—th dimension of vector ๐‘ฆ and ๐• is the indicator function (used for

guaranteeing consistency).

  • Note that we have repeated ๐‘Œ$ in d consecutive states of U and there should be no

inconsistency between those values.

10

slide-11
SLIDE 11

Markov Process Types

11

  • Two types of Markov processes based on domain
  • f ๐‘Œ$ values:
  • Discrete
  • Continuous
  • Discrete Markov processes are called โ€œMarkov

Chainsโ€ (MC).

  • In this session we will focus on stationary MCs.
slide-12
SLIDE 12

Transition matrix

  • According to the Markov property and stationary property,

at each time step the process moves according to a fixed transition matrix: ๐‘„ ๐‘Œ$%& = ๐‘˜ ๐‘Œ$ = ๐‘— = ๐‘žZl

  • Stochastic matrix: Rows sum up to 1

Double stochastic matrix: Rows and columns sum up to 1

12

slide-13
SLIDE 13

State Graph

  • It is convenient to visualize a stationary Markov Chain

with a transition diagram:

  • A node represents a possible value of ๐‘Œ$.
  • At each time t, we say the process is in state ๐‘ก if ๐‘Œ$=s.
  • Each edge represents the probability of going from one state

to another (we omit edges with zero weight).

  • We should also specify the vector of initial probabilities ๐œŒ

= ๐œŒ&, โ€ฆ , ๐œŒn where ๐œŒZ = ๐‘„๐‘ (๐‘Œ7 = ๐‘—).

  • So a stationary discrete process could be described as a

person walking randomly on a graph (considering each step to depend only on the state he is currently in).

  • The result path is called a โ€œRandom Walkโ€.

13

slide-14
SLIDE 14

Example

  • The transition diagram of the coin tossing game:
  • We modeled winning and losing by states which

when we get into, we never get out.

  • Note that if the process was not stationary we were

not able to visualize it in this way:

  • For example consider the case that p is changing in time.

14

  • 100
  • 99
  • 98

99

100

p p p p 1-p 1-p 1-p 1-p 1-p 1 1

slide-15
SLIDE 15

Example (Modeling Weather)

  • Example: Each day is sunny or rainy. If a day is

rainy, the next day is rainy with probability ๐›ฝ (and sunny with probability 1 โˆ’ ๐›ฝ). If the day is sunny, the next day is rainy with probability ๐›พ (and sunny with probability 1 โˆ’ ๐›พ). S = {rainy, sunny}, ๐‘„ = ๐›ฝ 1 โˆ’ ๐›ฝ ๐›พ 1 โˆ’ ๐›พ

15 R S ๐›ฝ 1 โˆ’ ๐›ฝ ๐›พ 1 โˆ’ ๐›พ

slide-16
SLIDE 16

Paths

  • If the state space is {0,1} we have:

๐‘ž๐‘  ๐‘ฆ2 = 0 ๐‘ฆ0 = 0 = ๐‘„๐‘  ๐‘ฆ& = 1 ๐‘ฆ7 = 0 ร— ๐‘ž ๐‘ฆ. = 0 ๐‘ฆ& = 1 +๐‘„๐‘  ๐‘ฆ& = 0 ๐‘ฆ7 = 0 ร— ๐‘ž ๐‘ฆ. = 0 ๐‘ฆ& = 0

  • Define ๐‘žZl

(n) as the probability that starting from state i, the

process stops at state j after n time steps. ๐‘žZl

(.) = โˆ‘`[& โ‚ฌ

๐‘žZ`๐‘ž`l

16

Stochastic Processes

slide-17
SLIDE 17

Paths

  • Theorem:

๐‘žZl

(n) = Y `[& โ‚ฌ

๐‘žZ`

(n*&)๐‘ž`l

  • To simplify the notation we define the matrix ๐‘„(n) such that

the value at the iโ€™th row and jโ€™th column is ๐‘žZl

(n).

  • Corollary 1: ๐‘„(n) can be calculated by: ๐‘„(n) = ๐‘„n
  • Corollary 2: If the process starts at time 0 with distribution

๐œŒ on the states then after n steps the distribution is ๐œŒ๐‘„n.

17

Stochastic Processes

slide-18
SLIDE 18

Absorbing Markov Chain

  • An absorbing state is one in which the probability that the

process remains in that state once it enters the state is 1 (i.e., ๐‘žZZ = 1).

  • A Markov chain is absorbing if it has at least one absorbing

state, and if from every state it is possible to go to an absorbing state (not necessarily in one step).

  • An absorbing Markov chain will eventually enter one of the

absorbing states and never leave it.

  • Example: The 100 and -100 states in coin tossing game
  • Note: After playing ling enough, the player will either win
  • r lose (with probability 1).

18

Stochastic Processes

  • 100
  • 99
  • 98

99

100

p p p p 1-p 1-p 1-p 1-p 1-p 1 1

slide-19
SLIDE 19

Absorption theorem

  • In an absorbing Markov chain the probability that the

process will be absorbed is 1.

  • Proof: From each non-absorbing state ๐‘ก

l it is possible to

reach an absorbing state starting from ๐‘ก

  • l. Therefore there

exists p and m, such that the probability of not absorbing after m steps is at most p, in 2m steps at most ๐‘ž., etc.

  • Since

the probability

  • f

not being absorbed is monotonically decreasing, we have:

  • lim

nโ†’โ€žPr(not absorbed after n steps) =0

19

Stochastic Processes

slide-20
SLIDE 20

Classification of States

  • Accessibility: State j is said to be accessible from state i if

starting in i it is possible that the process will ever enter state j: (๐‘„n)Zl> 0 .

  • Communication: Two states i and j that are accessible to each
  • ther are said to communicate.
  • Every node communicates with itself:
  • pโ€ โ€ 

7 = Pr ๐‘Œ7 = ๐‘— ๐‘Œ7 = ๐‘— = 1

  • Communication is an equivalence relation: It divides the

state space up into a number of separate classes in which every pair of states communicate. (why?)

  • The Markov chain is said to be irreducible if it has only one

class.

20

Stochastic Processes

slide-21
SLIDE 21

Transient and Recurrent states

  • For any state i we let ๐‘”

Z denote the probability that, starting in

state i, the process will ever reenter state i : ๐‘”

Z = Pr โˆƒ๐‘œ: ๐‘Œn = ๐‘— ๐‘Œ7 = ๐‘—)

  • State i is said to be recurrent if fZ = 1 and transient if fZ < 1.
  • Theorem 1: State i is recurrent if and only if, starting in state i,

the expected number of time periods that the process is in state i is infinite:

  • Corollary 1: A transient state will only be visited a finite number
  • f times
  • Proof:

๐น ๐‘ก๐‘—๐‘จ๐‘“ ๐‘œ: ๐‘Œn = ๐‘— ๐‘Œ7 = ๐‘— = โˆ‘`[&

โ€ž

๐‘™ร—๐‘„๐‘ (๐‘ก๐‘—๐‘จ๐‘“ ๐‘œ: ๐‘Œn = ๐‘— = ๐‘™|๐‘Œ7 = ๐‘—) = โ€ฆ + โˆžร—๐‘ž๐‘ ๐‘๐‘ ๐‘ก๐‘—๐‘จ๐‘“ ๐‘œ: ๐‘Œn = ๐‘— = โˆž|๐‘Œ7 = ๐‘— < โˆž โ‡’ ๐‘ž๐‘ ๐‘๐‘ ๐‘ก๐‘—๐‘จ๐‘“ ๐‘œ: ๐‘Œn = ๐‘— = โˆž|๐‘Œ7 = ๐‘— = 0

21

Stochastic Processes

slide-22
SLIDE 22

Transient and Recurrent states

  • Theorem 2: State i is recurrent iff โˆ‘n[&

โ€ž (๐‘„n)ZZ = โˆž.

  • Look at the text book for proof.
  • Corollary 2: A finite state Markov chain has at least one

recurrent state.

  • If all states are transient there will be a finite number of

steps that after that the process should not be in any state (which is a contradiction).

22

Stochastic Processes

slide-23
SLIDE 23

Ergodic states

  • If state i is recurrent, then it is said to be positive recurrent if,

starting in i, the expected time until the process returns to state i is finite.

  • In a finite-state MC, all recurrent states are positive

recurrent.

  • State i is said to have period d if ๐‘žn ZZ=0 whenever n is not

divisible by d, and d is the largest integer with this property.

  • Equivalently: ๐‘’ = gcd ๐‘œ: Pr ๐‘Œn = ๐‘— ๐‘Œ7 = ๐‘— > 0}
  • A state with period 1 is said to be aperiodic.
  • We call an MC aperiodic if all its states are aperiodic.
  • A state i is said to be ergodic if it is aperiodic and positive

recurrent.

  • Period, recurrence and positive recurrence are all class

properties. They are shared between states of a class.

23

Stochastic Processes

slide-24
SLIDE 24

Example

24

Stochastic Processes

1

0.25

2

0.75

3

0.25

5 6

0.75 0.75 0.25 0.25

7 8

1 1 1 0.25

4

0.25 0.5 0.75

Classes: {1},{2,3},{4,5},{6},{7.8} Recurrent states: 6, 7, 8 => all positive Periodic states: 2, 3, 7, 8 (with period 2) Absorbing state(s): 6 Ergodic state(s): 6

1

As time goes to infinity, what is the probability of being in each class? Answer: The process will be in transient classes {1},{2,3},{4,5} with probability 0. Problem is symmetric for entering classes {6} and {7,8} as their only input edge is one from 5 with equal probabilities 0.25, and

  • nce it enters them, there is no way out. So at infinity probability of

being in each of these two classes is 0.5.

slide-25
SLIDE 25

Example

25

Stochastic Processes

1

0.25

2

0.75

3

0.25

5 6

0.75 0.75 0.25 0.25

7 8

1 1 1 0.25

4

0.25 0.5 0.75

Classes: {1},{2,3},{4,5},{6},{7.8} Recurrent states: 6, 7, 8 => all positive Periodic states: 2, 3, 7, 8 (with period 2) Absorbing state(s): 6 Ergodic state(s): 6

1 If the process is absorbed in {7,8} (which could be considered as an absorbing super state) what will happen after that? It will alternate between 7 and 8 to the end. So at time ๐‘ข โ†’ โˆž probability of being in 7 (or 8) will depend on the parity of t. In general finding the exact behavior of non-ergodic states as ๐‘ข โ†’ โˆž is not easy. (try it!) We will talk about the ergodic cases in next slides.

slide-26
SLIDE 26

Steady State

26

Stochastic Processes

Theorem: For an irreducible ergodic Markov chain lim

nโ†’โ€ž ๐‘„n Zl

exists and is independent of ๐‘—. Furthermore, letting

๐œŒl

โˆ— = lim nโ†’โ€ž ๐‘„n Zl

Then ๐œŒโˆ— = ๐œŒ&

โˆ—, โ€ฆ ๐œŒ\ โˆ— $ is unique nonnegative solution of

๐œŒโˆ— = ๐œŒโˆ—๐‘„ Y

l[& \

๐œŒl = 1

  • If the ergodicity condition is removed, lim

nโ†’โ€ž ๐‘„n Zl does not exist

in general but the given equations yet have a unique solution ๐œŒโˆ— = ๐œŒ&

โˆ—, โ€ฆ ๐œŒ\ โˆ— $ in which ๐œŒl โˆ— will be equal to the long run

proportion of time that the Markov chain is in state j.

slide-27
SLIDE 27

Example

27

Stochastic Processes

  • Consider the weather model example discussed before. We

want to see how will the weather be when time goes to infinity: ๐‘„ = ๐›ฝ 1 โˆ’ ๐›ฝ ๐›พ 1 โˆ’ ๐›พ โ€œ ๐œŒ7

โˆ— = ๐›ฝ๐œŒ7 โˆ— + ๐›พ๐œŒ& โˆ—

๐œŒ&

โˆ— = 1 โˆ’ ๐›ฝ ๐œŒ7 โˆ— + 1 โˆ’ ๐›พ ๐œŒ& โˆ—

๐œŒ7

โˆ— + ๐œŒ& โˆ— = 1

  • Which yields that ๐œŒ7

โˆ— = โ€ &%โ€*โ€ข and ๐œŒ& โˆ— = &*โ€ข &%โ€*โ€ข .

  • Exercise: In each of the following cases investigate the

existence of solution and its meaning:

  • 1) ๐›ฝ=0 and ๐›พ = 1
  • 2) ๐›ฝ=1 and ๐›พ = 0

One of these equations is redundant. (why?)

slide-28
SLIDE 28

References

  • Ross, Sheldon M. Introduction to probability

models.

28

Stochastic Processes