MATH 20: PROBABILITY Markov Chain Xingru Chen - - PowerPoint PPT Presentation

β–Ά
math 20 probability
SMART_READER_LITE
LIVE PREVIEW

MATH 20: PROBABILITY Markov Chain Xingru Chen - - PowerPoint PPT Presentation

MATH 20: PROBABILITY Markov Chain Xingru Chen xingru.chen.gr@dartmouth.edu XC 2020 Random Walk 4 1 3 5 2 A ra walk is a mathematical object, known as a stochastic or random process, random that describes a path that


slide-1
SLIDE 1

MATH 20: PROBABILITY

Markov Chain Xingru Chen xingru.chen.gr@dartmouth.edu

XC 2020

slide-2
SLIDE 2

Random Walk

1 2 3 4 5

… A ra random walk is a mathematical

  • bject,

known as a stochastic

  • r random

process, that describes a path that consists

  • f

a succession

  • f random steps
  • n

some mathematical space such as the integers.

XC 2020

slide-3
SLIDE 3

Markov Chain

1 2 3 4 5

XC 2020

slide-4
SLIDE 4

Specifying a Markov Chain

Β§ We describe a Markov chain as follows: We have a set

  • f

states, 𝑇 = 𝑑!, 𝑑", β‹― , 𝑑# . Β§ The process starts in

  • ne
  • f

these states and moves successively from

  • ne

state to

  • another. Each

move is called a step.

𝑑! 𝑑" 𝑑# 𝑑$ 𝑑%

XC 2020

slide-5
SLIDE 5

Β§ If the chain is currently in state 𝑑!, then it moves to state 𝑑

" at

the next step with a probability denoted by π‘ž!". Β§ The probability π‘ž!" does not depend upon which states the chain was in before the current state. Β§ These probabilities are called transition probabilities.

𝑑! 𝑑" 𝑑# 𝑑$ 𝑑%

π‘ž!" π‘ž$" π‘ž%& π‘ž&" π‘ž"&

XC 2020

slide-6
SLIDE 6

Β§ The process can remain in the state it is in, and this

  • ccurs

with probability π‘ž!!.

𝑑! 𝑑" 𝑑# 𝑑$ 𝑑%

π‘ž!! π‘ž%%

XC 2020

slide-7
SLIDE 7

Β§ An initial probability distribution, defined

  • n

𝑇, specifies the starting

  • state. Usually

this is done by specifying a particular state as the starting state.

𝑣!

𝑑#

𝑣"

𝑑$

𝑣#

𝑑%

𝑣$

𝑑&

𝑣%

𝑑' 𝑣 = 𝑣# 𝑣$ 𝑣% 𝑣& 𝑣' 1 (

!(# )

𝑣! = 1

XC 2020

slide-8
SLIDE 8

THE LAND OF OZ

Β§ the Land

  • f

Oz is blessed by many things, but not by good weather. Β§ They never have two nice days in a

  • row. If

they have a nice day, they are just as likely to have snow as rain the next day. Β§ If they have snow

  • r

rain, they have an even chance

  • f

having the same the next day. Β§ If there is change from snow

  • r

rain,

  • nly

half

  • f

the time is this a change to a nice day.

XC 2020

slide-9
SLIDE 9

Β§ They never have two nice days in a

  • row. If

they have a nice day, they are just as likely to have snow as rain the next day. 1 2 1 2

XC 2020

slide-10
SLIDE 10

Β§ If they have snow

  • r

rain, they have an even chance

  • f

having the same the next day. 1 2 1 2 1 2 1 2

XC 2020

slide-11
SLIDE 11

Β§ If there is change from snow

  • r

rain,

  • nly

half

  • f

the time is this a change to a nice day. 1 2 1 2 1 2 1 2 1 4 1 4

XC 2020

slide-12
SLIDE 12

Β§ If there is change from snow

  • r

rain,

  • nly

half

  • f

the time is this a change to a nice day. 1 2 1 2 1 2 1 2 1 4 1 4 1 4 1 4

XC 2020

slide-13
SLIDE 13

1 2 1 2 1 2 1 2 1 4 1 4 1 4 1 4

Β§ β†— R N S R N S

XC 2020

slide-14
SLIDE 14

1 2 1 2 1 2 1 2 1 4 1 4 1 4 1 4

Β§ β†— R N S R N S

) * ) + ) +

