MCMC Sheldon Ross

download MCMC Sheldon Ross

of 68

Transcript of MCMC Sheldon Ross

  • 8/17/2019 MCMC Sheldon Ross

    1/68

    CH PTER

    Markov Chains

    4 1

    INTRODUCTION AND EXAMPLES

    Consider a stochastic process

    {X

    n

     

    n

    =

    0, 1

    2

    . . .

    }

    that

    takes

    on

    a finite

    or

    countable number

    of

    possible values. Unless otherwise mentioned this set

    of

    possible values of

    the

    process will be denoted

    by

    the

    set

    of nonnegative

    integers

    {O

    1 2 . . .

    .

    f

    Xn

    = i, then the process is said to be in state i at time

    n. We suppose that whenever

    the

    process is in

    state

    i, there is a fixed probability

    P that it will next be in state j. That is, we suppose that

    4.1.1)

    P{Xn

    1=

    j

    IX

    n

    =

    i, Xn

    _ =

    in

    -I' •

    ,XI

    = i ..

    Xo

    = io} =

    Pi,

    for all

    states

    i

    0 ii i _ I i,

    j

    and

    all n

    ~

    0. Such a stochastic process is

    known as a

    Markov chain.

    Equation (4.1 1)

    may

    be

    interpreted

    as stating that

    for a

    Markov

    chain,

    the

    conditional distribution

    of

    any future

    state

    Xn I'

    given the past states

    X

    o

    ,

    XI'

    X

    n

    I and the present state

    X

    n

    ,

    is independent

    of

    the past

    states

    and depends only

    on

    the present state. This is called the

    Markovian property. The value P represents the probability that the process

    will, when in state i, next make a transition into state

    j.

    Since probabilities

    are nonnegative

    and

    since the process must

    make

    a transition into some state,

    we have that

    i j O

    i = 0, 1,

    . .

    Let P denote the matrix

    of

    one-step transition probabilities P , so that

    P=

    P

     

    POI P

    02

    PIO P

    II

    P

    I2

    P

     O

    P,

    P

    ,2

    63

  • 8/17/2019 MCMC Sheldon Ross

    2/68

      64 MARKOV

    CHAINS

    EX MPLE 4.1. A) he M/G/1 Queue.

    Suppose

    that customers

    ar

    rive at a service center in accordance with a Poisson process with

    rate

    A

    There is

    a single server

    and

    those arrivals finding the server

    free go immediately into service, all others wait in line until

    their

    service

    turn

    The

    service times

    of

    successive customers

    are

    assumed

    to

    be independent random variables having a common distribution

    G; and they

    are

    also assumed

    to

    be independent

    of

    the arrival

    process.

    The above

    system

    is

    called

    the MIG/1 queueing

    system.

    The

    letter M stands for the fact that the interarrival distribution of

    customers is exponential, G for the service distribution, the

    number

    1

    indicates

    that there

    is a single server.

    c

    If

    we let X(t) denote the number of customers in the system at

    t

    then

    {X(t), t O}

    would not possess the

    Markovian

    property

    that

    the conditional distribution

    of

    the future depends only on the

    present

    and not on the past.

    For

    if we knew the number in the

    system

    at

    time

    t

    then,

    to

    predict future behavior, whereas we would

    not

    care

    how

    much time had elapsed since the last arrival (since

    the

    arrival process

    is

    memoryless), we would care

    how

    long

    the

    person in service

    had

    already been there (since the service distribu

    tion G is

    arbitrary and therefore not

    memoryless)

    As a means of getting around the above dilemma let us only

    look

    at

    the system

    at moments

    when customers

    depart That

    is, let

    Xn

    denote

    the number of customers left

    behind

    by the

    nth

    depar

    ture,

    n ; = 1 Also,

    let

    Y

    n

    denote the number of

    customers

    arriving

    during the service

    period of

    the

    n 1 st customer

    When

    Xn >

    0,

    the nth departure

    leaves

    behind

    Xn

    customers-of

    which one

    enters

    service

    and

    the other

    Xn

    -

    1

    wait in line.

    Hence,

    at

    the next

    departure

    the system will

    contain

    the

    Xn

    -

    1

    customers

    tha t were in line in

    addition to

    any arrivals during the service time

    of

    the

    n 1

    st customer Since a similar argument holds when

    Xn = 0, we see

    that

    ( 4.1.2)

    if

    Xn >

    0

    if

    Xn =

    O

    Since

    Y

    n

    , n

    1,

    represent the number of

    arrivals in nonoverla p

    ping service intervals, it follows, the arrival process

    being

    a Poisson

    process,

    that

    they

    are

    independent

    and

    f

    a:

    Ax)

    I

    4.1.3)

    P{Yn

    =

    j}

    =

    e-

    AX

    -.-

    dG(x),

    o

    J.

    j

    =

    0,1,

    . .

    From (4.1.2)

    and 41.3)

    it follows

    that {Xn n =

    1, 2, .

    .}

    is a

    Markov

    chain with transition probabilities given by

    POI = f' e-

    AX

    A ~ ) I dG(x), j; = 0

    o

    J

    f

    eo

    (Ax)r

    1+

    I

    P

     I

    = 0 e-

    AX

    ( j _ i 1) dG x),

    P

     I

    =

    0 otherwise

  • 8/17/2019 MCMC Sheldon Ross

    3/68

    INTRODUCfION AND EXAMPLES

    EX MPLE

    4.1(B) The G/M/l Queue.

    Suppose that customers ar

    rive

    at

    a single-server service center in accordance with an arbitrary

    renewal process having interarrival distribution G. Suppose further

    that the service distribution is exponential with rate

    p..

    I f

    we let XII denote the number

    of

    customers in the system as

    seen by the nth arrival, it is easy to see that the process {X ' n 2::

    I}

    is a Markov chain To compute the transition probabilities P

    for this Markov chain, let

    us

    first note that, as long as there are

    customers to be served, the number of services in any length of

    time t is a Poisson random variable with mean p.t This is true since

    the time between successive services is exponential and, as we

    know, this implies that the number of services thus constitutes a

    Poisson process. Therefore,

    f

    »

    e- I I

    (p::) dG t),

    o

    J

    j=O,I, ...

    ,i,

    which follows since if an arrival finds i in the system, then the next

    arrival will find

    i +

    1minus the number served, and the probability

    that j will be served is easily seen by conditioning on the time

    between the successive arrivals) to equal the right-hand side of

    the above

    The formula for

    P,o

    is little different it is the probability that

    at least

    i + 1 Poisson events occur in a random length of time

    having distribution G

    and

    thus is given by

    P = f' e-1'1 p.t)k dG(t)

    i

    2::

    O

    10 0 L., kl

    + I

    165

    Remark The reader should note that in the previous two examples

    we

    were

    able to discover an embedded Markov chain by looking at the process only

    at certain time points, and by choosing these time points so as to exploit the

    lack of memory of the exponential distribution This

    is

    often a fruitful approach

    for processes in which the exponential distribution is present

    EXAMPLE4.1(c) Sums of ndependent, Identically DistributedRan-

    dom Variables. The General

    Random

    Walk.

    et

    X

    i > 1, be

    independent and identically distributed with

    P{X,

    =

    j}

    =

    a

    J

    0, ::tl,

    If we let

    So

    0 and

    S

    2:

    X

    ,-I

    then {SlIt n > O} is a Markov chain for which

  • 8/17/2019 MCMC Sheldon Ross

    4/68

      66

    MARKOV

    CHAINS

    {Sn'

    n > O} is called the general random walk

    and

    will be studied

    in Chapter 7.

    ExAMPLE 4.1 D) he Absolute Value of he Simple Random Walk

    The random

    walk

    {Sn,

    n

    I}

    where

    Sn

    =

    X

    is said

    to

    be a

    simple random walk if for some

    p,

    0 < P < 1

    P{X, = I} = p

    P{X = - I} = q == 1 - p.

    Thus in

    the

    simple random walk

    the

    process always either goes up

    one

    step (with probability p)

    or

    down

    one

    step (with probability q .

    Now consider ISnl, the absolute value of the simple random walk.

    The process {ISnl, n I} measures at each time unit the absolute

    distance

    of

    the simple random walk from the origin. Somewhat

    surprisingly

    {ISn }

    is itself a Markov chain.

    To

    prove this we will first

    show that if Snl

    =

    i then no matter what its previous values the

    probability that

    Sn

    equals i (as opposed to

    - i

    is

    p'/(p' q

    ).

    PROPOSITION 4 1 1

    I f {Sn, n :?: 1} is a simple random walk, then

    Proof

    I f

    we let

    i 0

    = 0 and define

    j =

    max{k

    0

    s. k s. n. i

    k

    = O}.

    then, since we know the actual value

    of S

    it

    is

    clear that

    P{Sn =

    i IISnl = i.ISn -II

    =

    in _I ' ..

    IS, I

    = i

    I}

    =

    P{Sn

    =

    illSnl

    = i

    . . . . IS, II

    =

    i, IoIS,1

    =

    O}

    Now there are two possible values

    of

    the sequence

    S

    I

    , Sn

    for which IS,

    II

    =

    1,

    I

    ,

    ISnl

    =

    i

    The

    first

    of

    which results

    in Sn =

    i

    and has probability

    ..

    n -

    j n - j

    P 2 2 q 2

    2

    and the second results in Sn = - i and has probability

    n -, , n -, ,

    p q

    2

  • 8/17/2019 MCMC Sheldon Ross

    5/68

    CHAPMAN KOLMOGOROV EQUATIONS AND CLASSIFICATION OF STATES 167·

    Hence,

    n-I

    i n - j i

    - -  

    I p 2 2 q 2 2

    P{Sn = i ISnl = i, .

    ..

    ISII = il} = ~ n - I - + - : ' . - ; ' n - I - _ - . . ' ; ; ' - n - - - I -__

    I

    n ~ i +- .-

    p2

    2q2

    2+p2

    2 q 2

    2

    = pi

    pi +q

    and the proposition is proven.

    From Proposition

    4.1.1

    it follows upon conditioning on whether Sn = +i

    or

    i

    that

    _. _ .

    qr _ pr+1 qi+1

    + P{Sn+1 - - I l I

    S

    n - - I } r r - i ·

    p +q P +q

    Hence, {ISnl,

    n

    I} is a Markov chain with transition probabilities

    _ p,+1 qi+1 _

    Pi

    i I - r r -

    1 -

    P

    r

    r - I ,

    i

    >

    0

    p q

    4.2

    CHAPMAN KOLMOGOROV

    EQUATIONS

    AND

    CLASSIFICATION OF STATES

    We have already defined the one-step transition probabilities P

    il

    • We now

    define the ~ s t e p transition probabilities to be the probability that a process

    in state i will be in state j after n additional transitions. That is,

    n

    0,

    i j

    0.

    Of course P

    =

    P I The Chapman-KoLmogorov equations provide a method

    for computing these n-step transition probabilities. These equations are

    4.2.1)

    co

    pn+m

    =

    pn pm

    II

    L J

    Ik

    kl

    k O

    for all n m 0, all i,

    j,

  • 8/17/2019 MCMC Sheldon Ross

    6/68

      68

    M RKOV

    CH INS

    and are established by observing that

    pn+m = P{X =J IX =

    i}

    II

    n

    m

    0

    '

    = 2, P{Xn+m = j ,X

    n

    =

    klXo

    =

    i}

    k=O

    '

    = 2, P{Xn+m = j lX

    n

    =

    k.

    Xo =

    i}P{Xn

    =

    klXo

    =

    i}

    k=O

    '

    =

    2,

    P ; I P ~ k

    k=O

    I f we let p(n) denote the matrix of n-step transition probabilities

    P ~ I

    then

    Equation 4.2 1 asserts that

    where the dot represents matrix multiplication. Hence,

    P

    n)

    = P . P

    n

    -I = P . P . P

    n -

    2) = = P

    n

    and thus p(n) may be calculated by multiplying the matrix P by itself n times

    State j is said to be accessible from state i if for some n > 0, P ~ I

    >

    0. Two

    states

    i

    and

    j

    accessible to each other are said to

    communicate

    and

    we

    write

    i ++ j.

    PROPOS T ON 4 2 1

    Communication is an equivalence relation

    That

    is

    i) i i.

    0)

    if

    i

    j

    then

    j

    i

    iii) if i j and j k then

    i

    k.

    roof The first two parts follow tnvially from the definition

    of

    communication To

    prove iii), suppose

    that

    i

    j

    and

    j

    k.

    then there

    exists

    m n

    such

    that

    ~

    >

    0,

    P k

    >

    O.

    Hence.

    '

    P

    m

    n

    -

    '

    pmpn

    :>

    pmpn

    > 0

    k

    -

    L.J

    rr

    ,k

    -

     I Ik •

    ,=0

    Similarly, we may show there exists an

    s

    for which Pi > 0

  • 8/17/2019 MCMC Sheldon Ross

    7/68

    CHAPMAN-KOLMOGOROV EQUATIONS AND

    CLASSIFICATION

    OF

    STATES

    69

    Two states

    that communicate are

    said

    to

    be in the same

    ciass,

    and by

    Proposition 4.2 ], any two classes are either disjoint or identical We say that

    the Markov chain is

    irreducible

    if

    there

    is only

    one class-that

    is, if all states

    communicate with

    each other

    State

    i

    is said

    to

    have

    period d

    if

    =

    °

    henever

    n is not divisible by

    d

    and

    d

    is the

    greatest integer

    with this property.

    If = °

    or all

    n > 0, then

    define the period of i

    to

    be infinite) A state with period ] is said to be

    aperiodic

    Let

    d i) denote

    the period of i.

    We

    now

    show

    that periodicity is a

    class

    property

    PROPOS T ON 4 2 2

    If i ~ j, then d(i) = dO)

    Proof

    Let

    m

    and

    n

    be such that ~ P7 > 0, and suppose

    that P;

    > 0 Then

    pn j m

    >

    pn pm > 0

    J

    - I

    I

    pn j j m > pn

    P pm > 0

    II - I 'I

    where

    the

    second inequality follows, for instance, since the left-hand side represents

    the probability

    that

    starting in

    j

    the chain will be back in

    j after n s m

    transitions,

    whereas the right-hand side

    s

    the probability

    of

    the same

    event

    subject to

    the further

    restriction

    that

    the chain

    s

    in

    i both after

    nand

    n s

    transitions Hence,

    dO)

    divides

    both n m

    and

    n s m, thus n s m -  n

    m =

    s,

    whenever

    P; > O

    Therefore,

    dO)

    divides

    d(i)

    A similar

    argument

    yields

    that d(i)

    divides

    dO),

    thus

    d(i)

    =

    dO)

    For any states i and

    j

    define

    to

    be the probability that, starting in

    i

    the

    first transition into

    j

    occurs

    at

    time

    n

    Formally,

    t? =

    0,

    til

    =

    P{Xn

    =

    j, X

    k

    ;6 j, k

    = ],

    ,n

    - ]

    Xo =

    i}.

    Let

    Then

    t l denotes

    the probability of ever making a transition into state

    j,

    given

    that

    the process starts in

    i. (Note that

    for

    i =;6 j, t 1 s

    positive if, and only if,

    j

    s

    accessible from

    i.)

    State

    j

    is said

    to be

    recurrent

    if

    = ], and

    transient

    otherwise.

  • 8/17/2019 MCMC Sheldon Ross

    8/68

    17

    PROPOS T ON 4 2 3

    State] is recurrent if.

    and

    only if.

    .

    '

    pn = 00

    L

    I

    M ~ K O V

    CHAINS

    roof State] is recurrent if, with probability 1, a process starting at

    j

    will eventually

    return

    However, by

    the

    Markovian

    property

    it follows

    that

    the process pr

  • 8/17/2019 MCMC Sheldon Ross

    9/68

    CHAPMAN KOLMOGOROV

    EQUATIONS

    AND

    CLASSIFICATION OF

    STATES

    171

    orollary 4 2 4

    If i

    is

    recurrent and i

    ++ j

    then

    j is

    recurrent

    Proof Let m and n

    be

    such

    that

    P }

    >

    0, ~

    >

    0 Now for any s

    ~

    0

    pm n r:> p m P

    pn

    }/

    -

    J II 1/

    and thus

    pm n r

    2:

    p m p n p r = 00

    L J

    I

    1 L J It

    r

    and the result follows from Proposition 423

    EX MPLE

    4.2 A)

    he Simple Random Walk

    The

    Markov chain

    whose state space is the set of all integers and has transition proba

    bilities

    P _I =P

    = 1 -

    P,,-I

    i

    = 0,

    ::t:1

    ..

    ,

    where 0 < P < 1 is called the simple random walk One interpreta

    tion of this process is that it represents the wanderings of a drunken

    man as he walks along a straight line. Another is that it represents

    the winnings of a gambler who on each play of the game either

    wins or loses one dollar.

    Since all states clearly communicate it follows from Corollary

    4.2.4 that they are either all transient

    or

    all recurrent So let us

    consider state 0 and

    attempt

    to determine if ~ = I P

     

    is finite or in

    finite

    Since it is impossible to be even (using the gambling model

    interpretation) after an odd number of plays, we must, of course,

    have that

    P

    2 n I _ 0

    00 - ,

    n

    = 1,2,

    On the other hand, the gambler would be even after 2n trials

    if, and only if he won

    n

    of these and lost

    n of

    these As each play

    of

    the game results in a win with probability

    p

    and a loss with

    probability 1 -

    p,

    the desired probability

    is

    thus the binomial proba

    bility

    n

    =

    1 2 3

    . .

    By using an approximation, due to Stirling, which asserts that

  • 8/17/2019 MCMC Sheldon Ross

    10/68

      72

    MARKOV CHAINS

    where we say that

    a

    -

    b

    when l im '(a lb,,) = 1 we obtain

    P

    2 (4p(1 - p))

    00 -

    V;;;

    Now it

    is

    easy to verify that

    if

    a - b , then L" a <

    00,

    if, and

    only if

    L"

    b < 00. Hence

    L:=

    I

    P ~ o

    will converge

    if and

    only

    if

    f

    (4p(1

    -

    p))

    " " I

    V;;;

    ~ o e s .

    However, 4pQ - p)

    :5

    1 ,:ith equality

    ~ o l d i n g l i f

    and only

    If p

    = l.

    Hence, I

    P = 00 If

    and only If p

    = ?l.

    Thus, the

    chain

    is

    recurrent when

    p =

    and transient if

    p :;6

    When p = , the above process is called a symmetric random

    walk.

    We could also look

    at

    symmetric random walks in more than

    one

    dimension. For instance, in the two-dimensional symmetric

    random walk the process would,

    at each transition, either take one

    step to the left, nght, up, or down, each having probability 1

    Similarly,

    in

    three dimensions the process would, with probability

    t make a transition to any

    of

    the six adjacent points. By using the

    same method as in the one-dimensional random walk

    it

    can be

    shown that the two-dimensional symmetric random walk is recur

    rent, but all higher-dimensional random walks

    are

    transient.

    orollary 4 2 5

    I f i ++ j and j is recurrent, then I., = 1

    Proof Suppose Xo = i, and let n be such that P7,

    >

    0 Say that we miss opportunity

    1 if X ¥-

    j f

    we miss opportunity 1 then let

    T[

    denote the next time we enter i (T[

    is

    finite with probability 1 by Corollary 424 Say that we miss opportunity 2 if

    X T + ¥- j. I f opportunity 2 is nussed, let T2 denote the next time we enter

    i

    and say

    I

    that

    we miss

    opportunity

    3 if

    X

    T +" ¥-

    j,

    and so on.

    It is

    easy to see that the

    opportunity

    1

    number of the first success

    is

    a geometnc random vanable with mean

    lIP71'

    and

    is

    thus finite with probability

    1.

    The result follows since i being recurrent implies that

    the number

    of

    potential opportunities is infinite

    Let N, (t) denote the number

    of

    transitions into j by time

    t.

    f j is recurrent

    and Xo

    =

    j, then as the process probabilistically starts over upon transitions

    into j, it follows that

    {N/t), t

    2: O}

    is

    a renewal process with interarrival

    distribution

    {f7

    n

    2:

    1}. f Xo = i, i

    H

    j, and j is recurrent, then {N,(t), t 2: O}

    is a delayed renewal process with initial interamval distribution {f7 n 2: 1}.

  • 8/17/2019 MCMC Sheldon Ross

    11/68

  • 8/17/2019 MCMC Sheldon Ross

    12/68

      74

    MARKOV CHAINS

    PROPOS T ON

    4 3 2

    Positive null) recurrence

    is

    a class

    property

    A positive

    recurrent,

    aperiodic state

    is

    called ergodic

    Before

    presenting a theorem

    that

    shows how to

    obtain

    the limiting probabilities in

    the

    ergodic case, we need the

    fol.lowing definition

    efinition

    A probability distribution {PI j

    ~ } is

    said to be stationary for

    the

    Markov chain if

    .

    P

    = L

    P,P f j ~ O

    f the probability distribution

    of

    Xo-say P, = P{Xo = j}, j 2= O-is a

    stationary distribution, then

    '

    P{XI j} L P{XI

    jlX

    o

    i}P{Xo i}

    ,=0

    '

    =

    LP,P P,

    ,=0

    and, by induction,

    '

    4.3.1) P{Xn

    j}

    L P{Xn jlX

    n

    -

    1

    i}P{Xn_1 i}

    ,=0

    '

    =

    L P P, Pi

    ,=0

    Hence, if

    the

    initial probability dist ribution

    is the

    stationary distribution,

    then

    Xn will have the same distribution for all

    n.

    In fact, as {X

    n

    ,

    n

    > } is a Markov

    chain, t easily follows from this that for each m > 0, X

    n

    ,

    Xn

    +1

    ,

    Xn

    m

    will have the same joint distribution for each n in other words, {X

    n

    , n ~ }

    will be a sta tionary process.

  • 8/17/2019 MCMC Sheldon Ross

    13/68

    LIMIT

    THEOREMS

    75

    ;lEOREM 4 3 3

    An irreducible aperiodic Markov chain b e l o n g ~ to one of the following two

    c l s ~ e ~

    /

    i) Either the states

    are

    all transient or all null recurrent.

    in

    this

    case,

    P7

    1

    --

    0

    n

    --

    co for all

    i,

    j and there exists no wationary distribution

    ii) Or else, all states are positive recurrent, that is,

    =

    lim

    pn >

    0

    I II

    In t h i ~

    case,

    {TTI,j

    =

    0 1.2. } a stationary distribution and there exists no other

    stationary distribution

    Proof We will

    first prove

    ii)

    To begin, note that

    Letting n -- co yields

    implying that

    Now

    M

    '

    pn

    ;

    '

    pI

    = 1

    L ; I L ;

    j=O

    ' M

    for all M

    for all

    M.

    P7/

    1

    =

    L P7k

    P

    ki

    ~

    L P7kPkl

    for all

    M

    k O k O

    Letting

    n

    --

    co

    yields

    for all M

    implying that

    '

    l L

    TTk

    kl

    , ]

    2::

    0

    krO

  • 8/17/2019 MCMC Sheldon Ross

    14/68

      76

    MARKOV CHAINS

    To show that the above

    is

    actually an equality, suppose

    that

    the inequality

    is

    strict for

    some

    j

    Then

    upon adding these inequalities we obtain

    :

    l

    >

    : :

    TTkP

    kj

    =

    :

    k

    :

    P

    kl

    :

    TTb

    I ~ I I I ~ O k ~ O k ~ O I ~ O k ~ O

    which is a contradiction Therefore,

    '

    l : TTkP

    kj

    ,

    k-O

    j

    =

    0, 1,2,

    Putting

    PI =

    TT/I.;

    k

    , we see that {PI j = 0,

    1 2.

    } is a stationary distribution, and

    hence at least one stationary distribution exists Now let

    {PI

    j = 0, 1. 2,

    .}

    be any

    stationary distribution Then if {PI

    j

    0,

    1

    2, }

    is the

    probability

    distnbution

    of

    Xo

    then

    by

    431)

    '

    432)

    :

    {Xn = l

    o

    = i}P{Xu i}

    From 432) we see that

    M

    PI?

    :

    P7

    I

    P

    ,

    for all

    M.

    ,- 0

    Letting n and then

    M

    approach yields

    '

    433)

    PI ?

    :

    l P

    =

    l

    To

    go

    the

    other way

    and

    show that PI::;

    TTl

    use (4 3 2) and the fact

    that P7

    1

      ;

    1 to obtain

    M

    '

    PI::;

    :

    P7

    IP,

    +

    :

    P

    for all

    M.

    ~ I I

    r= Mt 1

    and letting n - gives

    M

    '

    PI

    S

    :

    TTIP, +

    :

    P

    forall

    M

    ;0

    , ; M I

  • 8/17/2019 MCMC Sheldon Ross

    15/68

    LIMIT THEOREMS

    Since

    ~

    P, ::=

    1

    we obtain upon letting

    M - 00

    that

    (434)

    PI ;

    L

    1

    PI

    =

    1

    1 0

    177

    If the states are transient or null recurrent and

    {PI

    j

    =

    0, 1

    2

    . .} is a stationary

    distribution, then Equations (4.3.2) hold and

    P ~ , -

    0, which is clearly impossible. Thus,

    for case

    (i),

    no stationary distribution exists and the proof is complete

    Remarks

    (1)

    When the situation

    is

    as described in part

    ii)

    of

    Theorem

    4.3.3

    we say

    that the Markov chain is

    ergodic.

    (2) It

    is

    quite intuitive that if the process

    is

    started with the limiting proba

    bilities, then the resultant Markov chain is stationary. For in this case

    the Markov chain at time

    °s

    equivalent to an independent Markov

    chain with the same

    P

    matnx at time

    00,

    Hence the original chain at

    time

    t

    is equivalent to the second one at time

    00

    +

    t =

    00, and is

    therefore sta tionary

    (3) In the irreducible, positive recurrent,

    periodic

    case we still have that

    the

    1TJ j 2: 0

    are the unique nonnegative solution

    of

    But now

    1T,

    must be interpreted as the long-run proportion

    of

    time that the

    Markov chain

    is

    in state

    j

    (see Problem 4.17). Thus,

    1T,

    = lllL

    lJ

     

    whereas

    the limiting probability

    of

    going from

    j to j

    in

    nd j)

    steps is, by (iv)

    of

    Theorem

    431,

    given by

    lim pn

    = L

    = d 1T

    n

    '

    JJ

    IL I

    /I

    where

    d is

    the period

    of

    the Markov chain'

    ExAMPLE 4.3 A)

    Limiting Probabilities/or the Embedded M G l

    Queue.

    Consider the embedded Markov chain of the MIG l sys-

  • 8/17/2019 MCMC Sheldon Ross

    16/68

      78

    MARKOV CHAINS

    tern as in Example 4.1(A) and let

    f

      (Ax)

    a,

    =

    e-:u-.,-dG(x).

    o J.

    That is a is

    the

    probability

    of

    j arrivals during a service period

    The transition probabilities for this chain are

    Po,

    =

    aj

    P,,=a,-i+I ;>0, j>i-l

    P j

    =

    0, j < ; - 1

    Let p

    =

    ja

    j

    Since

    p

    equals the mean number of arrivals during

    a service period, it follows, upon conditioning on the length of that

    period, i ha t

    p

    =

    \£[S],

    where S is a service time having distribution

    We shall now show

    that

    the Markov chain

    is

    positive recurrent

    when

    p

    < 1 by solving the system

    of

    equations

    These

    equations

    take the form

    ( 4.3.5)

    } '- I

    TT = TToa,

    +

    : TTia,_I->I,

    1= I

    To

    solve, we introduce the generating functions

    a:

    '

    TT S)

    =

    : TT,S ,

    A(s) =

    : ajs

    ,=0

    ,=0

    Multiplying both sides

    of

    (4.3.5) by s and summing over j yields

    a:

    ->

    1

    TT S)

    = TToA(s)

    + : : TT,a,_I+ls

    = O / ~ 1

    a: '

    = A(s) +

    S-I

    S a s r i 1

    o L J

    I

    L J , -1 1

    I =

    =1- 1

    =

    TToA(s)

    + (TT(S)

    - TTo)A(s)/s,

  • 8/17/2019 MCMC Sheldon Ross

    17/68

    L.IMIT

    TH OR MS

    or

    (

    )

    _

    (s

    - l)1ToA s)

    1T

    s - S - A s) .

    o

    compute

    To

    we let

    s

    - 1

    in the above. As

    co

    IimA s) = La

    l

    = 1,

    s_1 I ~ O

    this gives

    I

    . ( ) I'

    s -

    1

    1m 1T s = To 1m A(

    )

    s- s I

    S S

    = 1To 1

    -

    A (I ) t ,

    where the last equality follows from L hospital s rule. Now

    '

    A (I)

    = L

    ja

    t

    =

    p

    ,=0

    and thus

    lim

    1T(S) = ~

    I I 1 -

    P

    However, since lims_1

    1T(S) =

    ~ ~ , 0 1 T ; , this implies that ~ ~ = o 1 T t

    1To/ l

    -

    p);

    thus stationary probabilities exist if and only if p

    <

    1,

    and in this case,

    1To 1 - p = 1 -

    AE[S].

    Hence, when p < 1, or, equivalently, when E[S] <

    IIA,

    ( )

    _ (1 - AE[SJ) s - l)A s)

    1T s -

    S - A s)

    ExAMPLt:

    4.3( ) Limiting Probabllides for the Embedded

    GI

    MIl

    Queue.

    Consider the embedded Markov chain for the

    GIMII

    queueing system as presented in Example 4.I(B). The limiting

    probabilities

    1TA;

    k

    =

    0,

    1, . . .

    can

    be

    obtained as the unique solu

    tion

    of

    k 2 ::

    0,

    179

  • 8/17/2019 MCMC Sheldon Ross

    18/68

    180

    MARKOV CHAINS

    which in this case reduce to

    (4.36)

    _

    '

    J' -I (J,Lt) 1 k

    TT

    -   t-l TT, 0 i 1 _ k) dG(t),

    k 2:.1,

    (We ve not included the equation

    TTo

    = TT,P,o since

    one

    of the

    equations is always redundant.)

    To solve the above let us try a solution of the form TTl =

    cf3/t.

    Substitution into (4.3.6) leads

    to

    (4.3.7)

    or

    (4.3.8)

    The constant c can be obtained from TTl = 1, which implies that

    C

    =:: 1 -

    f3.

    Since the TTk are the uniqu solution to (4.3.6) and

    TTk

    1 - f3)f3k

    satisfies, it follows that

    k

    = 0, 1, ,

    where

    f3

    is

    the

    solution of Equation (4.3.8), (It

    can

    be shown that

    if the mean of G is greater than the mean service time 11J L then

    there is a unique value

    of

    f3 satisfying (4.3.8) that is between 0

    and

    1.) The exact value of f3 can usually only be obtained by

    numerical methods.

    EXAMPLE 4.3 c)

    The Age

    of

    a Renewal Process. Initially an item

    is

    put into use, and when it fails it

    is

    replaced

    at

    the beginning

    of

    the next time period by a new item Suppose that the lives of the

    items are independent and each will fail in its ith period of use

    with J?robability P i > 1, where the distribution {P }

    is

    aperiodic

    and

    iP, < 00

    Let

    Xn

    denote the age of the item in use

    at

    time

  • 8/17/2019 MCMC Sheldon Ross

    19/68

    LIMIT TH OR MS

    n tha t is, the number of periods (including the nth) it has been

    in use. Then if we let

    denote the probability that an unit old item fails, then

    {X n n :

    } is

    a

    Markov

    chain with transition probabilities given by

    PI I = A(i) = 1 - PI/+ 1> 2:: 1.

    Hence the limiting probabilities are such that

    (4.3.9)

    (4.3 10)

    Iterating (4.3.10) yields

    TT,

    I

    =

    TT, l - A i))

    2::

    1.

    = TT 1 1

    - A(i))(l -

    A i

    - 1))

    =

    TT

    I

     1

    A(l))(l -

    A(2)) . . 1

    - A(i))

    TTIP{X:>

    i

    I},

    where X is the life

    of

    an item Using TTl = 1 yields

    '

    1 = TTl 2: P{X 2::

    }

    I

    or

    TTl = l IE[X]

    and

    (43.11)

    TTl = P{X> i}IE[X],

    2:: 1,

    which

    is

    easily seen to satisfy (4.3.9).

    It

    is

    worth noting that (4 3 11) is as expected since the limiting

    distribution of age in the nonlattice case is the equilibr im distribu

    tion (see Section

    34 of

    Chapter 3) whose density is F x)IE[X]

    8

  • 8/17/2019 MCMC Sheldon Ross

    20/68

    182

    MARKOV CHAINS

    Our

    next two examples illustrate how

    the

    stationary probabilities can some

    times

    be

    determined not by algebraically solving the stationary equations but

    by reasoning directly that when the initial state is chosen according to a certain

    set

    of

    probabilities

    then

    the resulting chain

    is

    stationary

    EXAMPLE 4.3 0) Suppose that during each time period every mem

    ber

    of a population independently dies with probability

    p and

    also

    that

    the

    number

    of new members that join the population in each

    time period is a Poisson random variable with mean A. I f we let

    Xn denote the

    number

    of members of the population at the begin

    ning of

    period n, then

    it

    is

    easy

    to

    see

    that {X

    n

    ,

    n =

    1, . . .}

    is

    a

    Markov chain.

    To find the stationary probabilities

    of

    this chain suppose that

    X 0

    is

    distributed as a Poisson random variable with

    parameter

    0:.

    Since each of these

    Xo

    individuals will independently

    be

    alive

    at

    the beginning

    of

    the next period with probability 1 -

    p,

    it follows

    that the number of them that are still in the population at time 1

    is a Poisson random variable with mean 0: 1 -

    p)

    As

    the

    number

    of

    new members that join the population by time 1 is an independent

    Poisson

    random

    variable with

    mean

    A it thus follows that XI is a

    Poisson

    random

    variable with

    mean

    0: 1 - p) + A. Hence if

    0: =

    0: 1 -

    p) + A

    then

    the chain would be stationary Hence by the uniqueness of

    the stationary distribution

    we

    can conclude

    that

    the stationary

    distribution

    is

    Poisson with mean

    Alp. That

    is

    j = 0 1,

    . . .

    EXAMPLE 4.3 E) The

    Gibbs

    Sampler. Let p(x.. . x

    n

    ) be

    the joint

    probability mass function of the random vector XI, , X

    n

    • In

    cases where it is difficult

    to

    directly generate the values

    of

    such a

    random vector

    but

    where it

    is

    relatively easy

    to

    generate for each

    i, a random variable having the conditional distribution of X, given

    all of the

    other XI j ;tf i,

    we can generate a random vector whose

    probability mass function

    is

    approximately

    p(x

    l

     .

    ,

    x

    n

    )

    by using

    the Gibbs

    samrler.

    I t works as follows.

    Let

    X 0 = x I • be any vector for which p X?2 . . . x?) > 0

    Then

    generate a

    random

    variable whose distribution is the condi

    tional distribution

    of XI

    given

    that

    =

    x ~ ,

    j =

    2 . n, and

    call

    its value x 1

    Then

    generate a random variable whose distribution

    is

    the condi

    tional distribution of X

    2

    given

    that

    XI = x:, = x ~ ,

    j

    = 3 .

    n, and call its value x

    Then

    continue in this fashion until you have

    generated

    a random

    variable whose distribution

    is

    the conditional distribution

    of Xn

    given that XI = x:

    j

    = 1 n - 1, and call its value

    x ~ .

  • 8/17/2019 MCMC Sheldon Ross

    21/68

    LIMIT THEOREMS

    Let X I =

    X:,

    ..

    ,

    x and repeat the process, this time starting

    with X

    I in place of X 0, to obtain the new vector X 2, and so on.

    It

    is

    easy to see that the seq uence of vectors X}, j 0

    is

    a Markov

    chain and the claim is that its stationary probabilities are given by

    P(XI,

    ,

    XII)

    To verify the claim, suppose that

    XO

    has probability mass func-

    tion

    P(XI . , xn)

    Then it

    is

    easy to see that at any point in this

    I

    . h h } }} I

    r

    I II b h I

    a gont m t e vector

    x I,

    • • •

    , X _ I , X , X

    n

    WI

    e t e va ue

    of a random variable with mass functionp x

    l

    ,

    • ,xn)

    For instance,

    letting X be the random variable that takes on the

    val ue

    denoted

    by x; then

    P{X: = x h X ~ = x J j = 2 ,

    ,n}

    =

    P{X:

    =

    I I X ~

    = x},j = 2, ,n}P{XY =

    x},j

    = 2

    ,n}

    =

    P{X

    I

    =

    xliX}

    =

    x},j

    =

    2, ,n}P{X}

    = x},j =

    2, n}

    =P(XI, .,xn)·

    Thus

    P(XI, ,

    xn)

    is

    a stationary probability distribution and

    so, provided that the Markov chain

    is

    irreducible and aperiodic,

    we can conclude that it is the limiting probability vector for the

    Gibbs sampler. It also follows from the preceding that P(XI, ,

    xn) would be the limiting probability vector even

    if

    the Gibbs

    sampler were not systematic in first changing the value of XI then

    X

    2

    , and so on. Indeed, even if the component whose value was to

    be changed was always randomly determined, then

    P(XI

    ,x

    n

    )

    would remain a stationary distribution, and would thus be the

    limiting probability mass function provided that the resulting chain

    is aperiodic

    and

    irreducible.

    83

    Now, consider an irreducible, positive recurrent Markov chain with station

    ary probabilities,

    1T}

    j O-that is, T} is the long-run proportion of transitions

    that are into state

    j.

    Consider a given state of this chain, say state

    0

    and let

    N denote the number of transitions between successive visits to state

    O

    Since

    visits to state 0 constitute renewals it follows from Theorem 3.3.5 that the

    number of visits by time n is, for large n, approximately normally distributed

    with mean

    n

    E[N] = n T

    o

    and variance nVar N)/ E [N])3 = n V a r N ) 1 T ~ . It

    remains to determine Var N)

    = E

    [N

    2

    ]

    - 1 I 1 T ~ .

    To derive an expression for

    E

    [N2],

    let

    us

    first determine the average number

    of

    transitions until the Markov chain next enters state

    O

    That is let Tn denote

    the number

    of

    transitions from time n onward until the Markov chain enters

    . .

    TI

    + T . . + Til . .

    state 0, and conSider 11m . By Imagmmg that

    we

    receive a

    n- iXI

    reward at any time that is equal to the number of transitions from that time

    onward until the next visit to state

    0 we

    obtain a renewal reward process in

    which a new cycle begins each time a transition into state 0 occurs, and for

  • 8/17/2019 MCMC Sheldon Ross

    22/68

      84

    MARKOV CHAINS

    which the average reward per unit time is

    Long-Run Average Reward Per Unit Time

    I

      T\

    +

    T2

    + . . . +

    Tn

    1m

    .

    cc

    n

    By the theory

    of

    renewal reward processes this long-run average reward

    per

    unit time

    is

    equal to the expected reward earned during a cycle divided by

    the expected time

    of

    a cycle.

    But

    if N is the number of transitions between

    successive visits into state 0, then

    Thus,

    (4312)

    E [Reward Earned during a Cycle] = E

    [N

    + N - 1 + . . . +

    1]

    E{Timeofa

    Cycle]

    = E[N].

    Average Reward Per Unit Time

    =

    E N ~ ; ] 1 / 2 ]

    _ E[N

    2

    ] + E{N]

    E[N]

    However, since the average reward

    is

    just the average number

    of

    transitions

    it

    takes the Markov chain to make a transition into state

    0,

    and since the

    proportion of time that the chain

    is

    in state i

    is

    1T

    it

    follows that

    4.3

    13

    Average Reward Per Unit Time

    = 2: 1T /L o

    where /L ,0 denotes the mean number of transitions until the chain enters state

    o

    given that it is presently in state

    i

    By equating the two expressions for the

    average reward given by Equations (4312)

    and

    4.3.13), and using that

    E{N]

    l/1To, we

    obtain that

    or

    43.14)

    1ToE[N2]

    +

    1 = 22:

    T

     

    /L o

    I

    2 1

    = -

      ' T

    -

     J , r IO

    1To '-0 1T0

    where the final equation used that

    Loo = E{N] =

    1/1T

     

    • The values /L,O can

    be obtained

    by

    solving the following set of linear equations obtained by

    conditioning on the next state visited).

    /L,O

    =

    1 +

    2: p }/L}

    0,

    i

    >

    1 0

  • 8/17/2019 MCMC Sheldon Ross

    23/68

    TRANSITIONS

    AMONG

    CLASSES,

    THE GAMBLER S

    RUIN

    PROBLEM

    ExAMPI.E 4.3 F) Consider the two·state Markov chain with

    For

    this chain,

    P

    OO

    a 1 -

    POI

    P

     O

    =

    fj

    =

    1 -

    PII

    I a

    1 - a

    fj

    1T

    I I - a f j

    ILIO lIfj.

    Hence, from 4.3.14),

    £[N

    2

    ]

    21TIILI0/1T0

    + I/1To = 2 1 - a)/fj2 + 1 - a + fj)/fj

    and so,

    Var N) = 2 1 - a)/fj2 + 1 - a + fj)/fj -  1 - a + fj)2/fj2

    1 - fj afj -  

    2

    )/fj2.

    Hence, for n large, the number of transitions into state 0 by time

    n

    is approximately normal with mean mTo =

    nfj/ 1 - a

    fj) and

    vanance m T ~ V a r N )

    nfj 1 -

    fj + afj

    -  

    2

    )/ 1 - a

    + fj) . For

    instance, if a

    =

    fj = 1/2, then the number

    of

    visits to state 0 by

    time n is for large n approximately normal with mean n 2 and

    variance n/4.

    4 4 TRANSITIONS AMONG CLASSES, THE

    GAMBLER S RUIN PROBLEM, AND

    MEAN

    TIMES IN

    TRANSIENT STATES

    85·

    We begin this section by showing that a recurrent class is a closed class in the

    sense that once entered t

    is

    never left.

    PROPOSITION 4 4 1

    Let

    R

    be a recurrent c1ass of states.

    f

    i E R j e R then

    P

    O

    Proof Suppose

    P

    > O Then, as

    i

    and

    j do

    not communicate since

    j e

    R). P;,

    =

    0

    for

    all

    n Hence if the process starts in state

    i,

    there

    is

    a positive probability of at least

    P

    that the process will never return to i This contradicts the fact that

    i

    is recurrent,

    and so PI

    O

  • 8/17/2019 MCMC Sheldon Ross

    24/68

    186

    M RKOV

    CH INS

    Let

    j

    be a given recurrent state and let T denote the set of all transient

    states. For

    i

    E

    T,

    we are often interested

    in

    computing

    /,J'

    the probability of

    ever entering

    j

    given that the process starts in

    i

    The following proposition,

    by conditioning on the state after the initial transition, yields a set of equations

    satisfied by the / ,

    PROPOSrrlO 4 4 2

    I f is

    recurrent, then the set of probabilities {fr i E T} satisfies

    where

    R

    denotes the set of states communicating with j

    Proof

    fr

    =

    P{NJ(oo) > 0IX

    o

    i}

    = : P{N, oo) > 0lx

    o

    =

    i

    XI =

    k}P{XI

    = klxo= i}

    .11k

    where we have used Corollary 425

    in

    asserting that

    h,

    1 for

    k

    E

    R

    and Proposition

    441 in

    asserting that

    h,

    =

    °

    or

    k

    f£ T,

    k f£

    R.

    EX MPLE

    4.4 A) The Gamblers Ruin Problem.

    Consider a gam

    bIer who at each play

    of

    the game has probability p of winning 1

    unit and probability

    q =

    1 -

    P of

    losing 1 unit. Assuming successive

    plays of the game are independent, what is the probability that,

    starting with i units, the gambIer s fortune will reach

    N

    before

    reaching

    °

    f

    we

    let

    n

    denote the player s fortune at time

    n

    then the process

    {X

    n

     

    n =

    0,

    1

    2 .}

    is a Markov chain with transition probabilities

    P

     

    =P

    NN

    =I

    Pi

    i

    + 1 =

    P

    =

    1

    PI iI

    i

    =

    1,2,

    N 1.

    This Markov chain has three classes, namely,

    {O}

    {I, 2 ,

    N I}

    and

    {N}

    the first and third class being recurrent and the

    second transient. Since each transient state is only visited finitely

  • 8/17/2019 MCMC Sheldon Ross

    25/68

    TRANSITIONS

    AMONG

    CLASSES,

    THE GAMBLER S

    RUIN PROBLEM

    often, it follows that, after some finite amount

    of

    time, the gambler

    will either attain her goal of or go broke.

    Let f

    ==

    f N denote the probability that, starting with i 0 :s;

    i

  • 8/17/2019 MCMC Sheldon Ross

    26/68

  • 8/17/2019 MCMC Sheldon Ross

    27/68

    TRANSITIONS AMONG CLASSES, THe GAMBLER S RUIN PROBLEM

    89

    Consider now a finite state Markov chain and suppose that the states are

    numbered so that

    T

    =

    {1 2 , t}

    denotes the set of transient states Let

    PI ]

    P

    P

    II

    and note that since

    Q

    specifies only the transition probabil ities from transient

    states into transient states, some

    of

    its row sums are less than 1 (for otherwise,

    T

    would be a closed class of states)

    For transient states i and j let m i l denote the expected total number of

    time periods spent

    in

    state j given that the chain starts in state i Conditioning

    on the initial transition yields

    (44,1 )

    m i l

    = 8 ;,j) L P k m

    kl

    k

    I

    = 8 ;,j) L P k m

    kl

    where 8(;, j)

    is

    equal to 1 when

    i = j

    and

    is

    0 otherwise, and where the final

    equality follows from the fact that

    m

    kl

    = 0 when k is a recurrent state

    Let

    M

    denote the matrix

    of

    values

    mil i, j = 1 ,t ,

    that

    is

    In matrix notation, (4.41) can be written as

    M

    =

    1 Q

    where 1 is the identity matrix of size

    t

    As the preceding equation is equiva

    lent to

    / Q)M

    =

    1

    we obtain, upon mUltiplying both sides by I -

    Qtl

    that

    That is the quantities mil ieT jeT can be obtained by inverting the matrix

    1 -

    Q

    (The existence of the inverse is easily established)

  • 8/17/2019 MCMC Sheldon Ross

    28/68

  • 8/17/2019 MCMC Sheldon Ross

    29/68

    BRANCHING PROCESSES

    As a check

    note that 13 4

    is just the probabi lity starting with 3 of

    visiting 4 before 0 and thus

    13 4

    =

    =

    =

    38/65

    =

    .5846.

    4 5

    BRANCHING

    PROCESSES

    9

    Consider a population consisting of individuals able to produce offspring of

    the same kind Suppose

    that

    each individual

    will,

    by

    the

    end of its lifetime

    have produced j

    new

    offspring with probability P j 0 independently of

    the number produced by any other individual. The

    number

    of individuals

    initially present

    denoted

    by

    X

    o

     

    is

    called the

    size

    of the

    zeroth generation.

    All offspring

    of

    the

    zeroth

    generation constitute

    the

    first generation

    and

    their

    number

    is

    denoted

    by

    Xl

    In

    general, let

    Xn

    denote the

    size

    of

    the

    nth

    genera-

    tion. The Markov chain {

    n

     

    n

    } is

    called

    a

    branching process.

    Suppose that Xo =

    1.

    We can calculate the mean of Xn by noting that

    X

    n

    _

    1

    Xn

    =

    L Z

    po:;

    1

    where Z represents the number

    of

    offspring

    of

    the

    ith

    individual of

    the

    n

    l)st generation Conditioning on

    X

    n

    - I

    yields

    E [Xn1

    =

    E [E [XnIX

    n

      .]]

    =

    JL

    [Xn .1

    = L

    2

    E

    [

    n

    -

    2

    1

    where L is the mean number of offspring

    per

    individual.

    Let 1To denote

    the

    probability that starting with a

    single

    individual

    the

    population ever dies out

    An equation

    determining 1To may

    be

    derived by conditioning

    on

    the

    number

    of

    offspring of

    the

    initial individual as

    follows.

    1To

    =

    P{population dies out}

    .

    = L P{population dies outl Xl = j}P

    =0

    Now given that Xl = j, the population will eventually die out if and

    only

    if

    each of the j families started by the members of the first generation eventually

    die out. Since each family is assumed to act independently

    and

    since

    the

  • 8/17/2019 MCMC Sheldon Ross

    30/68

  • 8/17/2019 MCMC Sheldon Ross

    31/68

  • 8/17/2019 MCMC Sheldon Ross

    32/68

      94

    Consider a Markov chain for which PI

    I

    = 1 and

    1

    p J=-

    1

    1-

    j= I ,

    . . .

    i-l i > l ,

    MARKOV CHAINS

    and let T denote the number of transitions to go from state

    to

    state 1. A

    recursive formula for

    E{T;]

    can be obtained by conditioning

    on

    the initial tran-

    sition:

    4.6.1)

    1 -1

    E[T,] = 1

    i-I

    E[TJ

    Starting with E [TI] = 0,

    we

    successively see that

    E{T2]

    =

    1

    E{T ]

    = 1 l

    E{T4]

    = 1 +1 1 + 1 +i) = 1 +i+1,

    and it is not difficult to guess and then prove inductively that

    -1 1

    E[T,] =

    2: :.

    J=

    I

    J

    However,

    to

    obtain a more complete description of TN we

    will

    use the

    representation

    where

    I = {I

    J

    0

    N- l

    TN = : I

    j

    ,

    j=

    I

    if the process ever enters j

    otherwise.

    The importance

    of

    the above representation stems from the following.

    emma

    4 6 1

    f., •

    f

    N

    -

    1

    are independent and

    P{f

    J

    = l} = 1/j,

    l:=:;;j:=:;;N l

  • 8/17/2019 MCMC Sheldon Ross

    33/68

    APPLICATIONS OF MARKOV CHAINS

    195

    proof

    Given ,+1>

    , N,

    let

    n =

    min{i i>

    j. =

    I}

    Then

    P{ ,=

    11 ,- -1

    , } =

    lI n

    - 1 =

    , N

    j / n - I )

    j

    PROPOS T ON 4.6.2

    N I

    1

    i)

    £[TNJ =

    2:

    7

    1

    ]

    N-1I 1)

    (ii) Var TN) = 2:

    -:

    1 - -:

    1

    ] ]

    (iii)

    For

    N

    large.

    TN

    has

    approximately

    a Poisson

    distribution

    with

    mean

    log

    N

    Proof Parts

    (i) and (ii) follow from Lemma 46

    1

    and the representation TN

    2 : , ~ 1 1

    ,.

    Since the sum of a large

    number of

    independent Bernoulli random variables.

    each having a small probability of being nonzero, is approximately Poisson distributed,

    part (iii) follows since

    or

    and so

    f

    NdX

    ~

    1 fN-1 dx

    -

    X,- -I

    then we say that the runs are

    the segments between pairs of lines For example, the partial sequence 3, 5,

    8, 2, 4, 3, 1 contains four runs as indicated

    13, 5,

    812 41311.

    Thus each run is an increasing segment of

    the

    sequence

  • 8/17/2019 MCMC Sheldon Ross

    34/68

    196

    M

    RKOV CH I NS

    Suppose now that XI. X

    2

      . are independent and identically distributed

    uniform 0, 1) random variables, and suppose we are interested in the distribu_

    tion of the length of the successive runs

    For

    instance, if we let L

    I

    denote the

    length

    of

    the initial run,

    then

    as

    L

    I will be at least

    m

    if, and only if, the first

    m

    values are in increasing order. we see that

    1

    P { L I ~ m } = -

    m.

    m

    =

    1.2 .

    The

    distribution of a later run can be easily obtained if we know x. the initial

    value in the run. For if a run starts with x, then

    (4.62)

    1

    m-I

    P{L>mlx}=

    x

    m -

    1)'

    since in order for the run length to be at least m, the next m -

    1

    values must

    all be greater than

    x

    and they must be in increasing order.

    To obtain

    the

    unconditional distribution of the length

    of

    a given run, let

    n denote the initial value of

    the

    nth run. Now it is easy to see that

    {In.

    n ~ I}

    is

    a Markov chain having a continuous state space

    To

    compute p Ylx), the

    probability density that

    the

    next run begins with the value y given that a run

    has just begun with initial value x. reason as follows·

    co

    P { I ~ I

    E

    y,y

    +

    dY)l/n = x} =

    L

    P{ln 1

    E

    Y.y

    +

    dy). Ln =

    ml/

    n

    = x}.

    m 1

    where

    Ln is

    the length

    of

    the nth run. Now the run will

    be

    of length

    m

    and

    the next one will start with value

    y

    if·

    (i) the next m -

    1

    values are in increasing

    order

    and are all greater thanx;

    (ii)

    the mth

    value must equal y

    (iii) the maximum

    of

    the first

    m

    - 1 values must exceed y.

    Hence

    P{ln I

    E y, Y + dy), Ln =

    ml/

    n

    = x}

    _ 1_x)m-1

    - (m- l ) dyP{max X

    1

    ,.

    ,X

    m

    _

    I

    »y IX ,>x , i= I •. . . ,m - l }

    1

    -

    x)m-I

    m

    -1 )

    dy

    ify<

    x

    =

    l-x)m-1 [ y_x)m-I]

    m -

    1)'

    dy

    1 - 1 -

    x

    if Y

    > x.

  • 8/17/2019 MCMC Sheldon Ross

    35/68

    APPLICATIONS OF MARKOV CHAINS

    summing

    over

    m

    yields

    {

    I x

    p ylx)

    =

    e

    l

    _

    x

    Y .t

    e e

    ify

    x

    97

    That is.

    {In n I}

    is a Markov chain having

    the

    continuous state space 0. 1)

    and a transition probability density

    P

    ylx) given by

    the

    above.

    To

    obtain the limiting distnbution

    of

    In we will first hazard a guess and

    then venfy

    our

    guess

    by

    using the analog

    of Theorem 4.3.3.

    Now

    II

    being

    the initial value ofthe first run, is uniformly distributed

    over

    0, 1). However,

    the later runs begin whenever a value smaller than the previous one occurs.

    So

    it seems plausible

    that

    the long-run proportion

    of

    such values

    that

    are less

    than

    y

    would equal

    the

    probability

    that

    a uniform 0, 1) random variable is

    less

    than

    y given

    that

    it is smaller

    than

    a second, and independent, uniform

    0, 1)

    random vanable. Since

    it seems plausible

    that

    17 (

    y , the

    limiting density of In

    is

    given by

    1T(Y) = 2 1 y), O

  • 8/17/2019 MCMC Sheldon Ross

    36/68

      98

    MARKOV CHAINS

    which

    is

    easily shown upon application of the identity

    Thus we have shown that the limiting density

    of

    In

    the initial value of the

    nth

    run,

    is 1T(X) =

    2 1 -

    x),

    0 <

    x

    <

    l

    Hence the limiting distribution

    of

    Ln,

    the length

    of

    the

    nth

    run,

    is

    given by

    4.6.3)

    . > _ J (1 - x)m-I

    ~

    P{Ln-m}

    - 0

    m -1)

    2 1-x)dx

    2

    m +

    1) m -

    1)

    To

    compute the average length of a run note from 4.6.2) that

    E[LII= xl =

    i ~ ( 1

    ___~ m _ - 1

    m=1

    m -

    1)

    and so

    =

    2

    The above could also have been computed from 4.6.3) as follows:

    . ' 1

    E[Lnl =

    2

    m2;1

    m + 1) m - 1)

    yielding the interesting identity

    '

    1

    1

    =

    ];

    m

    +

    1) m

    -1)

    4.6.3

    List Ordering Rules Optimality

    of

    the

    Transposition Rule

    Suppose that we are given a set

    of n

    elements e

    l

    , •

    ,en that are to

    be

    arranged

    in some order. At each unit of time a request

    is

    made

    to

    retrieve one of these

  • 8/17/2019 MCMC Sheldon Ross

    37/68

    APPLICATIONS

    OF

    MARKOV CHAINS

    199

    elements e

    ,

    being requested (independently of the past) with probability PI

    P, 0, PI = 1 The problem of interest is to determine the optimal ordering

    so as to minimize the long-run average position of the element requested.

    Oearly if the

    P,

    were known, the optimal ordering would simply

    be

    to order

    the elements in decreasing order of the P,'S. In fact, even if the PI'S were

    unknown

    we

    could do as

    weJl

    asymptotically by ordering the elements at each

    unit of time in decreasing order of the number of previous requests for them

    However, the problem becomes more interesting if we do not allow such

    memory storage as would be necessary for the above rule, but rather restrict

    ourselves to reordering rules in which the reordered permutation of elements

    at any time

    is

    only allowed to depend on the present ordering and the position

    of the element requested

    For_ a gi {en reqrderi 1g rule, the average position of the element requested

    can

    be

    obtained, at least

    in

    theory, by analyzing the Markov chain of

    n

    states

    where the state at any time

    is

    the ordering at that time. However, for such a

    large number of states, the analysis quickly becomes intractable and so we

    shall simplify the problem by assuming that the probabilities satisfy

    I p

    P

    2

    =

    . . .

    =

    P

    n

    = 1

    = q.

    For such probabilities, since all the elements 2 through

    n

    are identical in the

    sense that they have the same probability of being requested, we can obtain

    the average position of the element requested by analyzing the much simpler

    Markov chain of n states with the state being the position of element e

    t

    We

    w ll now show that for such probabilities and among a wide class of rules the

    transposition rule, which always moves the requested element one closer to

    the front of the line, is optimal.

    Consider the following restricted class

    of

    rules that, when an element is

    requested and found in position

    i

    move the element to position

    j,

    and leave

    the rei ative positions of the other elements unchanged. In addition, we suppose

    that i

    <

    i for

    i >

    1, it

    =

    1, and i

    ; i,-t, i ; 2, ..

    , n. The set {fl

    i =

    1, ,

    n}

    characterizes a rule in this class

    For a given rule in the above class, let

    K(i) = max{l.it+1 < f}.

    In other words, for any i, an element in any of the positions i, i 1, ,

    i

    K(i)

    will, if requested, be moved to a position less than or equal to i.

    For

    a specified rule R in the above class say the one having K(i) = k(i),

    i 1, , n Iet

    us

    denote the stationary probabilities when this rule is

    employed by

    'IT,

    =

    P ,{e

    l

    is in position f},

    i

    ; 1.

  • 8/17/2019 MCMC Sheldon Ross

    38/68

    2

    MARKOV CHAINS

    In addition, let

    n

    0 , = 2: / = P ,{el is in a position greater than I},

    i:>

    0

    / ;1

    1

    with the notation P signifying that the above are limiting probabilities. Before

    writing down the steady-state equations, it may be worth noting the following

    (I) Any element moves toward the back of the list at most

    one

    position

    at a time.

    ii)

    I f

    an element

    is

    in position i and neither it nor any of the elements

    in the following k(i) positions are requested, it will remain in position

    i.

    iii) Any element in one of the positions i, i

    +

    1, , i

    + k

    (i) will be

    moved to a position

  • 8/17/2019 MCMC Sheldon Ross

    39/68

    APPLICATIONS

    OF MARKOV

    CHAINS

    2 1

    unplying

    Summing the above equations from j = 1, . . , , r yields

    n

    -   -  n -   )

    [ 2

    + . , . + (q) ]

    + ,

    , - , , - 1

    p

    Letting

    r

    =

    k(i),

    where

    k(i)

    is the value of

    K(i)

    for a given

    rul R

    in our

    class, we see

    that

    or, equivalently,

    4.6.5)

    n = b,n _1

    +

    1 - b,)n,+k(t)

    i = l

    ..

    n

    1,

    =

    0,

    where

    b = (qlp)

    + . , . +

    (qlp)k( )

    , 1

    +

    (qlp)

    + . , . +

    (qlpl( l

    i = l . . . n-l

    We may now prove the following.

    PROPOS T ON

    4 6 3

    If

    p

    ;:: lin

    then , , for all

    i

    If p

    lin.

    then , , for all i

    roof Consider the case p

    lin

    which

    is

    equivalent to p;:: q, and note that in this case

    1 1

    a=l- >

    =b

    , 1

    + (k(i)lp)q

    - 1

    + qlp + + (qlp)lrlll

  • 8/17/2019 MCMC Sheldon Ross

    40/68

    2 2

    MARKOV CHAINS

    Now define a Markov chain with states

    O. 1.

    n and

    transition probabilities

    466)

    P

     

    =

    {

    c

    1 -

    c,

    i f j= i - l .

    ifj =

    + k(i).

    i = 1,

    ,n - 1

    Let f denote the probability that this Markov chain ever enters state 0 given that it

    starts

    in state i Then f satisfies

    f,

    = C,f,-I

    +

    1

    - c,)f,

    f k l ) .

    =

    1. ,n -

    1.

    fo =

    1,

    Hence, as it can be shown that the above set of equations has a unique solution. it

    follows from

    464)

    that

    if

    we

    take

    c,

    equal

    to

    for

    all

    i,

    then

    f,

    will

    equal the

    IT,

    of

    rule R, and from 465)

    if

    we

    let c

    ,

    = b

    then

    f

    equals TI

    Now

    it

    is

    intuitively clear

    and we defer a formal proof until

    Chapter

    8) that the probability that the Markov

    chain defined by 466) will

    ever

    enter 0

    is

    an increasing function of the vector

    f

    =

    c

    1

    • • Cn_ l Hence. since a

    ; b

    i

    = 1.

    .

    n we see that

    IT,;:::

    n

    for all i

    When

    p :s; lin,

    then

    a

     

    ::s;

    b

    i

    = 1,

    . n -

    1.

    and the above inequality

    is

    reversed

    TH OR M 4 6 4

    Among the rules considered the limiting expected position

    of

    the element requested is

    minimized

    by

    the transposition rule

    Proof

    Letting X denote

    the position of

    e

    l

    • we have upon conditioning

    on

    whether

    or not

    e

    l

    is

    requested that the expected position

    of

    the requested element can be

    expressed

    as

    E

     ' ] [ ] )

    E[1

    + 2 + + n - X]

    LPosltlon

    = p

    X

    +

    1 - P

    n

    _ 1

    =

    (p

    _

    1 - p)

    E[X]

    + 1 p)n(n + 1

    n - 1 2 n - 1

    Thus. if

    p

    ;::: lin. the expected position

    is

    minimized by minimizing E[X] and if

    p

    lin. by maximizing

    E[X]

    Since

    E[X]

    = 2 ; ~ 0 PiX > it, the result follows from

    Proposition 46 3

  • 8/17/2019 MCMC Sheldon Ross

    41/68

    TIME_REVERSIBLE

    MARKOV CHAINS

    2 3

    4.7

    TIME REVERSIBLE MARKOV

    CHAINS

    An irreducible positive recurrent Markov chain is stationary if the initial state

    is chosen according to the stationary probabilities. In the case of an ergodic

    chain

    this

    is

    equivalent to imagining that the process begins at time

    t

    = -00.

    We say that such a chain

    is

    in steady state.

    Consider now a stationary Markov chain having transition probabilities p J

    and stationary probabilities 1T,. and suppose that starting at some time we

    trace the sequence of states going backwards in time. That

    is

    starting at time

    n consider the sequence of states X

    n

    •Xn -I

    . ..

    It turns out that this sequence

    of states

    is

    itself a Markov chain with transition probabilities

    ~

    defined by

    ~ P{Xm = jl

    m

     

    1

    =

    i}

    _

    P{Xm+1

    = l

    m

    =

    j}P{Xm

    = j}

    -

    P{Xm+1

    =

    i}

    To prove that the reversed process is indeed a Markov chain we need to

    verify that

    To see that the preceding

    is

    true, think of the present time

    as

    being time

    m

    1

    Then, since

    X

    n

    ,

    n

    ::>

    1

    is

    a Markov chain it follows that given the

    present state Xm+1 the past state

    Xm

    and the future states

    X

    m

     

    2

    • X

    m

     

    3

    ,

    are independent. But this is exactly what the preceding equation states.

    Thus the reversed process is also a Markov chain with transition probabili-

    ties given

    by

    1T,P

    P

     

    / - - -

    1T

    f ~

    = p J

    for

    all i

    j then the Markov chain is said

    to

    be

    time reversible.

    The condition for time reversibility, namely, that

    4.7.1)

    for

    all i.

    j

    can

    be

    interpreted as stating that, for

    all

    states

    i

    and

    j

    the rate at which the

    process goes from i to

    j

    namely,

    1T,P J) is

    equal to the rate at which it goes

    from

    j to

    i namely, 1T,P,,).

    t

    should be noted that this is an obvious necessary

    condition for time reversibility since a transition from i to j going backward

  • 8/17/2019 MCMC Sheldon Ross

    42/68

    204

    MARKOV CHAINS

    in

    time is equivalent to a transition from

    j

    to i going forward

    in

    time; that

    is

    if

    Xm = i

    and

    Xm I =

    j then a transition from

    i

    to

    j

    is observed if

    we

    looking backward in time and one from

    j to

    i if we are looking forward in time

    If

    we

    can find nonnegative numbers, summing to 1, which satisfy 4.71)

    then it follows that the Markov chain

    is

    time reversible and the n u m e ~

    represent the stationary probabilities. This

    is

    so since if -

      47.2)

    for all

    i,

    j

    2: X

    t

    1

    then summing over i yields

    2: Xl = 1

    Since the stationary probabilities

    Fr

    t

    are the unique solution of the above,

    it

    follows that

    X, = Fr,

    for

    all i.

    ExAMPLE 4.7 A) An Ergodic Random Walk. We can argue, with

    out any need for computations, that an ergodic chain with p/., +

    I

    +

    P

    t

    = 1

    is time reversible. This follows by noting that the number

    of transitions from

    i

    to

    i

    +

    1

    must at

    all

    times be within

    1

    of the

    number from i +

    1

    to i. This is so since between any two transitions

    from

    ito

    i + 1 there must be one from i + 1 to i and conversely)

    since the only way to re-enter

    i

    from a higher state is by

    way

    of

    state

    i + 1.

    Hence it follows that the rate of transitions from

    i

    to i + 1 equals the rate from i + 1 to i and so the process is

    time reversible.

    ExAMP1E

    4.7 a)

    The Metropolis Algorithm. Let a

    p

    j = 1 , m

    m

    be positive numbers, and let

    A

    = 2: a, Suppose that

    m

    is large

    ,= 1

    and that A

    is

    difficult to compute, and suppose we ideally want to

    simulate the values of a sequence of independent random variables

    whose probabilities are P

    = ajlA j = 1

    ,

    m.

    One

    way of

    simulating a sequence of random variables whose distributions

    converge to

    {PI j

    = 1 , m}

    is

    to find a Markov chain that

    is

    both easy to simulate and whose limiting probabilities are the PI

    The

    Metropolis algorithm

    provides an approach for accomplishing

    this task

    Let Q be any irreducible transition probability matrix on the

    integers 1 , n such that q/, = q/, for

    all

    i and j. Now define a

    Markov chain {X

    n

    , n ::> O} as follows.

    If

    Xn = i, then generiite a

    random variable that is equal

    to

    j with probability

    qlJ i, j

    1;

    ,

    m.

    f this random variable takes

    on

    the value

    j,

    then set

    Xn+ 1

    equal

    to j with probability min{l,

    a,la

    t

    } and set

    it

    equal to

    i

    otherwise.

  • 8/17/2019 MCMC Sheldon Ross

    43/68

  • 8/17/2019 MCMC Sheldon Ross

    44/68

    2 6

    M RKOV CH INS

    PROPOSITION 4 7 :1

    Consider a random walk on an edge weighted graph with a finite number of vertices

    If this Markov chain is irreducible then

    it

    is, in steady state, time reversible with

    stationary probabilities given by

    1 7 = ~ =

    Proof

    he

    time reversibility equations

    reduce to

    or, equivalently, since

    w

    II

    WI

    implying

    that

    which, since L 17

    =

    1 proves the result.

    Ex MPLE

    4.7 0) Consider a star graph consisting

    of r

    rays, with each

    ray consisting of

    n

    vertices. See Example 1.9 C) for the definition

    of a star graph.) Let leaf i denote the leaf on ray i Assume that

    a particle moves along the vertices

    of

    the graph in the following

    manner Whenever it is at the central vertex O. it is then equally

    likely

    to

    move to any ofits neighbors Whenever it is on an internal

    nonJeaf) vertex of a ray. then it moves towards the leaf of that ray

    with probability

    p

    and towardsOwith probability 1 -

    p

    Wheneverit

    is at a

    leaf

    it moves

    to

    its neighbor vertex with probability

    1.

    Starting at vertex O. we are interested in finding the expected

    number

    of transitions that it takes to visit an the vertices and then

    return to O.

  • 8/17/2019 MCMC Sheldon Ross

    45/68

    TIME REVERSIBLE MARKOV CHAINS

    Figure

    4.7.1.

    A star graph with weights: w

    :=

    p/ l

    -

    p).

    To begin, let us determine the expected number

    of

    transitions

    between returns to the central vertex

    O

    To evaluate this quantity,

    note the Markov chain of successive vertices visited

    is

    of the type

    considered in Proposition 4.7.1. To see this, attach a weight equal

    to 1 with each edge connected to 0 and a weight equal to

    w

    on

    an edge connecting the ith and i 1)st vertex from 0) of a ray,

    where w = pl l - p) see Figure 47.1) Then, with these edge

    weights, the probability that a particle at a vertex i steps from 0

    moves towards its leaf

    is

    w /(w WI-I p

    Since the total of the sum

    of

    the weights

    on

    the edges out of

    each of the vertices is

    and the sum

    of

    the weights on the edges out

    of

    vertex 0 is

    r

    we

    see from Proposition 4 7 1 that

    Therefore,

    /Loo

    the expected number of steps between returns

    to

    vertex 0,

    is

    Now, say that a new cycle begins whenever the particle returns to

    vertex 0, and let XI be the number of transitions in the

    jth

    cycle,

    j ;; 1 Also, fix i and let N denote the number of cycles that

    it

    207

  • 8/17/2019 MCMC Sheldon Ross

    46/68

    MARKOV

    CHAINS

    takes for the particle to visit leaf i and then return to 0 With these

    N

    definitions, : X, is equal to the number of steps it takes to visit

    1= 1

    leaf

    i

    and then return to

    O

    As

    N

    is

    clearly a stopping time for the

    X we obtain from Wald s equation that

    E

    [f

    X ]

    =

    ILooE[N] --'-1-w-< E[N].

    =1

    To

    determine

    E[N]

    the expected number of cycles needed to

    reach leaf i, note that each cycle will independently reach leaf i

    with probability r [ 1 1 _ - ( ~ : : ) ] where

    1/r

    is the probability that the

    transition from 0 is onto ray i and 1

    (11:;)n

    is the (gambler s

    ruin) probability that a particle on the first vertex of ray i will reach

    the leaf of that ray (that is, increase by n - 1) before returning to

    O

    Therefore N, the number

    of

    cycles needed to reach leaf

    i. is

    a

    geometric random variable with mean

    r[1

    -

    (1/w) ]1(1

    -

    1/w).

    and so

    E

    [f X] =

    2r(1

    - wn)[1 -

    (l/w)n]

    =

    2r[2

    -

    w

    n

    -

    (l/w)n]

    =1 I 1 - w)(1 - l/w 2 - w - 1/w

    Now, let T denote the number

    of

    transitions that it takes to visit

    all

    the vertices of the graph and then return to vertex 0

    To

    deter

    mine

    E[T]

    we

    will

    use the representation

    T =

    T,

    T2 . . T

    where

    T,

    is the time to visit the leaf 1 and then return to 0, T

    z

    is

    the additional time from

    T,

    until both the leafs 1 and 2 have been

    visited and the process returned to vertex 0; and, in general, T, is

    the additional time from

    T,-t

    until all

    of

    the leafs

    1,

    .. ,

    i

    have

    been visited and the process returned to 0 Note that if leaf

    i

    is

    not the last of the leafs 1, , i to be visited, then T, will equal 0,

    and if it

    is

    the last of these leafs to be visited, then T, will have the

    same distribution as the time until a specified leaf is first visited

    and the process then returned to 0 Hence, upon conditioning on

    whether leaf i

    is

    the last of leafs I, , i to be visited (and the

    probability

    of

    this event

    is

    clearly 1

    N ,

    we obtain from the preced

    ing that

    E[T]

    =

    2r{2

    -

    w

    n

    -

    l/wn] i

    Iii.

    2 w 1 / w

    p

  • 8/17/2019 MCMC Sheldon Ross

    47/68

    TIME-REVERSIBLE MARKOV

    CHAINS

    2 9

    If

    we try to solve Equations 4.7.2) for an arbitrary Markov chain, it will

    usually turn out that no solution exists. For example, from 4.7.2)

    X,

    P

    =

    X,P,i'

    XkP

    k

    ,

    = X,P,k'

    implying if

    P P,k

    > 0)

    that

    which need not in general equal P

    kl

    / P

     k

    • Thus we see that a necessary condition

    for time reversibility is that

    4.7.3)

    for ll i,

    j

    k

    which is equivalent to the statement that, starting in state

    i

    the path

    i

    --

    k - j

    --

    i has the same probability as the reversed path i

    --

    j

    --

    k

    --

    i.

    To

    understand the necessity

    of

    this, note that time reversibility implies that the

    rate at which a sequence

    of

    transitions from ito

    k

    to

    j

    to i occur must equal

    the rate of ones from i to j to k to i why?), and so we must have

    implying 4.7.3).

    In fact we can show the following.

    TH OR M 4 7 2

    A stationary Markov chain is time reversible if. and only if, starting in state i. any path

    back to i has the same probability as the reversed path. for all i That

    is, if

    474)

    for

    all states i, i ..

    Proof

    The proof of necessity

    is

    s indicated.

    To

    prove sufficiency

    fix

    states

    i

    and j

    and rewnte 474) as

    P

     

    P, I P, IPII = P P

    I,

    P, I

    I

    12

    t

    I

    Summing the above over all states i

    l

    • i

    z

    , • i

    k

    yields

    P

    k+1 P _ P p

    k

     

    1

    I 1

    1

    - I,

    I

  • 8/17/2019 MCMC Sheldon Ross

    48/68

    21

    MARKOV CHAINS

    Hence

    n n

    ' p ' p

    L J 1/ L J /1

    P

    I

    =

    P k - ~ . . . . : . . . I

    /1

    n

    1/

    n

    Letting n

    co

    now yields

    which establishes the result.

    ExAMPLE 4.7 D) A List Problem Suppose we are given a set of n

    elements-numbered

    1 through n that are to be arranged in some

    ordered

    list.

    At each

    unit

    of

    time a request is

    made

    to retrieve

    one

    of these elements-element i being requested independently

    of

    the past) with probability P,

    After

    being requested, the element

    is then

    put

    back, but not necessarily in the same position. In fact,

    let us suppose

    that

    the element requested is moved

    one

    closer

    to

    the front of

    the

    list, for instance, if the present list ordering is 1,

    3,4,2,5 and element 2 is requested, then the new ordering becomes

    1,3,2,

    4,5.

    For

    any given probability vector r (PI , P

    n

    ), the above

    can be modeled as a Markov chain with n states with the state at

    any time being the list order at

    that

    time. By using Theorem 4 7.1

    it is easy to show that this chain is time reversible. For instance,

    suppose

    n 3.

    Consider the following path from state

    I, 2, 3)

    to

    itself:

    1,2,3)

    ---

    2, 1,3)

    ---

    2,

    3,1) ---

    3,2,1)

    ---

    3, 1,2)

    --- 1,3,2) ---

    1,

    2, 3).

    The

    products of the transition probabilities in the forward direction

    and in the reverse direction are both equal to

    P;

    Since a

    similar result holds in general,

    the

    Markov chain

    is

    time reversible.

    In fact, time reversibility and the limiting probabilities can also

    be verified by noting

    that

    for any permutation

    iI, ;2,

    . . .

    , in),

    the

    probabilities given by

    (

    . ) - cpnpn- I P

    1[

    I,· , n

    -

    I I I

    2f t

    satisfy Equation 4.7.1), where C is chosen so that

    2:

    1[(i1 . . · in) 1.

    II

    ./ft)

  • 8/17/2019 MCMC Sheldon Ross

    49/68

    TIME REVERSIBLE MARKOV CHAINS

    Hence, we

    have

    a second

    argument that

    the chain

    is

    reversible,

    and the stationary probabilities are as given above.

    211

    The concept

    of

    the

    reversed chain is useful even when

    the

    process is

    not

    urne reversible.

    To

    illustrate this

    we start

    with the following theorem.

    TH OR M

    4 7 3

    Consider an irreducible Markov chain with transition probabilities P,/ If one can find

    nonnegative numbers 11' i 2:

    0,

    summing to unity and a transition probability matrix

    P*

    = [ P ~ ] such that

    (4

    7.5)

    then the 11' i 2: 0, are the stationary probabilities and P j are the transition probabilities

    of

    the reversed chain.

    Proof

    Summing the above equality over all

    i

    yields

    L

    11 ,

    P /

    =

    11 ,L PI

    I I

    Hence,

    the

    11 , S are

    the

    stationary probabilities

    of the

    forward chain (and also

    of

    the

    reversed chain, why?) Since

    11

    P

    ,/

    P

     

    1-- -

    11 /

    it follows

    that

    the

    P are

    the transition probabilities

    of

    the reversed chain.

    The importance of Theorem 4.7 2 is that we can sometimes guess at the

    nature of the reversed chain and then use the set

    of equations

    (4.7.5)

    to

    obtain

    both

    the

    stationary probabilities

    and

    the

    P .

    EXAMPLE 4.7 E)

    Let us reconsider Example 4.3( C), which deals with

    the

    age of a discrete time renewal process. That is, let Xn denote

    the age at time n of a renewal process whose interarrival times are

    all integers. Since the state of this

    Markov

    chain always increases

    by one until it hits a value chosen by the interarrival distribution

    and then drops to 1,

    it follows

    that the

    reverse process will always

    decrease by one until it hits state 1 at which time it jumps to a

  • 8/17/2019 MCMC Sheldon Ross

    50/68

    2 2

    M RKOV CH INS

    state chosen by the interarrival distnbution. Hence it seems that

    the reversed process is just the excess

    or

    residual bye process.

    Thus letting P denote the probability that an interarrival

    is

    i

    i ~ I it seems likely that

    ~

    =

    Pi

    P :,-l=I,

    i> 1

    Since

    for the reversed chain to be as given above we would need from

    4.7.5) that

    1T P _ P

    - --1T

    1

    ,

    LP

    j

    J=

    or

    1T = T

    P{X

    >

    i}

    where X

    is

    an interarrival time. Since 1T

    =

    1 the above would

    necessitate that

    1

    =

    T

    L

    P{X

    i}

    i=

    1

    1TIE[X]

    and so for the reversed chain to be as conjectured we would

    need that

    4.7.6)

    { X ~ i}

    1T

    = [X]

    To complete the proof that the reversed process is the excess and

    the

    limiting probabilities are given by 4.7 6), we need verify that

    1T p,., 1 = 1T P + 1

    ;

    or, equivalently,

    which is immediate.

  • 8/17/2019 MCMC Sheldon Ross

    51/68

    SEMI

    MARKOV PROCESSES

    Thus by looking at the reversed chain we are able to show that

    it is the excess renewal process and obtain at the same time the

    limiting distribution of both excess and age). In fact, this example

    yields additional insight

    as

    to why the renewal excess and age have

    the same limiting distnbution.

    2 3

    The technique of using the reversed chain to obtain limiting probabilities

    will

    be further exploited in

    Chapter 5

    where we deal with Markov chains in

    continuous time.

    4.8 SEMI MARKOV