next up previous
Postscript version of this file

STAT 870 Lecture 11

> p:= matrix(2,2,[[3/5,2/5],[1/5,4/5]]);
                      [3/5    2/5]
                 p := [          ]
                      [1/5    4/5]
> p2:=evalm(p*p):
> p4:=evalm(p2*p2):
> p8:=evalm(p4*p4):
> p16:=evalm(p8*p8):
This computes the powers (evalm understands matrix algebra).

Fact:

displaymath263

> evalf(evalm(p));
            [.6000000000    .4000000000]
            [                          ]
            [.2000000000    .8000000000]
> evalf(evalm(p2));
            [.4400000000    .5600000000]
            [                          ]
            [.2800000000    .7200000000]
> evalf(evalm(p4));
            [.3504000000    .6496000000]
            [                          ]
            [.3248000000    .6752000000]
> evalf(evalm(p8));
            [.3337702400    .6662297600]
            [                          ]
            [.3331148800    .6668851200]
> evalf(evalm(p16));
            [.3333336197    .6666663803]
            [                          ]
            [.3333331902    .6666668098]
Where did 1/3 and 2/3 come from?

Suppose we toss a coin tex2html_wrap_inline269 and start the chain with Dry if we get heads and Wet if we get tails.

Then

displaymath271

and

align46

Notice last line is a matrix multiplication of row vector tex2html_wrap_inline273 by matrix tex2html_wrap_inline275 . A special tex2html_wrap_inline273 : if we put tex2html_wrap_inline279 and tex2html_wrap_inline281 then

displaymath283

So: if tex2html_wrap_inline285 then tex2html_wrap_inline287 and analogously for W. This means that tex2html_wrap_inline291 and tex2html_wrap_inline293 have the same distribution.

A probability vector tex2html_wrap_inline273 is called the initial distribution for the chain if

displaymath297

A Markov Chain is stationary if

displaymath299

for all i

Finding stationary initial distributions. Consider tex2html_wrap_inline275 above. The equation

displaymath305

is really

align69

The first can be rearranged to

displaymath307

and so can the second. If tex2html_wrap_inline273 is to be a probability vector then

displaymath311

so we get

displaymath313

leading to

displaymath315

Some more examples:

displaymath317

Set tex2html_wrap_inline319 and get

align74

First plus third gives

displaymath321

so both sums 1/2. Continue algebra to get

displaymath323

p:=matrix([[0,1/3,0,2/3],[1/3,0,2/3,0],
          [0,2/3,0,1/3],[2/3,0,1/3,0]]);

               [ 0     1/3     0     2/3]
               [                        ]
               [1/3     0     2/3     0 ]
          p := [                        ]
               [ 0     2/3     0     1/3]
               [                        ]
               [2/3     0     1/3     0 ]
> p2:=evalm(p*p);
             [5/9     0     4/9     0 ]
             [                        ]
             [ 0     5/9     0     4/9]
        p2:= [                        ]
             [4/9     0     5/9     0 ]
             [                        ]
             [ 0     4/9     0     5/9]
> p4:=evalm(p2*p2):
> p8:=evalm(p4*p4):
> p16:=evalm(p8*p8):
> p17:=evalm(p8*p8*p):

> evalf(evalm(p16));
    [.5000000116 , 0 , .4999999884 , 0]
    [                                 ]
    [0 , .5000000116 , 0 , .4999999884]
    [                                 ]
    [.4999999884 , 0 , .5000000116 , 0]
    [                                 ]
    [0 , .4999999884 , 0 , .5000000116]
> evalf(evalm(p17));
    [0 , .4999999961 , 0 , .5000000039]
    [                                 ]
    [.4999999961 , 0 , .5000000039 , 0]
    [                                 ]
    [0 , .5000000039 , 0 , .4999999961]
    [                                 ]
    [.5000000039 , 0 , .4999999961 , 0]
> evalf(evalm((p16+p17)/2));
  [.2500, .2500, .2500, .2500]
  [                          ]
  [.2500, .2500, .2500, .2500]
  [                          ]
  [.2500, .2500, .2500, .2500]
  [                          ]
  [.2500, .2500, .2500, .2500]
tex2html_wrap_inline325 doesn't converges but tex2html_wrap_inline327 does. Next example:

displaymath329

Solve tex2html_wrap_inline319 :

align97

Second and fourth equations redundant. Get

align115

Pick tex2html_wrap_inline333 in [0,1/4]; put tex2html_wrap_inline337 .

displaymath339

solves tex2html_wrap_inline319 . So solution is not unique.

> p:=matrix([[2/5,3/5,0,0],[1/5,4/5,0,0],
            [0,0,2/5,3/5],[0,0,1/5,4/5]]);

               [2/5    3/5     0      0 ]
               [                        ]
               [1/5    4/5     0      0 ]
          p := [                        ]
               [ 0      0     2/5    3/5]
               [                        ]
               [ 0      0     1/5    4/5]
> p2:=evalm(p*p):
> p4:=evalm(p2*p2):
> p8:=evalm(p4*p4):
> evalf(evalm(p8*p8));
        [.2500000000 , .7500000000 , 0 , 0]
        [                                 ]
        [.2500000000 , .7500000000 , 0 , 0]
        [                                 ]
        [0 , 0 , .2500000000 , .7500000000]
        [                                 ]
        [0 , 0 , .2500000000 , .7500000000]
