Budapest University of Tecnology and Economics. AndrásVetier Q U E U I N G. January 25, Supported by. Pro Renovanda Cultura Hunariae Alapítvány

Similar documents
Markov Chains CK eqns Classes Hitting times Rec./trans. Strong Markov Stat. distr. Reversibility * Markov Chains

Lecture 20 : Markov Chains

Stochastic process. X, a series of random variables indexed by t

Recap. Probability, stochastic processes, Markov chains. ELEC-C7210 Modeling and analysis of communication networks

Lecture 9 Classification of States

P i [B k ] = lim. n=1 p(n) ii <. n=1. V i :=

Irreducibility. Irreducible. every state can be reached from every other state For any i,j, exist an m 0, such that. Absorbing state: p jj =1

Markov Chains. X(t) is a Markov Process if, for arbitrary times t 1 < t 2 <... < t k < t k+1. If X(t) is discrete-valued. If X(t) is continuous-valued

MARKOV PROCESSES. Valerio Di Valerio

Stochastic Processes

Chapter 11 Advanced Topic Stochastic Processes

Treball final de grau GRAU DE MATEMÀTIQUES Facultat de Matemàtiques Universitat de Barcelona MARKOV CHAINS

MAS275 Probability Modelling Exercises

MATH 56A: STOCHASTIC PROCESSES CHAPTER 1

Chapter 5. Continuous-Time Markov Chains. Prof. Shun-Ren Yang Department of Computer Science, National Tsing Hua University, Taiwan

Sample Spaces, Random Variables

Lecture Notes 7 Random Processes. Markov Processes Markov Chains. Random Processes

Outlines. Discrete Time Markov Chain (DTMC) Continuous Time Markov Chain (CTMC)

STOCHASTIC PROCESSES Basic notions

Markov Processes Hamid R. Rabiee

2. Transience and Recurrence

Markov Chains on Countable State Space

Lecture 11: Introduction to Markov Chains. Copyright G. Caire (Sample Lectures) 321

Statistics 150: Spring 2007

ECE-517: Reinforcement Learning in Artificial Intelligence. Lecture 4: Discrete-Time Markov Chains

IEOR 6711, HMWK 5, Professor Sigman

Example: physical systems. If the state space. Example: speech recognition. Context can be. Example: epidemics. Suppose each infected

Lectures on Probability and Statistical Models

Random Variables Example:

Markov Chains. Andreas Klappenecker by Andreas Klappenecker. All rights reserved. Texas A&M University

Discrete time Markov chains. Discrete Time Markov Chains, Limiting. Limiting Distribution and Classification. Regular Transition Probability Matrices

Markov Chains Handout for Stat 110

Chapter 16 focused on decision making in the face of uncertainty about one future

Random Variables. Definition: A random variable (r.v.) X on the probability space (Ω, F, P) is a mapping

SMSTC (2007/08) Probability.

Countable state discrete time Markov Chains

IEOR 6711: Stochastic Models I, Fall 2003, Professor Whitt. Solutions to Final Exam: Thursday, December 18.

Examples of Countable State Markov Chains Thursday, October 16, :12 PM

12 Markov chains The Markov property

Readings: Finish Section 5.2

Markov Chains. INDER K. RANA Department of Mathematics Indian Institute of Technology Bombay Powai, Mumbai , India

ISE/OR 760 Applied Stochastic Modeling

Using Markov Chains To Model Human Migration in a Network Equilibrium Framework

Markov Chains and Stochastic Sampling

Statistics 433 Practice Final Exam: Cover Sheet and Marking Sheet

FINITE MARKOV CHAINS

Markov Chains. As part of Interdisciplinary Mathematical Modeling, By Warren Weckesser Copyright c 2006.

2. AXIOMATIC PROBABILITY

INTRODUCTION TO MARKOV CHAINS AND MARKOV CHAIN MIXING

Lecture 4a: Continuous-Time Markov Chain Models

Stochastic Processes

Basic Probability space, sample space concepts and order of a Stochastic Process

CS145: Probability & Computing Lecture 18: Discrete Markov Chains, Equilibrium Distributions

CDA6530: Performance Models of Computers and Networks. Chapter 3: Review of Practical Stochastic Processes

Lecture 4 - Random walk, ruin problems and random processes

Stochastic Processes

Chapter 2: Markov Chains and Queues in Discrete Time

FINITE ABELIAN GROUPS Amin Witno

Randomized Algorithms

On asymptotic behavior of a finite Markov chain

Conditional Probability

P(X 0 = j 0,... X nk = j k )

The Theory behind PageRank

Stat 516, Homework 1

Cover Page. The handle holds various files of this Leiden University dissertation

Continuous-Time Markov Chain

Lecture 20: Reversible Processes and Queues

(b) What is the variance of the time until the second customer arrives, starting empty, assuming that we measure time in minutes?

POISSON PROCESSES 1. THE LAW OF SMALL NUMBERS

LECTURE 1. 1 Introduction. 1.1 Sample spaces and events

Statistics 253/317 Introduction to Probability Models. Winter Midterm Exam Friday, Feb 8, 2013

Name: Firas Rassoul-Agha

IEOR 6711: Professor Whitt. Introduction to Markov Chains

Markov Chains Introduction

Introduction and Preliminaries

CDA5530: Performance Models of Computers and Networks. Chapter 3: Review of Practical

2 Discrete-Time Markov Chains

Markov chains. Randomness and Computation. Markov chains. Markov processes

STA 624 Practice Exam 2 Applied Stochastic Processes Spring, 2008

Question Points Score Total: 70

MATH HOMEWORK PROBLEMS D. MCCLENDON

LTCC. Exercises. (1) Two possible weather conditions on any day: {rainy, sunny} (2) Tomorrow s weather depends only on today s weather

A REVIEW AND APPLICATION OF HIDDEN MARKOV MODELS AND DOUBLE CHAIN MARKOV MODELS

Lesson Plan. AM 121: Introduction to Optimization Models and Methods. Lecture 17: Markov Chains. Yiling Chen SEAS. Stochastic process Markov Chains

LIMITING PROBABILITY TRANSITION MATRIX OF A CONDENSED FIBONACCI TREE

ISM206 Lecture, May 12, 2005 Markov Chain

18.175: Lecture 30 Markov chains

Math Homework 5 Solutions

CS 798: Homework Assignment 3 (Queueing Theory)

Answers to selected exercises

MATH 56A: STOCHASTIC PROCESSES CHAPTER 2

The Transition Probability Function P ij (t)

MARKOV CHAINS: STATIONARY DISTRIBUTIONS AND FUNCTIONS ON STATE SPACES. Contents

6 Markov Chain Monte Carlo (MCMC)

Homework set 3 - Solutions

Interlude: Practice Final

4.7.1 Computing a stationary distribution

On the static assignment to parallel servers

Homework set 2 - Solutions

. Find E(V ) and var(v ).

Transcription:

Budapest University of Tecnology and Economics AndrásVetier Q U E U I N G January 25, 2000 Supported by Pro Renovanda Cultura Hunariae Alapítvány Klebelsberg Kunó Emlékére Szakalapitvány 2000

