STOCHASTIC PROCESSES Basic notions

Similar documents
8. Statistical Equilibrium and Classification of States: Discrete Time Markov Chains

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

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

Markov Chains (Part 3)

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

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

MATH 56A: STOCHASTIC PROCESSES CHAPTER 1

Markov Chains. Sarah Filippi Department of Statistics TA: Luke Kelly

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

Markov Chains, Stochastic Processes, and Matrix Decompositions

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

Lecture 20 : Markov Chains

Markov Chains (Part 4)

Lecture 9 Classification of States

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

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

2 Discrete-Time Markov Chains

Markov Processes Hamid R. Rabiee

SMSTC (2007/08) Probability.

ISE/OR 760 Applied Stochastic Modeling

Part I Stochastic variables and Markov chains

The Transition Probability Function P ij (t)

Discrete Markov Chain. Theory and use

Stochastic Models: Markov Chains and their Generalizations

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

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

MARKOV PROCESSES. Valerio Di Valerio

= P{X 0. = i} (1) If the MC has stationary transition probabilities then, = i} = P{X n+1

Markov Chains and Stochastic Sampling

Classification of Countable State Markov Chains

Stochastic processes. MAS275 Probability Modelling. Introduction and Markov chains. Continuous time. Markov property

STAT STOCHASTIC PROCESSES. Contents

Markov Chains Handout for Stat 110

MATH 56A: STOCHASTIC PROCESSES CHAPTER 2

ISM206 Lecture, May 12, 2005 Markov Chain

INTRODUCTION TO MARKOV CHAINS AND MARKOV CHAIN MIXING

Markov Chain Model for ALOHA protocol

Winter 2019 Math 106 Topics in Applied Mathematics. Lecture 9: Markov Chain Monte Carlo

Markov chains. 1 Discrete time Markov chains. c A. J. Ganesh, University of Bristol, 2015

Advanced Computer Networks Lecture 2. Markov Processes

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

Countable state discrete time Markov Chains

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

Probability, Random Processes and Inference

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

Markov chain Monte Carlo

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

Non-homogeneous random walks on a semi-infinite strip

Course 495: Advanced Statistical Machine Learning/Pattern Recognition

Reinforcement Learning

ISyE 6650 Probabilistic Models Fall 2007

18.175: Lecture 30 Markov chains

Lecture 7. µ(x)f(x). When µ is a probability measure, we say µ is a stationary distribution.

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

Chapter 7. Markov chain background. 7.1 Finite state space

On asymptotic behavior of a finite Markov chain

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

Data analysis and stochastic modeling

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

18.600: Lecture 32 Markov Chains

Markov Chain Monte Carlo

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

TMA 4265 Stochastic Processes Semester project, fall 2014 Student number and

Statistics 150: Spring 2007

The Theory behind PageRank

12 Markov chains The Markov property

18.440: Lecture 33 Markov Chains

Discrete time Markov chains. Discrete Time Markov Chains, Definition and classification. Probability axioms and first results

LECTURE 3. Last time:

Question Points Score Total: 70

Stochastic Processes

Chapter 2: Markov Chains and Queues in Discrete Time

Transience: Whereas a finite closed communication class must be recurrent, an infinite closed communication class can be transient:

IEOR 6711: Professor Whitt. Introduction to Markov Chains

Markov Chains. Arnoldo Frigessi Bernd Heidergott November 4, 2015

Stochastic Modelling Unit 1: Markov chain models

Markov Chains. Contents

25.1 Ergodicity and Metric Transitivity

2. Transience and Recurrence

Convex Optimization CMU-10725

An Introduction to Entropy and Subshifts of. Finite Type

Lecture 3: Markov chains.

Statistics 992 Continuous-time Markov Chains Spring 2004

STA 294: Stochastic Processes & Bayesian Nonparametrics

Summary of Results on Markov Chains. Abstract

Homework set 3 - Solutions

Markov processes and queueing networks

MATH 56A SPRING 2008 STOCHASTIC PROCESSES 65

Markov Chains for Everybody

Markov Model. Model representing the different resident states of a system, and the transitions between the different states

LTCC. Exercises solutions

6 Markov Chain Monte Carlo (MCMC)

Stochastic Processes (Week 6)

1 Random walks: an introduction

FINITE MARKOV CHAINS

LECTURE #6 BIRTH-DEATH PROCESS

Section Notes 9. Midterm 2 Review. Applied Math / Engineering Sciences 121. Week of December 3, 2018


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

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

Transcription:

J. Virtamo 38.3143 Queueing Theory / Stochastic processes 1 STOCHASTIC PROCESSES Basic notions Often the systems we consider evolve in time and we are interested in their dynamic behaviour, usually involving some randomness. the length of a queue the number of students passing the course S-38.143 each year the temperature outside the number of data packets in a network A stochastic process X t (or X(t)) is a family of random variables indexed by a parameter t (usually the time). Formally, a stochastic process is a mapping from the sample space S to functions of t. With each element e of S is associated a function X t (e). For a given value of e, X t (e) is a function of time For a given value of t, X t (e) is a random variable ( a lottery ticket e with a plot of a function is drawn from a urn ) For a given value of e and t, X t (e) is a (fixed) number The function X t (e) associated with a given value e is called the realization of the stochastic process (also trajectory or sample path).

J. Virtamo 38.3143 Queueing Theory / Stochastic processes 2 State space: the set of possible values of X t Parameter space: the set of values of t Stochastic processes can be classified according to whether these spaces are discrete or continuous: State space Parameter space Discrete Continuous Discrete Continuous According to the type of the parameter space one speaks about discrete time or continuous time stochastic processes. Discrete time stochastic processes are also called random sequences.

J. Virtamo 38.3143 Queueing Theory / Stochastic processes 3 In considering stochastic processes we are often interested in quantities like: Time-dependent distribution: defines the probability that X t takes a value in a particular subset of S at a given instant t Stationary distribution: defines the probability that X t takes a value in a particular subset of S as t (assuming the limit exists) The relationships between X s and X t for different times s and t (e.g. covariance or correlation of X s and X t ) Hitting probability: the probability that a given state is S will ever be entered First passage time: the instant at which the stochastic process first time enters a given state or set of states starting from a given initial state

J. Virtamo 38.3143 Queueing Theory / Stochastic processes 4 The n th order statistics of a stochastic process X t is defined by the joint distribution F Xt1,...,X t n (x 1,..., x n ) = P{X t1 x 1,..., X tn x n } for all possible sets {t 1,..., t n }. A complete characterization of a stochastic process X t requires knowing the stochastics of the process of all orders n. 1 st order statistics: Stationary distribution F(x) = lim t P{X t x} Expectation (at time t) X t = E[X t ] 2 nd order statistics: Covariance (autocovariance) R t,s = E[(X t X t )(X s X s )]

J. Virtamo 38.3143 Queueing Theory / Stochastic processes 5 Stationary process The statistics of all the orders are unchanged by a shift in the time axis F Xt1 +τ,...,x t n+τ (x 1,..., x n ) = F Xt1,...,X t n (x 1,..., x n ) n, t 1,..., t n Stationarity in wide sense X t = constant, R t+τ,s+τ = R t,s τ, 1 st and 2 nd order statistics are translation invariant Process of stationary increments X t+τ X t is a stationarity process τ Process of independent increments X t2 X t1,..., X tn X tn 1 are independent t 1 < t 2 < < t n Ergodic process The whole statistics of the process can be determined from a single (infinitely long) realization.

J. Virtamo 38.3143 Queueing Theory / Stochastic processes 6 Markov process A stochastic process is called a Markov process when it has the Markov property: P{X tn x n X tn 1 = x n 1,...X t1 = x 1 } = P{X tn x n X tn 1 = x n 1 } n, t 1 < < t n The future path of a Markov process, given its current state (X tn 1 ) and the past history before t n 1, depends only on the current state (not on how this state has been reached). The current state contains all the information (summary of the past) that is needed to characterize the future (stochastic) behaviour of the process. Given the state of the process at an instant its future and past are independent. Example A process with independent increments is always a Markov process. X tn = X tn 1 + (X tn X tn 1 ) }{{} the increment is independent of all the previous increments which have given rise to the state X tn 1

J. Virtamo 38.3143 Queueing Theory / Stochastic processes 7 Markov chain The use of the term Markov chain in the literature is ambiguous: it defines that the process is either a discrete time or a discrete state process. In the sequel, we limit the use of the term for the case where the process is both discrete time and discrete state. Without loss of generality we can index the discrete instants of time by integers. A Markov chain is thus a process X n, n = 0, 1,.... Similarly we can denote the states of the system by integers X n = 0, 1,... (the set of states can be finite or countably finite). In the following we additionally assume that the process is time homogeneous. A Markov process of this kind is characterized by the (one-step) transition probabilities (transition from state i to state j): p i,j = P{X n = j X n 1 = i} time homogeneity: the transition probability does not depend on n

J. Virtamo 38.3143 Queueing Theory / Stochastic processes 8 The probability of a path The probability of a path i 0, i 1,..., i n is Proof P{X 0 = i 0,..., X n = i n } = P{X 0 = i 0 } p i0,i 1 p i1,i 2 p in 1,i n P{X 0 = i 0, X 1 = i 1 } = P{X 1 = i 1 X 0 = i 0 } P{X 0 = i 0 } }{{} p i0,i 1 P{X 0 = i 0, X 1 = i 1, X 2 = i 2 } = P{X 2 = i 2 X 1 = i 1, X 0 = i 0 } P{X 1 = i 1, X 0 = i 0 } }{{}}{{} p i1,i 2 p i0,i 1 P{X 0 = i 0 } = P{X 0 = i 0 } p i0,i 1 p i1,i 2 Similarly, the proof can be continued for longer sequences. P{X 0 = i 0 } i 0 }{{} p i0,i 1 p i1,i 2 p i2,i 3 i 1 }{{} i 2 }{{} i 3

J. Virtamo 38.3143 Queueing Theory / Stochastic processes 9 The transition probability matrix of a Markov chain The transition probabilities can be arranged as transition probability matrix P = (p i,j ) P = final state p 0,0 p 0,1 p 0,2... p 1,0 p 1,1 p 1,2......... initial state The row i contains the transition probabilities from state i to other states. since the system always goes to some state, the sum of the row probabilities is 1 A matrix with non-negative elements such that the sum of each row equals 1 is called a stochastic matrix. One can easily show that the product of two stochastic matrices is a stochastic matrix.

J. Virtamo 38.3143 Queueing Theory / Stochastic processes 10 Many-step transition probability matrix The probability that the system, initially in state i, will in state j after two steps is k p i,k p k,j (takes into account all paths via an intermediate state k). i k j Clearly this the element {i, j} of the matrix P 2. Similarly, one finds that the n-step transition probability matrix P n. Denote its elements by p (n) i,j (the subscript refers to the number of steps). Since it holds that P n = P m P n m (0 m n), we can write in component form p (n) i,j = k p (m) i,k p (n m) k,j the Chapman-Kolmogorov equation This simply expresses the law of total probability, where the transition in n steps from state i to state j is conditioned on the system being in state k after m steps.

J. Virtamo 38.3143 Queueing Theory / Stochastic processes 11 State probabilities Denote π (n) i = P{X n = i} the probability that the process is in state i at time n Arrange the state probabilities at time n in a state probability vector π (n) = (π (n) 0, π (n) 1, π (n) 2,...) By the law of total probability we have P{X 1 = i} = k P{X 1 = i X 0 = k}p{x 0 = k} or π (1) i = k π (0) k p k,i and in vector form π (1) = π (0) P As the process is Markovian and π (1) represents the initial probabilities in the next step, π (2) = π (1) P and generally π (n) = π (n 1) P from which we have recursively π (n) = π (0) P n (Note, P n is the n-step transition probability matrix.)

J. Virtamo 38.3143 Queueing Theory / Stochastic processes 12 Example P = P = 1 9 P 2 = 1 9 2 P 3 = 1 9 3. P 8 = 1 p p(1 p) p 2 1 p p(1 p) p 2 0 1 p p 6 2 1 6 2 1 0 6 3 48 22 11 48 22 11 36 30 15 = 420 206 103 420 206 103 396 222 111 = = p = 1/3 1-p 0.6666 0.2222 0.1111 0.6666 0.2222 0.1111 0 0.6666 0.3333 0.5926 0.2716 0.1358 0.5926 0.2716 0.1358 0.4444 0.3704 0.1852 0.5761 0.2826 0.1413 0.5761 0.2826 0.1413 0.5432 0.3045 0.1523 0.5714 0.2857 0.1429 0.5714 0.2857 0.1429 0.5714 0.2857 0.1429 0 p(1-p) 1-p p 2 1-p 1 2 p(1-p) Starting from an initial state i, the distribution of the final state can be read from the row i. After 8 steps the final state distribution is independent of the initial state (to the accuracy of four digits): the process forgets its initial state. p 2 p

J. Virtamo 38.3143 Queueing Theory / Stochastic processes 13 Classification of states of a Markov chain State i leads to state j (written i j), if there is a path i 0 = i, i 1,..., i n = j such that all the transition probabilities are positive, p ik,i k+1 > 0, k = 0,..., n 1. Then (P n ) i,j > 0. States i and j communicate (written i j), if i j and j i. i=i 0 i 1 i 2 i 3 j=i n Communication is an equivalence relation: the states can be grouped into equivalent classes so that within each class all the states communicate with each other two states from two different classes never communicate which each other The equivalence classes defined by the relation are called the irreducible classes of states A Markov chain with a state space which is an irreducible class (the only one, i.e. all the states communicate) is called irreducible. i... j

J. Virtamo 38.3143 Queueing Theory / Stochastic processes 14 Classification of states (continued) A set of states is closed, if none of its states leads to any of the states outside the set. A single state which alone forms a closed set is called an absorbing state - for an absorbing state we have p i,i = 1 - one may reach an absorbing state from other states, but one cannot get out of it Each state is either transient or recurrent. A state i is transient if the probability of returning to the state is < 1. i.e. there is a non-zero probability that the system never returns to the state. A state i is recurrent if the probability of returning to the state is = 1. i.e. with certainty, the system sometimes returns to the state. Recurrent states are further classified according to the expectation of the time T i,i 1 it takes to return to the state: positive recurrent expectation of first return time < null recurrent expectation of first return time = 1 The first return time T i,i of state i is the time at which the Markov chain first returns to state i when X 0 = i.

J. Virtamo 38.3143 Queueing Theory / Stochastic processes 15 Classification of states (continued) Type # of visits E[T i,i ] Transient < Null recurrent Positive recurrent < If the first return time of state i can only be a multiple of an integer d > 1 the state i is called periodic. Otherwise the state is aperiodic. An aperiodic positive recurrent state is ergodic A Markov chain is ergodic, iff all its states are ergodic. 3 4 5 jaksoton positiivisesti palautuva 0 1 2 absorboiva transientti jaksollinen 6 7 n 8...

J. Virtamo 38.3143 Queueing Theory / Stochastic processes 16 Classification of states (continued) Proposition: In an irreducible Markov chain either - all the states are transient, or - all the states are null recurrent, or - all the states are positive recurrent Remarks on the life time of a state and the first return time The number of steps the system consecutively stays in state i is geometrically distributed Geom(1 p i,i ) because the exit from the state occurs with the probability 1 p i,i. i p i, i 1- p i, i After each visit of state i, the first return time T i,i back to state i is independent of the first return times after any of the other visits to the state (follows from the Markov property). Denote T if the state is transient or null recurrent i = E[T i,i ] Ti = < if the state is positive recurrent

J. Virtamo 38.3143 Queueing Theory / Stochastic processes 17 Kolmogorov s theorem In an irreducible, aperiodic Markov chain there always exist the limits π j = n lim π (n) j = 1/ T j and these are independent of the initial state. Furthermore, either i) all the states of the chain are transient or all of the states are null recurrent; in either case π j = 0, j, or ii) all the states of the chain are positive recurrent, and there exists a unique stationary distribution π which is obtained as the solution of the equations π = π P π e T = 1 or π j = π i p i,j and π j = 1 i j (e is a row vector with all the components equal to 1, and e T is the corresponding column vector)