Notice that rows converge but to two different vectors:

displaymath343

and

displaymath345

Solutions of tex2html_wrap_inline319 revisited? Check that

displaymath349

and

displaymath351

If tex2html_wrap_inline353 ( tex2html_wrap_inline355 ) then

displaymath305

so again solution is not unique. Last example:

> p:=matrix([[2/5,3/5,0],[1/5,4/5,0],
             [1/2,0,1/2]]);

                  [2/5    3/5     0 ]
                  [                 ] 
             p := [1/5    4/5     0 ]
                  [                 ]
                  [1/2     0     1/2]
> p2:=evalm(p*p):
> p4:=evalm(p2*p2):
> p8:=evalm(p4*p4):
> evalf(evalm(p8*p8));
  [.2500000000 .7500000000        0       ]
  [                                       ]
  [.2500000000 .7500000000        0       ]
  [                                       ]
  [.2500152588 .7499694824 .00001525878906]

Interpretation of examples

Basic distinguishing features: pattern of 0s in matrix tex2html_wrap_inline275 .

The ergodic theorem

Consider a finite state space chain. If x is a vector then the ith entry in tex2html_wrap_inline383 is

displaymath385

Rows of tex2html_wrap_inline275 probability vectors, so a weighted average of the entries in x.

If the weights are strictly between 0 and 1 and the largest and smallest entries in x are not the same then tex2html_wrap_inline393 is strictly between the largest and smallest entries in x. In fact

displaymath397

and

displaymath399

Now multiply tex2html_wrap_inline401 by tex2html_wrap_inline403 .

ijth entry in tex2html_wrap_inline407 is a weighted average of the jth column of tex2html_wrap_inline403 .

So, if all the entries in row i of tex2html_wrap_inline401 are positive and the jth column of tex2html_wrap_inline403 is not constant, the ith entry in the jth column of tex2html_wrap_inline407 must be strictly between the minimum and maximum entries of the jth column of tex2html_wrap_inline403 .

In fact, fix a j.

tex2html_wrap_inline433 maximum entry in column j of tex2html_wrap_inline403

tex2html_wrap_inline439 the minimum entry.

Suppose all entries of tex2html_wrap_inline401 are positive.

Let tex2html_wrap_inline443 be the smallest entry in tex2html_wrap_inline401 . Our argument above shows that

displaymath447

and

displaymath449

Putting these together gives

displaymath451

In summary the column maximum decreases, the column minimum increases and the gap between the two decreases exponentially along the sequence tex2html_wrap_inline453 .

This idea can be used to prove

proposition162

Proof: First for k>r

displaymath481

For each i there is a k for which tex2html_wrap_inline487 and since tex2html_wrap_inline489 we see tex2html_wrap_inline491 . The argument before the proposition shows that

displaymath493

exists for each m and tex2html_wrap_inline497 . This proves tex2html_wrap_inline325 has a limit which we call tex2html_wrap_inline501 . Since tex2html_wrap_inline503 also converges to tex2html_wrap_inline501 we find

displaymath507

Hence each row of tex2html_wrap_inline501 is a solution of tex2html_wrap_inline511 . The argument before the statement of the proposition shows all rows of tex2html_wrap_inline501 are equal. Let tex2html_wrap_inline515 be this common row.

Now if tex2html_wrap_inline273 is any vector whose entries sum to 1 then tex2html_wrap_inline519 converges to

displaymath521

If tex2html_wrap_inline273 is any solution of tex2html_wrap_inline525 we have by induction tex2html_wrap_inline527 so tex2html_wrap_inline529 so tex2html_wrap_inline531 . That is exactly one vector whose entries sum to 1 satisfies tex2html_wrap_inline525 . tex2html_wrap_inline535

Note conditions:

There is an r for which all entries in tex2html_wrap_inline401 are positive.

The chain has a finite state space.

Consider finite state space case: tex2html_wrap_inline325 need not have limit. Example:

displaymath543

Note tex2html_wrap_inline545 is the identity while tex2html_wrap_inline547 . Note, too, that

displaymath549

Consider the equations tex2html_wrap_inline551 with tex2html_wrap_inline553 . We get

displaymath555

so that the solution to tex2html_wrap_inline551 is again unique.

Definition: The period d of a state i is the greatest common divisor of

displaymath563

lemma201

Definition: A state is aperiodic if its period is 1.

Proof: I do the case d=1. Fix i. Let

displaymath575

If tex2html_wrap_inline577 then tex2html_wrap_inline579 .

This (and aperiodic) implies (number theory argument) that there is an r such that tex2html_wrap_inline497 implies tex2html_wrap_inline585 .

Now find m and n so that

displaymath591

For k>r+m+n we see tex2html_wrap_inline595 so the gcd of the set of k such that tex2html_wrap_inline595 is 1. tex2html_wrap_inline535

The case of period d>1 can be dealt with by considering tex2html_wrap_inline605 .

displaymath607

For this example tex2html_wrap_inline609 is a class of period 3 states and tex2html_wrap_inline611 a class of period 2 states.

displaymath613

has a single communicating class of period 2.

A chain is aperiodic if all its states are aperiodic.


next up previous



Richard Lockhart
Friday October 20 13:47:29 PDT 2000