Table of Contents Contents Introduction... 2 Chapter 1. Markov Chains... 3 1. Transition matrix... 3 2. Absolute Distributions... 8 _ 3. The Distribution of a Markov Chain on R... 10 4. How to Generate a Markov Chain... 11 5. Stationarity... 14 6. Recurrence... 17 7. Irreducibility, Aperiodicity... 22 8. Stabililty... 23 9. Reducible and Periodic Markov Chains... 26 10. Foster s Criterion for Stability... 27 11. Stability of the Length of Queue... 28 12. Proof of Stability for Finite Markov Chains... 30 13. Problems... 34 Chapter 2. Stationary Processes... 54 1. Stationarity... 54 2. Ergodicity of the Expected Value... 57 3. Ergodicity of a State in a Stationary Markov Chain... 58 4. Problems... 59 Chapter 3. Poisson Processes... 63 1. Point Processes... 63 2. Poisson Processes... 63 3. Differential Equations... 64 4. Exponential Waiting Times... 65 5. Problems... 67 Chapter 4. Birth and Death Processes... 69 1. Jump Processes Markov Processes... 69 2. Transition Matrix Infinitesimal Generator... 70 3. Absolute Distributions... 82 4. Stationarity... 83 5. Equation for the Expected Value... 86 6. Problems... 87 1

Introduction Introduction The theory of stochastic processes is, in a sense, a part of, in other sense, the continuation of probability theory. In both theories models are constructed about observations of random phenomena. In a first probability course, the observed phenomena are simpler: the sample space (the set of all possible outcomes) is either a finite or countably infinite set (discrete models) or a subset of a finite dimensional Euclidian space (continuous models). In a stochastic processes course the observed models may be more complicated: the sample space may consist of sequences or functions or even more complicated mathematical objects. For example, observing the height and weight of a person randomly chosen from a given population, the outcomes are pairs of real numbers, and, as a model, we can use a two-dimensional normal distribution. As we learnt in probability theory, we may, for example, estimate the weight from the height by the so called regression line. However, observing the movement of a particle in a big tank filled with gas for a given time interval, the possible outcomes of this so called Brown motion are vector valued functions. In fact, each outcome of this observation is a function describing how the position of the particle changes as time passes. Putting an emphasis on the fact that the domain of the possible outcomes is a continuous time interval, such processes are called continuous-time processes. On the contrary, if we observe the position of the chosen particle only at time instants 1, 2, Æ, then any result of our observation is an infinite sequence of points. Since any sequence is a function defined on the set of natural numbers, such processes are called discrete-time processes. In this textbook, we deal with such important types of discrete-time processes as Markov chains, stationary sequences, sequences of independent observations. Such continuous-time processes will be discussed as jump processes, birth and death processes, and the famous Wiener process related to the Brown motion. The Poisson point processes will differ from all the other processes, because its realizations are not functions, but point systems. The continuous-time analogies of Markov chains, called Markov processes, and those of stationary sequences, called stationary processes, in some sense, would be quite natural to include in the course, but technically the discrete-time processes are easier to handle. This is why we shall rather deal with the discretetime Markov chains and stationary sequences only. 2

Chapter 1 Markov Chains 1. Transition Matrix Assume that a process has a finite or countable infinite number of possible states, which will be identified with the positive integers in this textbook. The process is observed at discrete time instants, which will be denoted by the non-negative integers or, in some cases, by the positive integers. Let the state in which the process at time instant t is be denoted by 0t µ t æ 0, 1, 2, Æ. The process 0!, 0", 0#, Æ is called a Markov chain if, for any time instant t (called here the present time instant) and any states i!, i ", Æ, i t 1 (called here the states of the process in the past or briefly, past states), and any two states i, j (called here the present and future states, respectively), the conditional probability Pr ç 0 æ j 0 æ i, 0 æ i, Æ, 0 æ i, 0 æ i ü t+1!! " " t1 t1 t does not depend on the states i!, i ", Æ, i t 1 but it is equal to Pr ç 0tþ1 æ j 0t æ i ü. This property, called Markov property, can be verbalized like this: on condition that the present state of the process is given, the conditional probability of any future state does not depend on the past states of the process. If, for any time instant t and any states i, j, the conditional probability does not depend on t, that is, it is equal to Pr ç 0tþ1 æ j 0t æ i ü Pr ç 01 æ j 0 æ i ü, then the chain is called homogeneous. Homogeneity means that the value of the conditional probability of a state in the future does not depend on the value of the present time instant. In these lecture notes we shall develop only the theory of homogeneous Markov chains.! 1. Example: SUMS OF RANDOM NUMBERS Let the numbers 3!, 3", 3#, Æ be random numbers generated by independent tosses of a fair die, and let the random variables! t, " t, # t be defined by a)! t æ 3t þ 3tþ" µ t æ 0, 1, 2, Æ, b) " t æ 3! þ 3" þ 3# þ Æ þ 3t µ t æ 0, 1, 2, Æ, c) # æ 3 þ 2 3 þ 3 3 Æ þ µ t þ 1 3 µ t æ 0, 1, 2, Æ. t! " # Which of the three sequences constitutes a (homogeneous) Markov chain? Before doing or reading the calculations, try, on a heuristic basis, conjecture whether the future of these processes depends or does not depend on their past, on condition that their present is given. t 3

Solution. a) The process!t µ t æ 0, 1, 2, Æ is not a Markov process. If the time instants 0, 1, 2 represent past, present and future time instants, respectively, then it is easy to check that the conditional probabilities Pr ç! æ 12! æ 12,! æ 11 ü, #! " are not equal, which breaks the Markov property: Pr ç! æ 12! æ 11,! æ 11 ü #! " Pr ç! æ 12! æ 12,! æ 11 ü æ #! " Pr ç! æ12,! æ11,! æ12 ü! " # Pr ç! æ12,! æ11 ü! " æ æ æ æ Pr ç 6, 6, 5, 7 ü 3! 3" 3# 3$ æ æ 0, æ æ æ Pr ç 3 6, 3 6, 3 5 ü! " # and æ æ æ æ Pr ç!# 12!! 11,!" 11 ü æ æ æ Pr ç! 11,! 11,! 12 ü! " # æ æ Pr ç! 11,! 11 ü! " æ æ æ æ æ þ æ æ æ æ Pr ç 3 6, 3 5, 3 6, 3 6 ü Pr ç 3 5, 3 6, 3 5, 3 7 ü! " # $! " # $ æ æ æ þ æ " æ # æ Pr ç 6, 5, 6 ü Pr ç 5, 3! 3" 3# 3! 3 6, 5 3 ü 4 1 ç ü þ 6 1 æ 3 3 æ. þ 0 1 1 ç 6ü ç 6 ü 12 b) The process " t µ t æ 0, 1, 2, Æ is a homogeneous Markov process. We shall first calculate the conditional probability for the Markov property when t æ 2 is considered as the present time instant. If 2 is the present time instant, then time instants 0 and 1 represent the past, and time instant 3 represents the future time instant: Pr ç " æ j " æ i, " æ i, " æ i ü $!! " " # æ æ æ æ æ Pr ç "! i!, "" i ", "# i, " $ j ü Pr ç " i, " i, " i ü æ æ æ!! " " # æ æ æ æ æ Pr ç 3! i!, 3" i " i!, 3# i i ", 3$ j i ü Pr ç 3 i, 3 i i, 3 i i ü æ æ æ!! " "! # " 4