J. Virtamo 38.3143 Queueing Theory / Stochastic processes 18 Remarks on the stationary distribution If the limit probabilities (the components of the vector) π exist, they must satisfy the equation π = πp, because π = lim n π (n) = lim n π (n+1) = lim n π (n) P = πp The equation π = πp can also be expressed in the form: π is the (left) eigenvector of the matrix P belonging to the eigenvalue 1 (or belonging to the eigenvalue 0 of the matrix (P I)). π j defines which proportion of time (steps) the system stays in state j. The limit distribution π is called the stationary distribution or the equilibrium distribution Note. An equilibrium does not mean that nothing happens in the system, but merely that the information on the initial state of the system has been forgot or washed out because of the stochastic development.

J. Virtamo 38.3143 Queueing Theory / Stochastic processes 19 Global balance Equation π = πp or π j = π i p i,j, j, is often called the (global) balance condition. i Since p j,i = 1 (the transition takes the system to some state), one can write i π j p j,i i }{{} prob. that the system is in state j and makes a transition to another state = π i p i,j i }{{} prob. that the system is in another state and makes a transition to state j One equation for each state j. Balance of probability flows: there are as many exits form state j as there are entries to it. j = j If the balance equations are known to be satisfied for all but one of the states, they are automatically satisfied also for that particular state (due to conservation of probability flows) the balance equations are linearly dependent ( the homogeneous equation π = πp has a non-zero solution) the solution is determined up to a constant factor in order to determine the unknown factor, one needs the normalization condition j π j = 1

J. Virtamo 38.3143 Queueing Theory / Stochastic processes 20 Example. We revisit the previous example (now with a general p). (π 0 π 1 π 2 ) = (π 0 π 1 π 2 ) 1 p p(1 p) p 2 1 p p(1 p) p 2 0 1 p p Write the first two equations (equalities of the first two components of the vectors on the lhs and rhs) π 0 = (1 p)π 0 + (1 p)π 1 π 0 = 1 p p π 1 π 1 = p(1 p)π 0 + p(1 p)π 1 + (1 p)π 2 = (1 p) 2 π 1 + p(1 p)π 1 + (1 p)π 2 or = (1 p)π 1 + (1 p)π 2 π 1 = 1 p p π 2 π 0 = ( 1 p ) 2 p π2 π = ( ( ) 1 p 2 1 p p p 1 ) π 2. By the normalization condition π 0 + π 1 + π 2 = 1 one gets π = ( (1 p) 2 1 p(1 p) p(1 p) 1 p(1 p) p 2 1 p(1 p) ) With p = 1 3 : π = ( 0.5714 0.2857 0.1429 )

J. Virtamo 38.3143 Queueing Theory / Stochastic processes 21 On solving the balance (or equilibrium) equations In general, the equilibrium equations are solved as follows (assume a finite state space with n states): Write the balance condition for all but one of the states (n 1 equations) the equations fix the relative values of the equilibrium probabilities the solution is determined up to a constant factor The last balance equation (automatically satisfied) is replaced by the normalization condition j π j = 1. For calculation by a computer, it s often more convenient to use the following method (usually, one construct the whole transition probability matrix P): Write n copies of the normalization condition π e T = 1: π E = e where E is an n n-matrix with all the elements equal to 1, E = Add this equation and the balance equation π P = π π (P + E I) = e π = e (P + E I) 1 1 1... 1........ 1 1... 1 The inhomogeneous equation has a unique solution. The solution automatically satisfies both the balance and the normalization conditions.