XC 2020

slide-15
SLIDE 15

1 2 1 2 1 2 1 2 1 4 1 4 1 4 1 4

Β§ β†— R N S R N S

) * ) + ) + ) * ) *

XC 2020

slide-16
SLIDE 16

1 2 1 2 1 2 1 2 1 4 1 4 1 4 1 4

Β§ β†— R N S R N S

) * ) + ) + ) * ) * ) + ) + ) *

XC 2020

slide-17
SLIDE 17

1 2 1 2 1 2 1 2 1 4 1 4 1 4 1 4 Β§ States: Β§ 𝑑!: rain Β§ 𝑑": nice Β§ 𝑑&: snow Β§ 𝑄 =

! " ! $ ! $ ! " ! " ! $ ! $ ! "

XC 2020

slide-18
SLIDE 18

Transition Matrix

Β§ The entries in the first row

  • f

the matrix 𝑄 in the example represent the probabilities for the various kinds

  • f

weather following a rainy day. Β§ Similarly, the entries in the second and third rows represent the probabilities for the various kinds

  • f

weather following nice and snowy days, respectively. Β§ Such a square array is called the matrix

  • f

transition probabilities,

  • r

the transition matrix.

𝑄 = 1 2 1 4 1 4 1 2 1 2 1 4 1 4 1 2

1 2 1 2 1 2 1 2 1 4 1 4 1 4 1 4

XC 2020

slide-19
SLIDE 19

𝑄 = 1 2 1 4 1 4 1 2 1 2 1 4 1 4 1 2

?

the probability that, given the chain is in state 𝑗 today, it will be in state π‘˜ tomorrow

Β§ States: Β§ 𝑑!: rain Β§ 𝑑": nice Β§ 𝑑&: snow

1 2 1 2 1 2 1 2 1 4 1 4 1 4 1 4

XC 2020

slide-20
SLIDE 20

𝑄 = 1 2 1 4 1 4 1 2 1 2 1 4 1 4 1 2

?

the probability that, given the chain is in state 𝑗 today, it will be in state π‘˜ tomorrow

Β§ States: Β§ 𝑑!: rain Β§ 𝑑": nice Β§ 𝑑&: snow π‘ž'(

(!) = π‘ž'(

?

the probability that, given the chain is in state 𝑗 today, it will be in state π‘˜ the day after tomorrow

π‘ž'(