æ æ æ æ æ Pr ç 3 i ü Pr ç 3 i i ü Pr ç 3 i i ü Pr ç 3 j i ü!! " "! # " $ æ æ æ Pr ç 3 i ü Pr ç 3 i i ü Pr ç 3 i i ü!! " "! # " æ ç æ Pr 3$ j i ü. One can check that, for the general present time instant t, the conditional probability is Pr ç " t+1 æ j "! æ i!, "" æ i ", Æ, " t1 æ i t1, " t æ i ü æ Pr ç 3tþ 1 æ j i ü æ Pr ç 3! æ j i ü. Æ t 1 Since the last formula does not contain i!, i ",, i, the conditional probability in question does not depend on the past states i!, i ", Æ, i t 1, which means that the process is a Markov process. Since the value of the conditional probability does not depend on the present time instant t either, the Markov chain is homogeneous. c) Let us analyze the process # t µ t æ 0, 1, 2, Æ. We shall show in a similar way that it is a Markov process, but non homogeneous. Pr ç # $ æ j #! æ i!, #" æ i ", ## æ i ü æ æ æ æ æ Pr ç #! i!, #" i ", ## i, # $ j ü Pr ç # i, # i, # i ü æ æ æ!! " " # æ æ æ æ æ Pr ç 3! i!, 2 3" i " i!, 3 3# i i ", 4 3$ j i ü Pr ç 3 i, 23 i i, 33 i i ü æ æ æ!! " "! # " æ æ æ æ æ Pr ç 3 i ü Pr ç 23 i i ü Pr ç 33 i i ü Pr ç 43 j i ü!! " "! # " $ æ æ æ ü Pr ç 3 i ü Pr ç 23 i i ü Pr ç 33 i i!! " "! # " æ ç æ Pr 43$ j i ü. One can check that, for the general present time instant t, the conditional probability is Pr ç # t+1 æ j #! æ i!, #" æ i ", Æ, # t1 æ i t1, # t æ i ü æ Pr ç µ t þ 2 3tþ 1 æ j i ü æ Pr ç µ t þ 2 3! æ j i ü. Æ t 1 Since the last formula does not contain i!, i ",, i, the conditional probability in question does not depend on the past states i!, i ", Æ, i t 1, which means that the process is a Markov process. Since the value of the conditional probability does depend on the present time instant t, the Markov chain is nonhomogeneous. The conditional probabilities 5

p ij(n) æ Pr ç 0n æ j 0! æ i ü, called n -step transition probabilities, have the following meaning: on condition that the process is in the state i at a certain time instant, the probability that, n units of time later, it will be in state j is p ij(n). The matrix P µ n æ ç p (n) ü is called the n -step transition matrix. An n -step transition matrix is always a square matrix, its size is the number of the states, of the process, and the row-sums of the matrix are equal, obviously, to 1. ij 2. Example: LENGTH OF RUN Use a false coin to generate a random head-tail sequence. Assume that for each toss, the probability of a head or a tail is p and q, respectively. For each n let the random variable 0 n be equal to the length of the head-run at the n -th toss, that is, 0 n æ 0, if the n -th toss is tail; 0 n æ 1, if the n -th toss is a head, but the µ n 1 -th toss is a tail; 0 n æ 2, if the n -th and µ n 1 -th tosses are heads, but the µ n 2 -th toss is a tail; and so on. It is easy to see that the sequence 0", 0#, Æ is a homogeneous Markov chain. Find the n -step transition probabilities and the n -step transition matrix. Solution. If the process is in a state i at present, then n units of time later it may be either in state i þ n or in any of the states 0, 1, 2, Æ, n 1. State i þ n occurs if all the n tosses yield heads, state j µ j æ 0, 1, 2, Æ, n 1 occurs if the last j tosses yield heads, but the one preceding these tosses is a tail. This means that p ij µ n æ n p if j æ i þ n, p ij µ n æ j q p if j æ 0, 1, 2, Æ, n 1, p ij µ n æ 0 otherwise. (To draw the n -step transition matrix is now an easy exercise for the reader. Check that the row-sums are equal to 1.) The 1 -step transition probabilities are denoted also by p, and the 1 -step transition matrix is ij denoted also by P : p ij æ p ij(1) æ Pr ç 0" æ j 0! æ i ü æ Pr ç 0tþ1 æ j 0t æ i ü, P æ ç p ij ü. Using the total probability formula and induction, one can be convinced that P µ 1 æ P P µ 2 æ P P µ 3 æ P 6

that is, the n -step transition matrix is equal to the n -th power of the 1 -step transition matrix: È P µ n æ P n. 4. Example: TWO-STATE MARKOV CHAINS TRANSITION MATRICES If a Markov chain has only two states, then its 1 -step transition matrix is of the form 1 a a P æ õ ù, b 1 b where a æ p "#, b æ p #". Find an explicit formula for the n -step transition probabilities. Solution. Since P µ n æ P n, we have the recursive relation P µ n þ 1 æ P µ n P between the transition matrices, which holds also for n æ 0, if Pµ 0 is, by definition, the 2 ó 2 unit matrix. The recursive relation for the transition probabilities gives that that is, p"" µ n þ 1 æ p"" µ n p "" þ p"# µ n p#" æ p"" µ n ç1 a ü þ ç1 p"" µ n ü b, p"" µ n þ 1 æ p"" µ n ç1 a b ü þ b, which is a recursive formula for the transition probabilities p""µ n µ n æ 0, 1, 2, Æ. As it is known, for a sequence Xµ n µ n æ 0, 1, 2, Æ defined by the recursive formula there exists a closed formula: Xµ n þ 1 æ Xµ n A þ B B B n Xµ n æ þ çxµ 0 ü 1A 1A A if A 1, and (For a proof see the Remark at the end of this section.) Xµ n æ Xµ 0 þ n B if A æ 1. Substituting A æ 1 a b, B æ b, Xµ 0 æ 1, we get that b a p"" µ n æ aþb þ aþb µ 1 a b if at least one of a and b differs from 0. Using that p"# µ n æ 1 p"" µ n, we get that a a n p"# µ n æ aþb aþb µ 1 a b. n 7

Changing the role of the indices, and the role of a and b, the other two elements of the n -step transition matrix can be determined, too: b b n p#" µ n æ aþb aþb µ 1 a b. a b n p## µ n æ aþb þ aþb µ 1 a b. If a æ b æ 0, then obviously p"" µ n æ 1, p"# µ n æ 0, p# " µ n æ 0, p## µ n æ 1, that is Pµ n is the unit matrix for all n. 5. Exercise. Study the behavior of Pµ n as n _, and think of the physical meaning of the result you get. Remark. ( Proof of a Closed Formula for the Sequence Xµ n þ 1 æ Xµ n A þ B. It is obvious that Xµ 1 æ Xµ 0 A þ B Xµ 2 æ Xµ 1 A þ B æ çxµ 0 A þ Bü A þ B Xµ 3 æ Xµ 2 A þ B æ ççxµ 0 A þ Bü A þ Bü A þ B Xµ 4 æ Xµ 3 A þ B æ çççxµ 0 A þ Bü A þ Bü A þ Bü A þ B È Multiplying out the parentheses, we get for Xµ 4 that Xµ 4 æ Xµ 0 A % þ B A $ þ B A # þ B A þ B æ Xµ 0 A % þ B % 1 A 1 A B B æ 1A þ ç µ 1A ü % X 0 A if A 1, and Xµ 4 æ Xµ 0 þ 4 B if A æ 1. Similarly, by an exact induction, one can derive that B n Xµ n æ 1A þ çxµ 0 1A ü A if A 1, and Xµ n æ Xµ 0 þ n B if A æ 1. B 2. Absolute Distributions The (unconditional) distribution of 0 n is called the n -th absolute distribution. Let d i µ n denote the probability and let D µ n denote the n -th absolute distribution d µ n æ Pr ç 0 æ i ü, i n 8

