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 consists of a succession of random steps on some โฆ mathematical space such as the integers. XC 2020
Markov Chain 2 4 1 5 3 XC 2020
Specifying a Markov Chain ยง We describe a Markov chain as follows: We have a set of states, ๐ = ๐ก ! , ๐ก " , โฏ , ๐ก # . ยง The process starts in one of ๐ก " these states and moves successively from one state to ๐ก $ another. Each move is called a step. ๐ก ! ๐ก % ๐ก # XC 2020
ยง 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
ยง The process can remain in the state it is in, and this occurs with probability ๐ !! . ๐ก " ๐ !! ๐ก $ ๐ก ! ๐ก % ๐ %% ๐ก # XC 2020
ยง An initial probability distribution, de fi ned on ๐ , speci fi es the starting state. Usually this is done by specifying a particular state as the starting state. ๐ฃ = ๐ฃ # ๐ฃ $ ๐ฃ % ๐ฃ & ๐ฃ ' ๐ฃ " ๐ฃ $ 0 1 0 0 0 ๐ก $ ๐ฃ ! ๐ก & ) ( ๐ฃ ! = 1 ๐ก # !(# ๐ฃ % ๐ฃ # ๐ก ' ๐ก % XC 2020
THE LAND OF OZ the Land of 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 or rain, they have an even ยง chance of having the same the next day. If there is change from snow or rain, only half ยง of the time is this a change to a nice day. XC 2020
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 1 2 2 XC 2020
If they have snow or rain, they have an even chance of having the same the next day. ยง 1 1 2 2 1 1 2 2 XC 2020
If there is change from snow or rain, only half of the time is this a change to a nice day. ยง 1 1 2 2 1 1 4 4 1 1 2 2 XC 2020
If there is change from snow or rain, only half of the time is this a change to a nice day. ยง 1 1 2 2 1 1 4 4 1 4 1 1 1 2 2 4 XC 2020
R N S โ R 1 1 ยง N 2 2 S 1 1 4 4 1 4 1 1 1 2 2 4 XC 2020
R N S โ ) ) ) R 1 1 ยง * + + N 2 2 S 1 1 4 4 1 4 1 1 1 2 2 4 XC 2020
R N S โ ) ) ) R * + + 1 1 ยง N ) ) 0 2 2 * * S 1 1 4 4 1 4 1 1 1 2 2 4 XC 2020
R N S ) ) ) โ * + + R 1 1 ยง ) ) N 0 2 2 * * S ) ) ) + + * 1 1 4 4 1 4 1 1 1 2 2 4 XC 2020
ยง States: ยง ๐ก ! : rain ยง ๐ก " : nice 1 1 ยง ๐ก & : snow 2 2 ! ! ! " $ $ ! ! 1 1 ยง ๐ = 0 " " 4 4 ! ! ! $ $ " 1 4 1 1 1 2 2 4 XC 2020
Transition Matrix ยง The entries in the fi rst row of the matrix ๐ in the example represent the probabilities for the various kinds of weather following a rainy day. ยง Similarly, the entries in the second and third rows represent the probabilities for the various kinds of weather following nice and snowy days, respectively. ยง Such a square array is called the matrix of transition probabilities, or the transition matrix. 1 1 2 2 1 1 1 1 1 2 4 4 4 4 1 1 ๐ = 0 1 2 2 4 1 1 1 4 4 2 1 1 1 2 2 4 XC 2020
1 1 2 2 1 1 1 ยง States: 1 1 2 4 4 4 4 ยง ๐ก ! : rain 1 1 ๐ = 0 ยง ๐ก " : nice 1 2 2 4 ยง ๐ก & : snow 1 1 1 4 4 2 1 1 1 2 2 4 the probability that, given the chain is in state ๐ today, it ๏ผ will be in state ๐ tomorrow XC 2020
1 1 2 2 1 1 1 ยง States: 1 1 2 4 4 4 4 ยง ๐ก ! : rain 1 1 ๐ = 0 ยง ๐ก " : nice 1 2 2 4 ยง ๐ก & : snow 1 1 1 4 4 2 1 1 1 2 2 4 the probability that, given the chain is in (!) = ๐ '( ๏ผ state ๐ today, it will be in state ๐ ๐ '( tomorrow the probability that, given the chain is in (") = โฏ ๏ผ state ๐ today, it will be in state ๐ the day ๐ '( after tomorrow XC 2020
1 1 2 2 1 1 1 ยง States: 1 1 2 4 4 4 4 ยง ๐ก ! : rain 1 1 ๐ = 0 ยง ๐ก " : nice 1 2 2 4 ยง ๐ก & : snow 1 1 1 4 4 2 1 1 1 2 2 4 ๏ผ โฆ (") = โฏ ๐ !& Day 0 Day 1 Day 2 โฆ XC 2020
1 1 2 2 1 1 1 ยง States: 1 1 2 4 4 ยง ๐ก # : rain 1 1 4 4 ๐ = 0 ยง ๐ก $ : nice 2 2 1 ยง ๐ก % : snow 1 1 1 4 4 4 2 1 1 1 2 2 4 ๐ ## ๐ #% ๐ #$ ๐ $% โฆ (") ๐ !& = ๐ !! ๐ !& + ๐ !" ๐ "& + ๐ !& ๐ && ๐ #% ๐ %% Day 0 Day 1 Day 2 โฆ XC 2020
1 1 1 ($) = ๐ ## ๐ #% + ๐ #$ ๐ $% + ๐ #% ๐ %% ๐ #% ยง States: 2 4 4 ๐ ## ๐ #$ ๐ #% ยง ๐ก # : rain 1 1 ๐ $# ๐ $$ ๐ $% ๐ = = 0 ยง ๐ก $ : nice 2 2 ๐ %# ๐ %$ ๐ %% ยง ๐ก % : snow 1 1 1 ๐ ## ๐ #$ ๐ #% ๐ #% 4 4 2 ๐ $% ๐ %% ๐ !! ๐ !# ๐ ## ๐ #$ ๐ #% ๐ ## ๐ #$ ๐ #% ๐ !" ๐ "# ๐ $ = ๐ $# ๐ $$ ๐ $% ๐ $# ๐ $$ ๐ $% โฆ 2 ๐ %# ๐ %$ ๐ %% ๐ %# ๐ %$ ๐ %% ($) ๐ !# ๐ ## ๐ #% = โฆ Day 0 Day 1 Day 2 XC 2020
๐ !! ๐ !# ($) = ๐ ## ๐ #% + ๐ #$ ๐ $% + ๐ #% ๐ %% ๐ !" ๐ "# ๐ #% โฆ % = ( ๐ #, ๐ ,% ,(# ๐ !# ๐ ## โฆ Day 0 Day 1 Day 2 ๐ !! ๐ !# ๐ !" ๐ "# ($) = ๐ ## ๐ #% + ๐ #$ ๐ $% + โฏ + ๐ #- ๐ -% ๐ #% โฆ - โฆ ๐ !โฏ ๐ โฏ# = ( ๐ #, ๐ ,% ,(# ๐ !& ๐ &# โฆ Day 0 Day 1 Day 2 XC 2020
๐ !! ๐ !# ๐ ## ๐ #$ ๐ #% ๐ ## ๐ #$ ๐ #% ๐ $ = ๐ $# ๐ $$ ๐ $% ๐ $# ๐ $$ ๐ $% ๐ !" ๐ "# 2 โฆ ๐ %# ๐ %$ ๐ %% ๐ %# ๐ %$ ๐ %% ($) ๐ #% ๐ !# ๐ ## = โฆ Day 0 Day 1 Day 2 ๐ ## ๐ #$ ๐ #% ) ๐ ) = ๐ $# ๐ $$ ๐ $% ๏ผ โฆ โฆ ๏ผ ๐ %# ๐ %$ ๐ %% ()) ๐ #% Day 0 Day 1 Day 2 Day โฆ Day n โฆ = XC 2020
Transition Matrix ยง Let ๐ be the transition matrix of a Markov chain. ๐ + gives ยง The ๐๐ th entry ๐ '( of the matrix the probability that the Markov chain, starting in state ๐ก ' , will be in state ๐ก ( after ๐ steps. ๐ ## ๐ #$ ๐ #% ) ๐ ) = ๐ $# ๐ $$ ๐ $% ๏ผ โฆ โฆ ๏ผ ๐ %# ๐ %$ ๐ %% ()) ๐ #% Day 0 Day 1 Day 2 Day โฆ Day n โฆ = XC 2020
๐ !# ๐ฃ ! ยง Starting states: the probability that ยง ยง rain: ๐ฃ # ๐ "# the chain is in state ยง nice: ๐ฃ $ โฆ ๐ฃ " ๐ก ( after ๐ steps: ยง snow: ๐ฃ % ๐ = 3 ยง ๐ฃ # ๐ ## ๐ = 1 ยง ๐ฃ = ๐ฃ ! ๐ฃ " ๐ฃ & Day 0 Day 1 โฆ (#) = ๐ฃ # ๐ #% + ๐ฃ $ ๐ $% + ๐ฃ % ๐ %% ๐ฃ % Transition matrix: ยง ๐ !! ๐ !" ๐ !# ๐ !" ๐ !# ๐ "! ๐ "" ๐ "# ๐ = ๐ ## ๐ #$ ๐ #% ๐ #! ๐ #" ๐ ## ๐ "! ๐ #! ๐ฃ # ๐ฃ $ ๐ฃ % 1 1 1 ๐ $# ๐ $$ ๐ $% ๐ %# ๐ %$ ๐ %% 2 4 4 ๐ "# 1 1 = 0 2 2 1 1 1 ๐ #" (#) = ๐ฃ๐ ๐ฃ (#) = ๐ฃ # (#) (#) ๐ฃ $ ๐ฃ % 4 4 2 ๐ "" ๐ ## XC 2020
๐ !# (#) = ๐ฃ # ๐ #% + ๐ฃ $ ๐ $% + ๐ฃ % ๐ %% ๐ฃ ! ๐ฃ % the probability ยง ๐ "# that the chain is โฆ ๐ฃ " in state ๐ก ( after (#) = ๐ฃ # ๐ #, + ๐ฃ $ ๐ $, + ๐ฃ % ๐ %, ๐ฃ , ๐ steps: ๐ฃ # ๐ ## ๐ = 1 ยง (#) = ๐ฃ๐ ๐ฃ (#) = ๐ฃ # (#) (#) ๐ฃ $ ๐ฃ % Day 0 Day 1 โฆ # (") = ๐ !! ๐ !# + ๐ !" ๐ "# + ๐ !# ๐ ## = . ๐ !! ๐ !# ๐ !( ๐ (# ๐ !# ๐ฃ ! (+! ๐ !" the probability ยง (") = ๐ฃ ! ๐ !# (") + ๐ฃ " ๐ "# (") + ๐ฃ # ๐ ## ๐ "# (") ๐ฃ # that the chain is โฆ ๐ฃ " in state ๐ก ( after ๐ !# ๐ steps: (") = ๐ฃ ! ๐ !( (") + ๐ฃ " ๐ "( (") + ๐ฃ # ๐ #( (") ๐ฃ ( ๐ฃ # ๐ ## ๐ = 2 ยง (") = ๐ฃ๐ " ๐ฃ (") = ๐ฃ ! (") (") ๐ฃ " ๐ฃ # โฆ Day 0 Day 1 Day 2 XC 2020
Recommend
More recommend