(") = β‹―

1 2 1 2 1 2 1 2 1 4 1 4 1 4 1 4

XC 2020

slide-21
SLIDE 21

𝑄 = 1 2 1 4 1 4 1 2 1 2 1 4 1 4 1 2 Β§ States: Β§ 𝑑!: rain Β§ 𝑑": nice Β§ 𝑑&: snow

Day Day 1 Day 2 …

? …

π‘ž!&

(") = β‹―

1 2 1 2 1 2 1 2 1 4 1 4 1 4 1 4

XC 2020

slide-22
SLIDE 22

1 2 1 2 1 2 1 2 1 4 1 4 1 4 1 4

𝑄 = 1 2 1 4 1 4 1 2 1 2 1 4 1 4 1 2 Β§ States: Β§ 𝑑#: rain Β§ 𝑑$: nice Β§ 𝑑%: snow Day Day 1 Day 2 …

…

π‘ž!&

(")

= π‘ž!!π‘ž!& + π‘ž!"π‘ž"& + π‘ž!&π‘ž&&

π‘ž## π‘ž#% π‘ž#$ π‘ž$% π‘ž#% π‘ž%%

XC 2020

slide-23
SLIDE 23

𝑄 = π‘ž## π‘ž#$ π‘ž#% π‘ž$# π‘ž$$ π‘ž$% π‘ž%# π‘ž%$ π‘ž%% = 1 2 1 4 1 4 1 2 1 2 1 4 1 4 1 2 Β§ States: Β§ 𝑑#: rain Β§ 𝑑$: nice Β§ 𝑑%: snow π‘ž#%

($) = π‘ž##π‘ž#% + π‘ž#$π‘ž$% + π‘ž#%π‘ž%%

Day Day 1 Day 2

… … π‘ž!! π‘ž!# π‘ž!" π‘ž"# π‘ž!# π‘ž##

π‘ž## π‘ž#$ π‘ž#% π‘ž#% π‘ž$% π‘ž%% 𝑄$ = π‘ž## π‘ž#$ π‘ž#% π‘ž$# π‘ž$$ π‘ž$% π‘ž%# π‘ž%$ π‘ž%% 2 π‘ž## π‘ž#$ π‘ž#% π‘ž$# π‘ž$$ π‘ž$% π‘ž%# π‘ž%$ π‘ž%% = π‘ž#%

($)

XC 2020

slide-24
SLIDE 24

π‘ž#%

($) = π‘ž##π‘ž#% + π‘ž#$π‘ž$% + π‘ž#%π‘ž%%

= (

,(# %

π‘ž#,π‘ž,%

Day Day 1 Day 2

… … π‘ž!! π‘ž!# π‘ž!" π‘ž"# π‘ž!# π‘ž##

Day Day 1 Day 2

… … π‘ž!! π‘ž!# π‘ž!" π‘ž"# π‘ž!& π‘ž&# … π‘ž!β‹― π‘žβ‹―#

π‘ž#%

($) = π‘ž##π‘ž#% + π‘ž#$π‘ž$% + β‹― + π‘ž#-π‘ž-%

= (

,(#

  • π‘ž#,π‘ž,%

XC 2020

slide-25
SLIDE 25

Day Day 1 Day 2 Day … Day n … ? … ? …

Day Day 1 Day 2

… … π‘ž!! π‘ž!# π‘ž!" π‘ž"# π‘ž!# π‘ž##

𝑄$ = π‘ž## π‘ž#$ π‘ž#% π‘ž$# π‘ž$$ π‘ž$% π‘ž%# π‘ž%$ π‘ž%% 2 π‘ž## π‘ž#$ π‘ž#% π‘ž$# π‘ž$$ π‘ž$% π‘ž%# π‘ž%$ π‘ž%% = π‘ž#%

($)

𝑄) = π‘ž## π‘ž#$ π‘ž#% π‘ž$# π‘ž$$ π‘ž$% π‘ž%# π‘ž%$ π‘ž%%

)

= π‘ž#%

())

XC 2020

slide-26
SLIDE 26

Transition Matrix

Β§ Let 𝑄 be the transition matrix

  • f

a Markov chain. Β§ The π‘—π‘˜th entry π‘ž'( of the matrix 𝑄+ gives the probability that the Markov chain, starting in state 𝑑', will be in state 𝑑

( after

π‘œ steps.

Day Day 1 Day 2 Day … Day n … ? … ? …

𝑄) = π‘ž## π‘ž#$ π‘ž#% π‘ž$# π‘ž$$ π‘ž$% π‘ž%# π‘ž%$ π‘ž%%

)

= π‘ž#%

())

XC 2020

slide-27
SLIDE 27

Β§ Starting states: Β§ rain: 𝑣# Β§ nice: 𝑣$ Β§ snow: 𝑣%

𝑣 = 𝑣! 𝑣" 𝑣&

Β§ Transition matrix: 𝑄 = π‘ž!! π‘ž!" π‘ž!# π‘ž"! π‘ž"" π‘ž"# π‘ž#! π‘ž#" π‘ž## = 1 2 1 4 1 4 1 2 1 2 1 4 1 4 1 2

π‘ž!" π‘ž!# π‘ž## π‘ž"" π‘ž"! π‘ž#! π‘ž"# π‘ž#"

𝑣%

(#) = 𝑣#π‘ž#% + 𝑣$π‘ž$% + 𝑣%π‘ž%%

𝑣# 𝑣$ 𝑣% π‘ž## π‘ž#$ π‘ž#% π‘ž$# π‘ž$$ π‘ž$% π‘ž%# π‘ž%$ π‘ž%% 𝑣(#) = 𝑣#

(#)

𝑣$

(#)

𝑣%

(#) = 𝑣𝑄

π‘ž!# π‘ž"# π‘ž##

Day Day 1 …

… 𝑣! 𝑣" 𝑣# Β§ the probability that the chain is in state 𝑑( after π‘œ steps: Β§ 𝑙 = 3 Β§ π‘œ = 1

XC 2020

slide-28
SLIDE 28

𝑣,

(#) = 𝑣#π‘ž#, + 𝑣$π‘ž$, + 𝑣%π‘ž%,

𝑣(#) = 𝑣#

(#)

𝑣$

(#)

𝑣%

(#) = 𝑣𝑄

π‘ž!# π‘ž"# π‘ž##

Day Day 1 …

… 𝑣! 𝑣" 𝑣# Β§ the probability that the chain is in state 𝑑( after π‘œ steps: Β§ π‘œ = 1

𝑣%

(#) = 𝑣#π‘ž#% + 𝑣$π‘ž$% + 𝑣%π‘ž%%

Β§ the probability that the chain is in state 𝑑( after π‘œ steps: Β§ π‘œ = 2

Day Day 1 Day 2

… 𝑣! … π‘ž!! π‘ž!# π‘ž!" π‘ž"# π‘ž!# π‘ž## 𝑣" 𝑣# π‘ž!#

(") = π‘ž!!π‘ž!# + π‘ž!"π‘ž"# + π‘ž!#π‘ž## = . (+! #

π‘ž!(π‘ž(# 𝑣#

(") = 𝑣!π‘ž!# (") + 𝑣"π‘ž"# (") + 𝑣#π‘ž## (")

𝑣(

(") = 𝑣!π‘ž!( (") + 𝑣"π‘ž"( (") + 𝑣#π‘ž#( (")

𝑣(") = 𝑣!

(")

𝑣"

(")

𝑣#

(") = 𝑣𝑄"

XC 2020

slide-29
SLIDE 29

Transition Matrix

Β§ Let 𝑄 be the transition matrix

  • f

a Markov chain, and let 𝑣 be the probability vector which represents the starting distribution. Β§ Then the probability that the chain is in state 𝑑, after π‘œ steps is the 𝑙th entry in the vector 𝑣(+) = 𝑣𝑄+.

Day Day 1 Day 2 Day … Day n … ? … ? …

𝑣()) = 𝑣𝑄) = 𝑣 π‘ž## π‘ž#$ π‘ž#% π‘ž$# π‘ž$$ π‘ž$% π‘ž%# π‘ž%$ π‘ž%%

)

= 𝑣#

())

𝑣$

())

𝑣%

())

𝑣! 𝑣" 𝑣#

XC 2020

slide-30
SLIDE 30

Open book Scope: Mostly Chapters 7, 8, 9, 10, and 11 Β§ sum

  • f

random variables Β§ LLN and CLT Β§ generating functions Β§ Markov chains Materials: sl slides, ho homework, qu quizzes, textbook Date & Time: 12:00 pm – 10: 00 pm, August 30 Office hours: August 27, 28 Homework due: 11:00 pm August 28

Au August 2020

Fi Final

26 26 27 27 28 28 29 29 30 30 31 31 01 01 02 02 03 03 04 04 05 05 06 06 07 07 08 08 09 09 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 28 28 27 27 30 30 05 05 31 31 01 01 02 02 04 04 03 03 29 29

Sun Mon Tue Wed Thu Fri Sat

XC 2020