D µ n æ ç d " µ n, d # µ n, Æ ü æ Pr ç 0n æ 1 ü, Pr ç 0n æ 2 ü, Æ. ê The distribution Dµ 0 of 0! is called the initial distribution: D µ 0 æ ç d " µ 0, d # µ 0, Æ ü æ Pr ç 0! æ 1 ü, Pr ç 0! æ 2 ü, Æ. ê Using again the total probability formula, one can check that the absolute distributions and the transition matrices are related to each other according to the following matrix products: n D µ n æ D µ m P µ n m æ D µ m P m, n D µ n æ D µ 0 P µ n æ D µ 0 P. 6. Example: TWO-STATE MARKOV CHAINS (continued) ABSOLUTE DISTRIBUTIONS Find an explicit formula for the absolute distributions of a two-state Markov chain in terms of the initial distribution Dµ 0 æ ç d" µ 0, d# µ 0 ü and the transition probabilities p"# æ a, p#" æ b. Solution. As we calculated the n -step transition probabilities, if at least one of a and b differs from 0, then b a n a a n a þ µ 1 a b µ 1 a b P µ n æ þb aþb aþb aþb ï b b n a b n ð. aþb aþb µ 1 a b aþb þ aþb µ 1 a b Thus, µ µ æ µ æ µ µ æ ç d " n ), d # n ü D n D 0 P n æ µ d" µ 0, d# µ 0 ï b a n a a þ þ þ µ 1 a b þ þ µ 1 a b b b þ þ µ 1 a b a b þ þ þ µ 1 a b a b a b a b a b a b a b a b a b n n ð, yielding that b a d d " n þ þ " b d # n µ æ þ µ 1 a b, a b a b a a d d # n þ þ " b d # n µ æ µ 1 a b. a b a b If a æ b æ 0, then Pµ n is the unit matrix, and thus, Dµ n æ Dµ 0 for all n. 7. Exercise. Study the behavior of Pµ n and Dµ n as n _, and think of the physical meaning of the result you get. How do you interpret the result, when a æ b æ 1? 9

3. The Distribution of a Markov Chain on R _ This and the next section can be skipped. _ As known, the distribution Q on R of a random sequence!, ", #, $ can be characterized by a primary or initial distribution Q! and a sequence of families of conditional distributions: Here, Q represents the distribution of! 0! µ x! µ x!, x" µ x!, x ", x# " # $ Æ Q, Q, Q,., and Q µ x!, x ", Æ, x #, x " n n n 0 0 0 0 Æ represents the distribution of 0n on condition that 0! æ x!, 0" æ x ", Æ, 0n# æ x n#, 0n" æ x n". It should be clear that the random sequence 0!, 0", 0#, 0$, Æ is a Markov chain if and only if its distribution Q on R _ has the property that for all n 1 and for all µ x!, x ", Æ, x n#, x n" the conditional distribution µ x!, x ", Æ, x n#, xn" Q n does not depend on the parameters x!, x ", Æ, x n# ; it may depend only on the parameter x n" : µ x, x, Æ, x, x µ x n n! " n# n" n" Q æ Q. Thus, the distribution of a Markov chain is characterized by an initial distribution Q and a sequence of family! of special conditional distributions: µ x µ x µ x " # $ Q, Q, Q, Æ. (Since x represents an arbitrary real number, the index n 1 in x may be omitted.) n" n" µ x n Homogeneity means that Q does not depend on n : µ x µ x µ x x " # $ Q æ Q æ Q æ Æ æ Q µ. Thus, the distribution of a homogeneous Markov chain is characterized by an initial distribution Q and a! family of conditional distributions. If, for the Markov chain, there exists only a finite or countably infinite number of states identified with the positive integers, then the initial distribution and each conditional distribution is a discrete distribution. 4. How to Generate a Markov Chain This section can be skipped. A random sequence of states, that is, a physical representation of a Markov chain with a given initial µ x µ x µ x distribution Q! and sequence of families of conditional distributions Q ", Q #, Q $, Æ can be generated as follows. First, choose the initial state according to the distribution Q!. Then, if the generated state turns out µ x! to be x!, then use the distribution Q " to generate the next state. If this is x ", then, regardless of x!, use µ x" Q # to generate the next element of the random sequence. Now, regardless of x! and x ", taking into account only the last generated random number x #, generate x $ according to the conditional distribution µ x# Q $. And so on, each element x n of the random sequence is generated according to a distribution which is specified by the previous element of the random sequence. 10

