Download MARKOV CHAIN

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Probability wikipedia , lookup

Transcript
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