Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
MARKOV CHAIN
A M AT 1 8 2 2 N D S E M AY 2 0 1 6 - 2 0 1 7
THE RUSSIAN MATHEMATICIAN
Andrei
Andreyevich
Markov
https://en.wikipedia.org/wiki/Andrey_Markov#/media/File:AAMarkov.jpg
TWO NICE BOOKS
HOW IMPORTANT IS HISTORY
Suppose we have a stochastic process: ๐๐ก . For simplicity, let
us consider a discrete-time process (but we can also consider
continuous-time).
โข It is possible that the random variable ๐๐ก+1 does not depend
on ๐๐ก , ๐๐กโ1 , ๐๐กโ2 ,โฆ (similar to my example in the last
lecture)
โข It is also possible that the random variable ๐๐ก+1 does
depend on ๐๐ก , ๐๐กโ1 , ๐๐กโ2 ,โฆ
HOW IMPORTANT IS HISTORY
What if I only consider only the present, NOT THE PAST, to
affect the future?
That is, the random variable ๐๐ก+1 does depend on ๐๐ก but not
on ๐๐กโ1 , ๐๐กโ2 ,โฆ
This property is called โmemorylessโ, โlack of memoryโ,
โforgetfulnessโ.
HOW IMPORTANT IS HISTORY
The process following such memoryless property is called a
MARKOV PROCESS.
Actually, the memoryless property is also called Markov
property. A system following this property can be called
โMarkovianโ.
The memoryless property makes it possible to easily predict
the behavior of a Markov process.
If we consider a chain with memoryless
property then we have a MARKOV CHAIN.
โMarkov chains are the simplest mathematical models for
random phenomena evolving in timeโ.
โThe whole of the mathematical study of stochastic
processes can be regarded as a generalization in one way or
another of the theory of Markov chainsโ.
- Norris
MARKOV CHAINS
In this lecture, we will focus on discrete-time Markov chains,
but to give you a hint: Poisson process and Birth process are
examples of continuous-time Markov chains.
Continuous-time Markov chains in Queueing Theory
Sample Notation in AMAT 167:
(M/M/2):(FCFS/100/โ)
DISCRETE -TIME
MARKOV CHAIN
MARKOVIAN PROPERTY IN SYMBOLS
๐ท ๐ฟ๐+๐ = ๐ ๐ฟ๐ = ๐๐ , ๐ฟ๐ = ๐๐ , โฆ , ๐ฟ๐โ๐ = ๐๐โ๐ , ๐ฟ๐ = ๐
= ๐ท ๐ฟ๐+๐ = ๐ ๐ฟ๐ = ๐
for all ๐ and for any ๐, ๐, ๐๐,๐=๐,๐,๐โฆ,๐โ๐
TRANSITION PROBABILITIES
The conditional probability
๐ ๐๐ก+1 = ๐ ๐๐ก = ๐ for a Markov Chain is called a
one-step transition probability.
For simplicity, we denote ๐ ๐๐ก+1 = ๐ ๐๐ก = ๐ = ๐๐๐ .
TRANSITION PROBABILITIES
In a Markov Chain, if ๐ ๐๐ก+1 = ๐ ๐๐ก = ๐ =
๐ ๐1 = ๐ ๐0 = ๐ for all ๐ก then the one-step
transition probability is said to be stationary.
TRANSITION PROBABILITIES
The conditional probability
๐ ๐๐ก+๐ = ๐ ๐๐ก = ๐ for a Markov Chain is called
an n-step transition probability.
For simplicity, we denote ๐ ๐๐ก+๐ = ๐ ๐๐ก = ๐ =
๐๐๐ (๐) .
TRANSITION PROBABILITIES
If we have a stationary one-step transition
probability, it follows that
๐ ๐๐ก+๐ = ๐ ๐๐ก = ๐ = ๐ ๐๐ = ๐ ๐0 = ๐ for any
๐.
Note: we will just use the term โstationary
transition probabilityโ.
TRANSITION PROBABILITIES
Note that
โข ๐๐๐ (1) = ๐๐๐
โข ๐๐๐
โข
(0)
1, ๐ = ๐
= ๐ ๐๐ก = ๐ ๐๐ก = ๐ =
0, ๐ โ ๐
๐
(๐)
๐
๐=0 ๐๐
= 1, for all ๐, ๐ where ๐ is the total
number of possible outcomes/states
N-STEP TRANSITION PROBABILITY MATRIX
(N-STEP TRANSITION MATRIX)
State
0
๐ (๐) =
1
โฎ
M
0
โฆ
1
๐
๐00
(๐)
๐10
โฎ
(๐)
๐๐0
๐
๐01
(๐)
๐11
โฎ
(๐)
๐๐1
โฆ
โฆ
โฑ
โฆ
M
(๐)
๐0๐
(๐)
๐1๐
โฎ
(๐)
๐๐๐
If n=1, we call this matrix โtransition matrixโ.
OUR FOCUS
In this lecture,
we will focus on Markov Chains with
โข Finite number of states
โข Stationary transition probabilities
โข Initial probabilities ๐ ๐0 = ๐ are known for all ๐.
EXAMPLE 1 (TAHA)
A Weather Example
The weather in the town of Centerville can change rather quickly from
day to day. However, the chances of being dry (no rain) tomorrow are
somewhat larger if it is dry today than if it rains today. In particular, the
probability of being dry tomorrow is 0.8 if it is dry today, but is only 0.6 if
it rains today.
Assume that these probabilities do not change if information
about the weather before today is also taken into account.
For ๐ก = 0, 1, 2, โฆ , the random variable ๐๐ก takes on the values,
0 if day t is dry
๐๐ก =
1 if day t has rain
EXAMPLE 1
๐00 = ๐ ๐๐ก+1 = 0 ๐๐ก = 0 = 0.8
๐01 = ๐ ๐๐ก+1 = 1 ๐๐ก = 0 = 0.2
๐10 = ๐ ๐๐ก+1 = 0 ๐๐ก = 1 = 0.6
๐11 = ๐ ๐๐ก+1 = 1 ๐๐ก = 1 = 0.4
EXAMPLE 1
Transition matrix:
0.8
๐=
0.6
0.8
State
transition
diagram:
State
0
0.2
0.4
0.2
0.6
0.4
State
1
EXAMPLE 2 (TAHA)
An Inventory Example
Daveโs Photography Store has the following
inventory problem. The store stocks a particular
model camera that can be ordered weekly.
For ๐ก = 1, 2, โฆ , the i.i.d. random variable
๐ท๐ก ~๐๐๐๐ ๐ ๐๐(1) is
๐ท๐ก = demand for camera during week ๐ก.
EXAMPLE 2
For ๐ก = 0,1, 2, โฆ , let the random variable
๐๐ก = number of cameras on hand at the end of week ๐ก
where ๐0 is the initial stock.
At the end of each week, the store places an order that is
delivered in time for the next opening of the store. The
store uses the following order policy:
If ๐๐ก = 0, order 3 cameras.
If ๐๐ก > 0, do not order any cameras.
EXAMPLE 2
The inventory level fluctuates between a minimum
of zero cameras and a maximum of three cameras.
Possible states of ๐๐ก are 0, 1, 2, 3.
The random variables ๐๐ก are dependent and may be
evaluated iteratively by the expression
max{3โ๐ท๐ก+1 , 0} if ๐๐ก = 0
๐๐ก+1 =
.
max{๐๐ก โ๐ท๐ก+1 , 0} if ๐๐ก โฅ 1
EXAMPLE 2
What are the elements of the transition matrix
related to the Markov Chain ๐๐ก ?
๐00
๐10
๐= ๐
20
๐30
๐01
๐11
๐21
๐31
๐02
๐12
๐22
๐32
๐03
๐13
๐23
๐33
EXAMPLE 2
Since ๐ท๐ก ~๐๐๐๐ ๐ ๐๐ ๐ = 1 and using
๐ ๐ท๐ก+1 = ๐ =
๐๐ ๐ โ๐
,
๐!
โข ๐ ๐ท๐ก+1 = 0 = ๐
โ1
we have
โ 0.368
โข ๐ ๐ท๐ก+1 = 1 = ๐ โ1 โ 0.368
โข ๐ ๐ท๐ก+1 = 2 =
๐ โ1
2
โ 0.184
โข ๐ ๐ท๐ก+1 โฅ 3 = 1 โ ๐ ๐ท๐ก+1 โค 2 โ 0.08
EXAMPLE 2
For the transition from state 0 to state ๐ =
0,1,2,3 (1st row of the transition matrix): Since
๐๐ก+1 = max{3โ๐ท๐ก+1 , 0} if ๐๐ก = 0, then
โข ๐00 = ๐ ๐ท๐ก+1 โฅ 3 โ 0.08
โข ๐01 = ๐ ๐ท๐ก+1 = 2 โ 0.184
โข ๐02 = ๐ ๐ท๐ก+1 = 1 โ 0.368
โข ๐03 = ๐ ๐ท๐ก+1 = 0 โ 0.368
EXAMPLE 2
For the transition from state 1 to state ๐ =
0,1,2,3 (2nd row of the transition matrix): Since
๐๐ก+1 = max{๐๐ก โ๐ท๐ก+1 , 0} if ๐๐ก โฅ 1, then
โข ๐10 = ๐ ๐ท๐ก+1 โฅ 1 โ 0.632 (why?)
โข ๐11 = ๐ ๐ท๐ก+1 = 0 โ0.368
โข ๐12 = 0
โข ๐13 = 0
EXAMPLE 2
Doing similar computations to the rest of the
rows, we will have
0.08
0.632
๐โ
0.264
0.08
0.184
0.368
0.368
0.184
0.368
0
0.368
0.368
0.368
0
0
0.368
EXAMPLE 2
State transition diagram