on n : If the chain is homogeneous, then the conditional distributions Q n µ n æ 1, 2,... do not depend µ x µ x µ x µ x x " # $ Q æ Q æ Q æ Æ æ Q µ for any state x, for all n. For a homogeneous Markov chain, the element x n, except x!, is generated according to the distribution Q µ x n". In order to perform this method in practice, let us denote by H! the upper quantile function, that is, the generalized inverse of the cumulative distribution function of the distribution Q. For a given n and x let us denote by H n µ x, y the value of the upper quantile function of the distribution Q at y. If the random variables (!, (", (#, ( $, Æ are independent and uniformly distributed between 0 and 1, then the random variables 0!, 0", 0#, 0$ Æ defined by æ H µ æ H µ, æ H µ, æ H µ, È 0!! (! 0" " 0! (" 0# # 0 " (# 0$ $ 0 # ( $ constitute a Markov chain for which the primary distribution is Q! and the sequence of µ x µ x µ x families of conditional distributions is Q, Q, Q, Æ. Clearly, the chain is " # $ homogeneous if, for n 1, H µ x, y does not depend on n, that is n æ H µ æ H µ, æ H µ, æ H µ, È 0!! (! 0" 0! (" 0# 0 " (# 0$ 0 # ( $! (x) n 5. Stationarity A Markov chain is called stationary if all its absolute distributions are the same, that is, D µ n does not depend on n. It is easy to see that a Markov chain is stationary if and only if its initial distribution Dµ 0 satisfies the matrix equation: D æ D P. This matrix equation clearly represents a system of linear equations for the terms d ", d #, Æ of the distribution D. Since D is a normalized distribution, this system can be extended by the equation d" þ d# þ Æ æ 1. For a given transition matrix P, a distribution D satisfying D æ DP and d" þ d# þ Æ æ 1 is called a stationary absolute distribution for the transition matrix P. If the initial distribution Dµ 0 is a stationary absolute distribution D for the transition matrix, then the Markov chain is stationary because D µ n æ D for all n. 11

8. Example: COLOR OF THE CONTAINER The M-bugs, which are tiny creatures, change their color by chance, independently of each other from day to day. They are either red or yellow or blue. An M-bug which is red today, tomorrow will be red or yellow 1 1 1 1 with probability 2, 2. A yellow one changes its color to red or remains yellow with probability 4, 4, and 1 becomes blue with probability 2. A blue M-bug, the next day, turns into yellow or remains blue with 1 1 probability 2, 2. Last year, I collected a large amount of such bugs, and have been keeping them in a glass container, where they are so mixed that the color of the whole container, from a certain distance, seems uniform all the time. You may be surprised, but in spite of the fact that each M-bug changes its color from day to day, this year the color of the container does not change from day to day, but it is a constant color. What color is it? Solution. The color of an M-bug, observed each day, constitutes a Markov chain with states red, yellow, blue and transition matrix 1 1 0 P æ ¹ 2 2» ¼ 1 1 1 ¾ 4 4 2. º 1 1 0 ½ 2 2 The large number of bugs guarantees that the proportion of M-bugs of a color in the container on a day is approximately equal to the absolute probability of that color on that day. Since the color of the container does not change from day to day, the proportion of red, yellow and blue M-bugs must be approximately constant from day to day. This means that the absolute probabilities of the colors are constants from day to day, that is, the absolute distribution is constant from day to day. This is why we calculate now the stationary absolute distribution D d, d, d. Here is the equation D P D : æ µ " # $ æ 1 1 ¹ 2 2 0 ¼ c d» 1 1 1 d d d ¾ " # $ 4 4 2 æ c d" d# d $ d, º 1 1 0 ½ 2 2 or, the equivalent system of equations: d þ d æ d 1 1 2 " 4 # " d þ d þ d æ d 1 1 1 2 " 4 # 2 $ # d þ d æ d 1 1 2 # 2 $ $ It is easy to see that any of these three equations can be expressed by the other two, so any of them can be omitted. The remaining two, extended with normalization equation d " þ d # þ d $ æ 1 constitutes a system of three equations with three unknowns, which can be uniquely solved. The solution is: 1 2 2 d æ, d æ, d æ. " 5 # 5 $ 5 12

This means that the color of the container is the color which arises when 20 % red, 40 % yellow and 40 % blue colors are mixed. 9. Example: DIFFUSION MODEL OF EHRENFEST (MOLECULE IS CHOSEN) There are N molecules in a container, which is theoretically divided into two parts, say, left and right. Each time instant one molecule, chosen at random (each has the same probability) is put into the other half of the container. Consider the process defined by 0 t æ the number of molecules in the left side at time instant t µ t æ 0, 1, 2, Æ. It is easy to see that the process is a homogeneous Markov chain. Find the transition probabilities, and show that if the initial distribution is binomial with parameters N and 0.5, then the chain is stationary. Solution. If the process is in state i, then there are i molecules in the left part of the container. Thus, the probability of a transition into state i 1 is equal to and the probability of a transition into state i þ 1 is These formulas can be written also as Any other transition is impossible: i p æ, i,i1 N Ni p æ. i,iþ1 j 1 jþ1,j N j1,j þ µ p æ, and p æ. N N j 1 N pi,j æ 0 if kj ik 1. In order to prove that the distribution N 1 d i æ ê i 2 µ i æ 0, 1, 2, Æ, N N is a stationary absolute distribution, we calculate the j -th element of the matrix product D P, which is N! d p æ d p þ d p iæ1 i i,j j1 j1,j j+1 jþ1,j N Nµ j 1 N jþ1 j 1 2 N j 1 2 N 1 1 æ ê þ ê N þ N N N j 1 N j 1 1 j 1 N j N j 1 N j 1 N 2 N x þ x þ æ ê þ µ x µ þ" x µ þ x µ x 13

N 1 N 1 1 µ j 1 x µ N j x j x µ Nj 1 x 2 N µ x µ x æ ê þ N 1 N 1 1 j 1 j 2 N æ ê ç ü þ ç ü æ ç N 1 j ü 2 N This calculation shows that D P is equal to D, that is, D is really a stationary absolute distribution.. The result of the next example can be used for many Markov chains. 10. Example: STAY OR JUMP ONLY ONTO ADJACENT STATES Let the states of a Markov chain be the non-negative integers or an initial interval of the non-negative integers. Assume that jumps are possible only onto adjacent states, more precisely, p ij æ 0, whenever ki jk ë 1, and p ë 0, whenever ki jk æ 1. ij a) Prove that the stationary absolute distribution µ d!, d ", d #, Æ of the transition matrix satisfies the relations: d" p!" d# p"# d$ p#$ d! p "! d " p #" d # p $# æ, æ, æ, Æ. b) Show that, if the sum p p p p p p p "! p "! p #" p "! p #" p $#!"!" "#!" "# #$ 1 þ þ þ þ Æ is finite, then p!" p!" p"# p!" p"# p#$ d " æ p d!, d # æ p p d!, d $ æ p p p d!, Æ, "! "! #" "! #" $# where!"!" "#!" "# #$ d æ ç 1 þ þ þ þ Æ ü.! p p p p p p p "! p "! p #" p "! p #" p $# 1 Solution. a) Using the fact that p ij æ 0, whenever ki jk ë 1, the equation D æ D P means the following system of equations: d æ d p þ d p!!!! " "! d " æ d! p!" þ d " p "" þ d # p#" d # æ d " p "# þ d # p ## þ d $ p$# d æ d p þ d p þ d p $ # # $ $ $$ % %$ 14

and so on. The first of these equations yields that d! µ 1 p!! æ d " p "!, that is, d! p!" æ d " p "!. Substituting the last equation into the second of the above equations yields that from where d " æ d " p "! þ d " p "" þ d # p #", d µ 1 p p æ d p, that is, d p æ d p. " "! "" # #" " "# # #" Substituting the last equation into the third of the above equations yields that from where d # æ d # p #" þ d # p ## þ d $ p $#, d µ 1 p p æ d p, that is, d p æ d p. # #" ## $ $# # # $ $ $# And so on, we get the sequence of the formulas d p æ d p, d p æ d p, d p æ d p, Æ.!!" " "! " "# # #" # # $ $ $# This sequence of formulas is equivalent to the sequence of formulas we wanted to prove. b) Expressing d, then d, then d, and so on, in terms of d, we get that " # $! p p p p p p " p "!! # p "! p #"! $ p "! p #" p $#!!"!" "#!" "# #$ d æ d, d æ d, d æ d, Æ, Since the distribution µ d, d, d, d, Æ! " # $ should be normalized, the statement follows from the equation p p p p p p "! "! #" "! #" $#!"!" "#!" "# #$ d! ê 1 þ p þ p p þ p p p þ Æ æ 1. 11. Exercise Pretend that the stationary absolute distribution for the Diffusion Model of Ehrenfest were not known. Using the method explained in the previous example, determine the stationary absolute distribution. The next three problems are slight modifications of each other. 12. Example: RANDOM WALK WITH REFLECTIVE BARRIERS A random walk on the states 0, 1, 2, 3 with reflective barriers means that from the endpoints 0 and 3 a jump is possible only into the states 1 and 2, respectively, and for all other states both a left or right jump has a probability p and q, respectively µ p þ q æ 1. Find the transition matrix and the stationary absolute distribution for the symmetric walk, which means p. Solution. The transition matrix is obviously æ 1 2 15

¹ 0 1 0 0 ¼ 1 1 2 0 2 0» 1 1 0 0 ¾ 2 2 º 0 0 1 0 ½ Thus, the system of equations for the stationary absolute distribution is d p æ d p, d p æ d p, d p æ d p!!" " "! " "# # #" # # $ $ $# 1 1 1 1 d æ d, d æ d, d æ d.! 2 " 2 " 2 # 2 # $ Since the stationary absolute distribution should be normalized, the solution is 1 2 2 1 d æ, d æ, d æ, d æ.! 6 " 6 # 6 $ 6 13. Exercise. Find the stationary absolute distribution for the non-symmetric case, too. 14. Example: RANDOM WALK WITH ABSORBING BARRIERS Modify the random walk in the previous problem the following way: from the endpoints 0 and 3 a transition is possible only into themselves, and from all other states both a left or right jump has a probability p and q, respectively µ p þ q æ 1. Find the transition matrix and the stationary absolute distributions. Solution. The transition matrix is obviously ¹ 1 0 0 0 ¼ p 0 q 0» ¾ 0 p 0 q º 0 0 0 1 ½ Thus, the system of equations for the stationary absolute distribution is d p æ d p, d p æ d p, d p æ d p.!!" " "! " "# # #" # # $ $ $# 0 p d, q d p d, q d 0. æ æ æ " " # # 16

This yields that d " æ d # æ 0 and d! and d $ are non-negative numbers whose sum is equal to 1. Realize that the stationary absolute distribution is not unique for this process. 15. Example: RANDOM WALK WITH SEMI-REFLECTIVE BARRIERS Mix the random walks of the previous two problems by assuming that for the endpoints both a jump into the adjacent state and staying at the same endpoint has a probability 0.5, and for all other states both a left and a right jump has a probability 0.5. Find the transition matrix and the stationary absolute distribution. Solution. The transition matrix is obviously 1 1 ¹ 2 2 0 0 ¼ 1 1 2 0 2 0» 1 1 0 ¾ 2 0 2 º 1 1 0 0 ½ 2 2 Thus, the system of equations for the stationary absolute distribution is d p æ d p, d p æ d p, d p æ d p!!" " "! " "# # #" # # $ $ $# d æ d, d æ d, d æ d, 1 1 1 1 1 1 2! 2 " 2 " 2 # 2 # 2 $ which yields that the stationary absolute distribution is the uniform distribution: d! æ d " æ d # æ d $ æ 1 4. 16. Exercise. Find the stationary absolute distribution for the non-symmetric case, too. 6. Recurrence Let f ij µ n denote the conditional probability that starting from state i at time instant 0, the process avoids state j before time instant n, and at time instant n it is in state j. It is clear that the sum f ij _ æ! f µ n næ1 ij is the probability that starting from state i, the process will ever get to state j in the future. As a special case, f ii means the probability that starting from state i, the process will ever return to state i. If f æ 1, then the state is called recurrent. If f 1, then the state i is called non-recurrent. ii ii 17

For a recurrent state i, ç f µ 1, f µ 2, Æ ü is clearly the distribution of the number of steps needed to return into state i, and the finite or infinite number ii ii m æ! n f µ n i _ næ1 clearly means the expected value of steps (or length of time) needed to return into state i in the future. For a non-recurrent state, let m i æ _. The state i is called positive if m i _. If m i æ _, then the state i is called a null state. The names positive and null will become justified by the statement of the theorem bellow which implies that, under some conditions, and lim d i n d 0 if m, n _ µ æ i µ _ ë i _ lim d i n d 0 if m. n _ µ æ i µ _ æ i æ _ ii 17. Example: LUNCH MONEY John keeps some dollars in his schoolbag so that he could pay for his lunch at school every day. The lunch costs one dollar each day. When John s money has gone, then in the evening he asks his father to give him money. In order to generate the amount, his father tosses a special die until the first occurrence of the face with MONEY on it, and then gives his son as many dollars as many tosses were needed. The probability of the occurrence of the face with MONEY is p at each toss. Observing the amount of money John has in his schoolbag in the morning of each school-day, we clearly get a homogeneous, recurrent Markov chain with states 1, 2, 3, Æ and transition matrix ¹ p pq pq ¼ 1 0 0» ¾, 0 1 0 º È É ½ # Æ where q æ 1 p. Clearly, John has to ask for money in the evening of a day if that day he went to school with 1 dollar only. We shall determine the distribution and the expected value of the number of days between the days when John has to ask his father for money, more precisely, we shall determine the distribution ç f µ 1, f µ 2, f µ 3, Æ ü and the expected value m of the number of steps needed to return into "" "" "" " state 1. Solution. A return to state 1 needs n steps if and only if the father tosses MONEY the first time at the n -th n1 toss. Thus, f µ n æ pq µ n æ 1, 2, 3, Æ, that is, ç f µ 1, f µ 2, f µ 3, Æ ü is the geometrical "" "" "" "" distribution with parameter p. As we know well its expected value is m. " æ 1 p 18. Exercise. 18

Determine the distribution and the expected value of the number of days between the mornings when John goes to school with 2 dollars in his bag, more precisely, determine the distribution ç f µ 1, f µ 2, f µ 3, Æ ü and the expected value m of the number of steps needed to return into ## ## ## # state 2. Prove that f ## µ 1 æ 0, and and 1 1 f##µ n æ µ n 1 n if p æ, 2 2 n 1 n 1 f µ n æ! n k k p q 1 p q æ p q if p, ## n1 kæ1 p q 2 µ n æ 2, 3, Æ, and then find a closed formula for m #. 19. Exercise. Find fijµ n and m i for a two-state chain. The number of time instants in the future when the process is in state j on condition that it starts from state i is the sum of an infinite number of indicator random variables: the n-th indicator random variable is equal to 1 if the process is in state j at time instant n, and 0 otherwise. Since the expected value of such a sum is clearly equal to the sum of the parameters of the indicator distributions, we get that the sum g ij _ æ! p µ n næ1 ij can be interpreted as the expected value of the number of time instants in the future when the process is in state j on condition that it starts from state i. Specifically, g jj is the expected value of the number of time instants in the future when the process returns into state j on condition that it starts from state j. It is clear that starting from state i, the probability of stepping onto state j exactly k times in the k-1 future is 1 f ij for k æ 0, and fij µ fjj µ 1 f jj for k æ 1, 2, Æ. The expected value of this distribution is Specifically, when i æ j, we get that g æ. ij f ij 1fjj g æ. jj This relation shows that if fii 1, then g ii _. Equivalently: if g ii æ _, then fii æ 1, that is, state i is recurrent. f jj 1fjj 20. Exercise. Show that g ij æ f ij µ 1 þ g jj. 21. Example: RANDOM WALK ON THE LINE Consider the random walk on the integer numbers of the real line, when the probability of a left or right step is p or q, respectively. Consider a state i. 19

a) Find the n-step transition probability p iiµ n. b) Use the Stirling formula to approximate p iiµ n. c) Using the approximation, prove that the series! p µ n is divergent if p æ q æ 0.5, and convergent otherwise. _ næ1 d) Draw the conclusion about the problem of recurrence or non-recurrence. Solution. a) p n is the probability that starting from state i, the process, n units of time later, is back in i. This is impossible if n is odd. If n is even, and n æ 2N, then a return in 2N steps means that among the 2N steps there are N left and N right steps. The probability of this event is iiµ ii 2N N N p iiµ 2N æ ê N p q. b) The Stirling formula states that N N x š ê 21 N. e N Using this approximation, we get that 2N æ µ x N N 2N N N ê N p q N! p q µ # š 2N 2N ê e 21 2N æ N N 1 p q ç 4pq ü. 2 ê ç ü N 1N N e 21 N N that is, 1 p µ 2N š 1 ç 4pq ü. ii N N c) Using this approximation, we get that _! p n næ1 ii µ is convergent if and only if is convergent. _! 1 ç 4pq ü Næ1 If p q, then this series reduces to æ æ 1 2 1 N N 20

_! Næ1 1 1 N, which is clearly divergent. 1 2 If p, then 4pq 1, and thus is obviously convergent. _! 1 ç 4pq ü Næ1 1 N d) The above investigation shows that the symmetric random walk on the real line is recurrent, and any non-symmetric one is non-recurrent. N 22. Example: SYMMETRIC RANDOM WALK WITH INDEPENDENT COORDINATES ON THE PLANE Consider the symmetrical random walk on the points with integer coordinates on the plane, when the two coordinates of the displacements of the moving bug are independent of each other: both coordinates change by 1 or 1 with probability. Prove that the process is recurrent. þ 1 Solution. 2 For a return into a point on the plane, both coordinates have to return. Since the coordinates are independent, and the probability of a return in n 2N steps is æ 2N N 2 1 ç ü ç ü for the one-dimensional symmetrical random walk, the probability of a return in n 2N 2N 2N ê ç ü ç 1 N 2 ü 2 æ 2N steps is for the two-dimensional symmetrical random walk. In order to show that the process is recurrent, the sum _! 2N 1 ê ç N ü ç 2 ü. Næ1 should be examined. Since this sum is equiconvergent to the sum 2N 2 2! 1 1 ê! 1 1 æ N 1 N Næ1 Næ1, which is divergent, we draw the conclusion that the process is recurrent. SPACE 23. Example: SYMMETRIC RANDOM WALK WITH INDEPENDENT COORDINATES IN THE Consider the symmetrical random walk on the points with integer coordinates in the space, when the three coordinates of the 21

displacements of the moving bug are independent of each other: each coordinate changes by 1 or 1 with probability. Prove that the process is non-recurrent. Solution. 1 2 Knowing the previous problem, it is clear that the series _! 2N 1 ê ç N ü ç 2 ü. Næ1 should be examined. Since this sum is equiconvergent to the sum 2N 3 þ 3! 1 1 ê! 1 1 N Næ1 1 Næ1 N æ $ $ # #, which is convergent, we draw the conclusion that the process is non-recurrent. 7. Irreducibility, Aperiodicity We say that state j is available from state i if the probability of getting ever to j from i is positive: f ij ë 0. This is obviously equivalent to the condition that there exists such an n that p ij µ n ë 0. A Markov chain is called irreducible if all states are available from any state. The period $ i of a state i is the greatest common divisor (abbreviated by g.c.d.) of those step- numbers n for which the return into the state i with n steps has a positive probability: æ g. c. d. è n : p µ n ë 0 ý. $ i ii It can be shown that the period of a state i is $ i if and only if, for any sufficiently large step-number n which is a multiple of $ i, the return into the state i has a positive probability, that is, there exists such a critical stepnumber n, which may depend on i, that p µ n ë 0 whenever n æ k $ and n n.! ii i! A state i is called aperiodic, if its period is equal to 1, that is, there exists a critical step-number n!, which may depend on i, that p iiµ n ë 0 whenever n n!. It can be shown that the properties introduced now either hold simultaneously for all or for none of the states of an irreducible Markov chain. We refer to this fact by saying that these properties are class properties. (The notion of a class is described is the problem entitled Classes of States.) Theorem. (The properties listed below are Class Properties) If an irreducible Markov chain has a recurrent state, then all the states are recurrent. (So the whole chain can be called recurrent.) If an irreducible Markov chain has a positive state, then all the states are positive. µ So the whole chain can be called positive. The period of any two states of an irreducible Markov chain is the same. µ So the whole chain can be assigned a certain period. If an irreducible Markov chain has an aperiodic state, then all the states are aperiodic. µ So the whole chain can be called aperiodic. 22

24. Example: RANDOM WALKS WITH DIFFERENT BARRIERS Examine the random walk on the states 0, 1, 2, 3 with a) reflective, b) absorbing, c) semireflective barriers. Decide which of these Markov chains are irreducible. Find the period of the irreducible ones. Solution. The reader should be convinced that the random walk with reflective barriers is irreducible, and its period is 2. The random walk with absorbing barriers is not irreducible, because from states 0 and 3 none of the other states are available. The random walk with semi-reflective barriers is also irreducible, and its period is 1. Notice that all the above introduced notions with the exception of the absolute distributions and stationarity are related only to the transition matrix of the chain, and are not related to the initial distribution of the chain. Thus, it is meaningful to call a transition matrix recurrent or non-recurrent, positive or null, irreducible, aperiodic. 8. Stability A transition matrix P is called stable if its n -th power, that is, the n -step transition matrix Pµ n, when n _, approaches such a limit matrix that each row of the limit matrix consists of the same, normalized distribution consisting of positive terms: lim p ij n p 0 i, j 1, 2,, n _ µ æ j µ _ ë µ æ Æ _! p µ _ æ 1. jæ1 j A transition matrix P is called transient if its n -th power, that is, the n -step transition matrix Pµ n, when n _, approaches the 0 matrix: lim p ij n p 0 i, j 1, 2,. n _ µ æ j µ _ æ µ æ Æ A Markov chain is called stable if the n -th absolute distribution Dµ n, when n _, approaches a normalized distribution consisting of positive terms: lim d j n d 0 j 1, 2,, n _ µ æ j µ _ ë µ æ Æ _! d µ _ æ 1. jæ1 j A Markov chain is called transient if the n -th absolute distribution Dµ n, when n _, approaches the 0 vector: lim d j n d 0 j 1, 2,. n _ µ æ j µ _ æ µ æ Æ The following theorem describes the asymptotic behavior of irreducible, aperiodic Markov chains. 23

hold: Theorem. (Limit Theorem for Markov Chains) 1. (For Finite Markov Chains) For an irreducible, aperiodic Markov chain with a finite number of states the following statements i) The chain is a positive chain, that is, m j _ for all j. ii) The transition matrix as well as the chain itself are stable, and the limit of the transition and absolute probabilities is equal to the reciprocal of the average return times: lim p n p lim d n d i, j 1, 2,. n _ µ æ µ_ æ n _ µ æ µ_ æ 1 ij j j j m µ æ Æ j iii) There is a unique normalized distribution D solving the equation D æ D P, namely, 1 1 D æ µ,, Æ m m " # is the only stationary absolute distribution for the transition matrix. 2. (For Infinite Markov Chains) An irreducible, aperiodic Markov chain with an infinite number of states is either i) a positive chain, that is, m j _ for all j, and ii) the transition matrix as well as the chain itself are stable, and the limit of the transition and absolute probabilities is equal to the reciprocal of the average return times: lim p n p lim d n d i, j 1, 2,, and n _ µ æ µ_ æ n _ µ æ µ_ æ 1 ij j j j m µ æ Æ j iii) there is a unique normalized distribution D solving the equation D æ D P, namely, 1 1 D æ µ,, Æ m m " # is the only stationary absolute distribution for the transition matrix, or i) a null chain, that is, m j æ _ for all j, and ii) the transition matrix as well as the chain itself are transient: lim p ij n p lim d n d 0 i, j 1, 2,, and n _ µ æ j µ_ æ j n _ µ æ j µ_ æ µ æ Æ iii) there is no normalized solution D to the equation D æ D P, and thus, no stationary absolute distribution exists for the transition matrix. Proof. We shall prove only the statement for finite Markov chains. (See the last section of this chapter and the problem entitled Average Return Time æ Reciprocal of Limit Probability.) 24

only. One can check the statement of the theorem for the very special Markov chains consisting of two states 25. Example: TWO-STATE MARKOV CHAINS (continued) ASYMPTOTIC BEHAVIOR Solution. We calculated that, if at least one of a and b differs from 0, then b a n p"" µ n æ aþb þ aþb µ 1 a b, a a n p"# µ n æ aþb aþb µ 1 a b, b b n p#" µ n æ aþb aþb µ 1 a b, a b n p## µ n æ aþb þ aþb µ 1 a b. If, moreover, at least one of a and b differs not only from 0, but from 1 as well, then k1 a b k 1, n which guarantees that µ 1 a b 0, when n _, that is, lim P n. n _ µ æ aþb aþb ï b a ð aþb aþb b a Such a chain is stable. If a æ b æ 0, then obviously p"" µ n æ 1, p"# µ n æ 0, p# " µ n æ 0, p## µ n æ 1, that is Pµ n is the unit matrix for all n. Such a chain is not irreducible. If a æ b æ 1, then the chain is not aperiodic, because its period is obviously equal to 2. 26. Example: RANDOM WALK ON THE POSITIVE HALF OF THE REAL LINE The states of this random walk are the non-negative integers. From any state i, except 0, a left or a right jump has a probability pi, i1 æ p and pi, iþ1 æ q, respectively µ p, q ë 0, p þ q æ 1. Staying in 0 has a probability p!,! æ p, and the probability of a right jump from 0 is p!," æ q. This Markov chain is clearly irreducible and aperiodic. Thus, according to the above theorem, it is either stable, or instable. Decide how stability or instability depends on the parameter p. Solution. Let s try to decide whether, for a given value of p, stationary absolute distribution exists or does not exist. Since a jump is possible only onto adjacent states (see problem entitled Stay or Jump Only onto Adjacent States ), the relations d" p, d# p, d$ p, d p, d p, d p,! " " # # $ æ, æ, æ, Æ! "! " # " # $ # should hold for the stationary absolute distribution µ d!, d ", d #, Æ. Since the right side of each of these q relations is equal to p, the sequence d!, d ", d #, Æ constitutes a geometrical sequence: q p n d 8 æ d! ç ü µ n æ 0, 1, 2 Æ. 25

1 Thus, the distribution µ d!, d ", d #, Æ is normalizable if and only if p 1, that is, if and only if p ë 2. This means that the chain has a stationary absolute distribution and it is stable if and only if p. Remark. Use your common sense to realize that this result is quite natural. 27. Example: DIFFUSION MODEL OF BERNOULLI (continued) Recall the model. Assume now that initially all the N red molecules are in the left side. After a long time you look at the system, and count the number of red molecules in the left side. What can you say about the distribution of this random variable? Solution. The chain is irreducible and aperiodic. (Check why.) The limit lim d j n d n _ µ æ j µ_ µ j æ 0, 1, 2, Æ, of the absolute distribution is the stationary absolute distribution, which, as we calculated, is the hypergeometrical distribution with parameters 2N, N, N. Thus, the random variable in question is distributed approximately according to this distribution, that is, observing the system at a large time instant q ë 1 2 N N ç ü ç ü j N j Pr µ there are j red molecules in the left side æ µ j æ 0, 1, 2, Æ, N. ç 2N N ü 28. Exercise: DIFFUSION MODEL OF EHRENFEST (continued) Recall the model. Assume now that initially a) all the molecules are in the left side; b) the number of balls at the left side is distributed according to an initial distribution D µ 0 æ ç d µ 0, d µ 0, Æ ü. " # Realize that the chain is irreducible but not aperiodic, because the period is 2. After a long time you look at the system, and count the number of molecules in the left side. What can you say about the distribution of this random variable? 9. Reducible, Periodic Markov Chains In order to describe non-irreducible or periodic Markov chains, the phase space should be partitioned into classes and sub-classes. By definition, two different states i and j belong to the same class, if the two states are communicating with each other, which means that both f ij and f ji are positive. It can be shown that the periods of states belonging to the same class are equal, so a class can be assigned a period. If the period of a class C is $, then the class can be cyclically ordered into $ sub-classes C ", Æ, C $ so that, for any two states i and j belonging to the class, p ë 0 holds only if the sub-class of j follows the sub-class of i in the cyclic order on the sub-classes C,, C. " Æ $ ij By means of these notions, the above theorems can be generalized. We omit this generalization. (For more detail see problems entitled Classes of States and Recurrence and Positivity as Class Properties.) 26

10. Foster s Criterion for Stability The following theorem offers a sufficient condition for the stability of a type of Markov chains which often occurs in applications. If a Markov chain is at a state i, and then jumps from i onto j, then the difference j i is called the move from i. Clearly, the mean value of the move, called average move, from i is! µ j i p, or equivalently, ç! j p ü i. j ij Let the states of the homogeneous Markov chain 0!, 0", 0#, Æ be the nonnegative integers. Suppose that the chain is irreducible and aperiodic. Assume that the average move from any state i is finite. Assume also that there exist such a critical state I and such a negative number $ that the average move from any state larger than I is less than : $! µ j i p é $ µ i ë I. We shall prove that under these conditions the chain is stable. Remark. j ij The above assumptions can be verbalized by saying that "the average move from any state is finite, and the average move from sufficiently large states is strictly negative". This interpretation may make the statement quite plausible. Proof. If the chain were not stable but transient, then the limit of P µ 0n é J, when n _, would be 0 for all J. We shall show that the limit of P µ 0n é I, when n _, is positive. Let us suppose that, on the contrary, lim P I 0. We show that this assumption leads to a contradiction. n _ µ é æ 0 n Let us denote the maximum of! j µ p i µ i æ 0, 1, Æ I by C. We shall analyze the sequence of the expected values of the absolute distributions The following argument should be clear: Taking the difference, we get that j ij m æ! i d µ n µ n æ 1, 2, Æ n i i m æ! j d µ n þ 1 æ! j ç! d µ n p ü æ n+1 j i ij j j i æ! d µ n ç! j p i i m m æ! d µ n ç! µ j i p ü æ n+1 n i ij i j æ! d i µ n ç! µ j i p ijü þ! d i µ n ç! µ j i pijü iéi j iëi j j j ij ü ij 27

For i é I,! µ j i p é C, and for i ë I,! µ j i p é. Thus j ij ij $ j mn+1 m n é ê! d i µ n C þ ê! d i µ n ç $ ü. iéi iëi Since we assumed that lim P I 0, we get n _ µ é æ 0 n These yield that for sufficiently large n ê! $ d n C, and ê! d n ç ü 3 i µ é 4 i µ $ é $ 4. iéi iëi mn+1 m n é $ 2. This implies that m _ contradicting to the fact 0. n 0 n 11. Stability of the Length of the Queue Let the random variables 0! and )", )#, Æ and (", (#, Æ be independent, nonnegative integer valued random variables, and let each of the sequences )", )#, Æ and (", (#, Æ consist of identically distributed random variables. Define the process 0!, 0", 0#, Æ by recursion: n æ µ n 1 n þ þ n µ n æ 1, 2, Æ, 0 0 ) ( where µ x þ means the positive part of x, that is, x if x is positive, and 0 if x is zero or negative. Clearly, the process 0!, 0", 0#, Æ is a homogeneous Markov chain with states 0, 1, 2, Æ. The random variable 0n can be interpreted as the length of a queue at time instant n, if )", )#, Æ mean the capacity of the shop to serve customers during each time interval, and (", (#, Æ mean how many customers arrive to the shop during each time interval. The formula for 0 n expresses the assumption that the ( n customers arriving between the time instants n 1 and n are not served before the time instant n, even if the capacity )n of the shop exceeds the length of the queue. 0n1 Theorem. (Sufficient Condition for the Stability of the Length of the Queue) Suppose that the homogeneous Markov chain 0!, 0", 0#, Æ defined above is irreducible and aperiodic. If, moreover, M µ (" M µ )" _, then the conditions of the Foster criterion hold, and thus, the process 0!, 0", 0#, Æ is stable. Remark. Heuristically the statement about the stability of the length of the queue is clear, since the assumption M µ (" M µ )" means that the capacity of the shop to serve customers is greater than the average number of the arriving customers. Proof. It is clear that that the move from state i can be written like this: µ i ) þ ( i æ ( min µ i, ) " + 1 1 1 28