Chapter 17 Markov Chains.

Slides:



Advertisements
Similar presentations
Discrete time Markov Chain
Advertisements

1 Introduction to Discrete-Time Markov Chain. 2 Motivation  many dependent systems, e.g.,  inventory across periods  state of a machine  customers.
. Markov Chains. 2 Dependencies along the genome In previous classes we assumed every letter in a sequence is sampled randomly from some distribution.
Many useful applications, especially in queueing systems, inventory management, and reliability analysis. A connection between discrete time Markov chains.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 4. Discrete Probability Distributions Section 4.11: Markov Chains Jiaping Wang Department of Mathematical.
CS433 Modeling and Simulation Lecture 06 – Part 03 Discrete Markov Chains Dr. Anis Koubâa 12 Apr 2009 Al-Imam Mohammad Ibn Saud University.
Operations Research: Applications and Algorithms
Markov Chains.
1 Chapter 5 Continuous time Markov Chains Learning objectives : Introduce continuous time Markov Chain Model manufacturing systems using Markov Chain Able.
IERG5300 Tutorial 1 Discrete-time Markov Chain
Operations Research: Applications and Algorithms
. Computational Genomics Lecture 7c Hidden Markov Models (HMMs) © Ydo Wexler & Dan Geiger (Technion) and by Nir Friedman (HU) Modified by Benny Chor (TAU)
. Hidden Markov Models - HMM Tutorial #5 © Ydo Wexler & Dan Geiger.
Topics Review of DTMC Classification of states Economic analysis
11 - Markov Chains Jim Vallandingham.
Lecture 12 – Discrete-Time Markov Chains
TCOM 501: Networking Theory & Fundamentals
G12: Management Science Markov Chains.
Flows and Networks (158052) Richard Boucherie Stochastische Operations Research -- TW wwwhome.math.utwente.nl/~boucherierj/onderwijs/158052/ html.
1 Part III Markov Chains & Queueing Systems 10.Discrete-Time Markov Chains 11.Stationary Distributions & Limiting Probabilities 12.State Classification.
Андрей Андреевич Марков. Markov Chains Graduate Seminar in Applied Statistics Presented by Matthias Theubert Never look behind you…
Markov Processes MBAP 6100 & EMEN 5600 Survey of Operations Research Professor Stephen Lawrence Leeds School of Business University of Colorado Boulder,
Entropy Rates of a Stochastic Process
To accompany Quantitative Analysis for Management, 9e by Render/Stair/Hanna 16-1 © 2006 by Prentice Hall, Inc. Upper Saddle River, NJ Chapter 16.
Markov Chain Part 2 多媒體系統研究群 指導老師:林朝興 博士 學生:鄭義繼. Outline Review Classification of States of a Markov Chain First passage times Absorbing States.
Operations Research: Applications and Algorithms
INDR 343 Problem Session
Stochastic Processes Dr. Nur Aini Masruroh. Stochastic process X(t) is the state of the process (measurable characteristic of interest) at time t the.
Lecture 13 – Continuous-Time Markov Chains
Markov Analysis Chapter 16
048866: Packet Switch Architectures Dr. Isaac Keslassy Electrical Engineering, Technion Review.
Chapter 4: Stochastic Processes Poisson Processes and Markov Chains
If time is continuous we cannot write down the simultaneous distribution of X(t) for all t. Rather, we pick n, t 1,...,t n and write down probabilities.
1 Markov Chains Algorithms in Computational Biology Spring 2006 Slides were edited by Itai Sharon from Dan Geiger and Ydo Wexler.
Finite Mathematics & Its Applications, 10/e by Goldstein/Schneider/SiegelCopyright © 2010 Pearson Education, Inc. 1 of 60 Chapter 8 Markov Processes.
Markov Chains Chapter 16.
Stochastic Process1 Indexed collection of random variables {X t } t   for each t  T  X t is a random variable T = Index Set State Space = range.
CS6800 Advanced Theory of Computation Fall 2012 Vinay B Gavirangaswamy
1 Introduction to Stochastic Models GSLM Outline  discrete-time Markov chain  motivation  example  transient behavior.
Lecture 11 – Stochastic Processes
The effect of New Links on Google Pagerank By Hui Xie Apr, 07.
6. Markov Chain. State Space The state space is the set of values a random variable X can take. E.g.: integer 1 to 6 in a dice experiment, or the locations.
Business Modeling Lecturer: Ing. Martina Hanová, PhD.
Decision Making in Robots and Autonomous Agents Decision Making in Robots and Autonomous Agents The Markov Decision Process (MDP) model Subramanian Ramamoorthy.
A discrete-time Markov Chain consists of random variables X n for n = 0, 1, 2, 3, …, where the possible values for each X n are the integers 0, 1, 2, …,
Markov Chains X(t) is a Markov Process if, for arbitrary times t1 < t2 < < tk < tk+1 If X(t) is discrete-valued If X(t) is continuous-valued i.e.
Chapter 61 Continuous Time Markov Chains Birth and Death Processes,Transition Probability Function, Kolmogorov Equations, Limiting Probabilities, Uniformization.
Courtesy of J. Akinpelu, Anis Koubâa, Y. Wexler, & D. Geiger
Chapter 3 : Problems 7, 11, 14 Chapter 4 : Problems 5, 6, 14 Due date : Monday, March 15, 2004 Assignment 3.
© 2015 McGraw-Hill Education. All rights reserved. Chapter 19 Markov Decision Processes.
8/14/04J. Bard and J. W. Barnes Operations Research Models and Methods Copyright All rights reserved Lecture 12 – Discrete-Time Markov Chains Topics.
CS433 Modeling and Simulation Lecture 07 – Part 01 Continuous Markov Chains Dr. Anis Koubâa 14 Dec 2008 Al-Imam.
Discrete Time Markov Chains
1 Resource-Constrained Multiple Product System & Stochastic Inventory Model Prof. Yuan-Shyi Peter Chiu Feb Material Management Class Note #4.
Flows and Networks (158052) Richard Boucherie Stochastische Operations Research -- TW wwwhome.math.utwente.nl/~boucherierj/onderwijs/158052/ html.
CS433 Modeling and Simulation Lecture 11 Continuous Markov Chains Dr. Anis Koubâa 01 May 2009 Al-Imam Mohammad Ibn Saud University.
Stochastic Processes and Transition Probabilities D Nagesh Kumar, IISc Water Resources Planning and Management: M6L5 Stochastic Optimization.
11. Markov Chains (MCs) 2 Courtesy of J. Bard, L. Page, and J. Heyl.
Markov Processes What is a Markov Process?
8/14/04J. Bard and J. W. Barnes Operations Research Models and Methods Copyright All rights reserved Lecture 11 – Stochastic Processes Topics Definitions.
Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 60 Chapter 8 Markov Processes.
1 Chapter 5 Continuous time Markov Chains Learning objectives : Introduce continuous time Markov Chain Model manufacturing systems using Markov Chain Able.
Business Modeling Lecturer: Ing. Martina Hanová, PhD.
Chapter 9: Markov Processes
From DeGroot & Schervish. Example Occupied Telephone Lines Suppose that a certain business office has five telephone lines and that any number of these.
Let E denote some event. Define a random variable X by Computing probabilities by conditioning.
Discrete-time markov chain (continuation)
Operations Research: Applications and Algorithms
Chapter 5 Markov Analysis
Random Processes / Markov Processes
Presentation transcript:

Chapter 17 Markov Chains

Description Sometimes we are interested in how a random variable changes over time. The study of how a random variable evolves over time includes stochastic processes. An explanation of stochastic processes – in particular, a type of stochastic process known as a Markov chain is included. We begin by defining the concept of a stochastic process.

5.1 What is a Stochastic Process? Suppose we observe some characteristic of a system at discrete points in time. Let Xt be the value of the system characteristic at time t. In most situations, Xt is not known with certainty before time t and may be viewed as a random variable. A discrete-time stochastic process is simply a description of the relation between the random variables X0, X1, X2 ….. Example: Observing the price of a share of Intel at the beginning of each day Application areas: education, marketing, health services, finance, accounting, and production

A continuous –time stochastic process is simply the stochastic process in which the state of the system can be viewed at any time, not just at discrete instants in time. For example, the number of people in a supermarket t minutes after the store opens for business may be viewed as a continuous-time stochastic process.

5.2 What is a Markov Chain? One special type of discrete-time is called a Markov Chain. Definition: A discrete-time stochastic process is a Markov chain if, for t = 0,1,2… and all states P(Xt+1 = it+1|Xt = it, Xt-1=it-1,…,X1=i1, X0=i0) =P(Xt+1=it+1|Xt = it) Essentially this says that the probability distribution of the state at time t+1 depends on the state at time t(it) and does not depend on the states the chain passed through on the way to it at time t.

In our study of Markov chains, we make further assumption that for all states i and j and all t, P(Xt+1 = j|Xt = i) is independent of t. This assumption allows us to write P(Xt+1 = j|Xt = i) = pij where pij is the probability that given the system is in state i at time t, it will be in a state j at time t+1. If the system moves from state i during one period to state j during the next period, we call that a transition from i to j has occurred.

The pij’s are often referred to as the transition probabilities for the Markov chain. This equation implies that the probability law relating the next period’s state to the current state does not change over time. It is often called the Stationary Assumption and any Markov chain that satisfies it is called a stationary Markov chain. We also must define qi to be the probability that the chain is in state i at the time 0; in other words, P(X0=i) = qi.

We call the vector q= [q1, q2,…qs] the initial probability distribution for the Markov chain. In most applications, the transition probabilities are displayed as an s x s transition probability matrix P. The transition probability matrix P may be written as

For each I We also know that each entry in the P matrix must be nonnegative. Hence, all entries in the transition probability matrix are nonnegative, and the entries in each row must sum to 1.

The Gambler’s Ruin Problem At time 0, I have $2. At times 1, 2, …, I play a game in which I bet $1, with probabilities p, I win the game, and with probability 1 – p, I lose the game. My goal is to increase my capital to $4, and as soon as I do, the game is over. The game is also over if my capital is reduced to 0. Let Xt represent my capital position after the time t game (if any) is played X0, X1, X2, …. May be viewed as a discrete-time stochastic process

The Gambler’s Ruin Problem $0 $1 $2 $3 $4

5.3 n-Step Transition Probabilities A question of interest when studying a Markov chain is: If a Markov chain is in a state i at time m, what is the probability that n periods later the Markov chain will be in state j? This probability will be independent of m, so we may write P(Xm+n =j|Xm = i) = P(Xn =j|X0 = i) = Pij(n) where Pij(n) is called the n-step probability of a transition from state i to state j. For n > 1, Pij(n) = ijth element of Pn Pij(2) is the (i, j)th element of matrix P2 = P1 P1 Pij(n) is the (i, j)th element of matrix Pn = P1 Pn-1

The Cola Example Suppose the entire cola industry produces only two colas. Given that a person last purchased cola 1, there is a 90% chance that their next purchase will be cola 1. Given that a person last purchased cola 2, there is an 80% chance that their next purchase will be cola 2. If a person is currently a cola 2 purchaser, what is the probability that they will purchase cola 1 two purchases from now? If a person is currently a cola 1 a purchaser, what is the probability that they will purchase cola 1 three purchases from now?

The Cola Example We view each person’s purchases as a Markov chain with the state at any given time being the type of cola the person last purchased. Hence, each person’s cola purchases may be represented by a two-state Markov chain, where State 1 = person has last purchased cola 1 State 2 = person has last purchased cola 2 If we define Xn to be the type of cola purchased by a person on her nth future cola purchase, then X0, X1, … may be described as the Markov chain with the following transition matrix:

The Cola Example We can now answer questions 1 and 2. We seek P(X2 = 1|X0 = 2) = P21(2) = element 21 of P2:

The Cola Example We seek P11(3) = element 11 of P3: Hence, P21(2) =.34. This means that the probability is .34 that two purchases in the future a cola 2 drinker will purchase cola 1. We seek P11(3) = element 11 of P3: Therefore, P11(3) = .781

Probability of being in state j at time n Many times we do not know the state of the Markov chain at time 0. Then we can determine the probability that the system is in state i at time n by using the reasoning. Probability of being in state j at time n where q=[q1, q2, … q3]. Hence, qn = qopn = qn-1p Example, q0 = (.4,.6) q1= (.4,.6) q1 = (.48,.52)

To illustrate the behavior of the n-step transition probabilities for large values of n, we have computed several of the n-step transition probabilities for the Cola example. This means that for large n, no matter what the initial state, there is a .67 chance that a person will be a cola 1 purchaser.

5.4 Classification of States in a Markov Chain To understand the n-step transition in more detail, we need to study how mathematicians classify the states of a Markov chain. The following transition matrix illustrates most of the following definitions. A graphical representation is shown in the book (State-Transition diagram)

Definition: Given two states of i and j, a path from i to j is a sequence of transitions that begins in i and ends in j, such that each transition in the sequence has a positive probability of occurring. Definition: A state j is reachable from state i if there is a path leading from i to j. Definition: Two states i and j are said to communicate if j is reachable from i, and i is reachable from j. Definition: A set of states S in a Markov chain is a closed set if no state outside of S is reachable from any state in S.

Definition: A state i is an absorbing state if pij=1. Definition: A state i is a transient state if there exists a state j that is reachable from i, but the state i is not reachable from state j. Definition:If a state is not transient, it is called a recurrent state. Definition:A state i is periodic with period k > 1 if k is the smallest number such that all paths leading from state i back to state i have a length that is a multiple of k. If a recurrent state is not periodic, it is referred to as aperiodic. If all states in a chain are recurrent, aperiodic, and communicate with each other, the chain is said to be ergodic. The importance of these concepts will become clear after the next two sections.

5.5 Steady-State Probabilities and Mean First Passage Times Steady-state probabilities are used to describe the long-run behavior of a Markov chain. Theorem 1: Let P be the transition matrix for an s-state ergodic chain. Then there exists a vector π = [π1 π2 … πs] such that

Theorem 1 tells us that for any initial state i, The vector π = [π1 π2 … πs] is often called the steady-state distribution, or equilibrium distribution, for the Markov chain. Hence, they are independent of the initial probability distribution defined over the states

Transient Analysis & Intuitive Interpretation The behavior of a Markov chain before the steady state is reached is often call transient (or short-run) behavior. An interpretation can be given to the steady-state probability equations. This equation may be viewed as saying that in the steady-state, the “flow” of probability into each state must equal the flow of probability out of each state.

Steady-State Probabilities The vector  = [1, 2, …. , s ] is often known as the steady-state distribution for the Markov chain For large n and all i, Pij(n+1)  Pij(n)  j In matrix form  = P For any n and any i, Pi1(n) + Pi2(n) + … + Pis(n) = 1 As n, we have 1 + 2 + …. + s = 1

An Intuitive Interpretation of Steady-State Probabilities Consider Subtracting jpjj from both sides of the above equation, we have Probability that a particular transition enters state j = probability that a particular transition leaves state j

Use of Steady-State Probabilities in Decision Making In the Cola Example, suppose that each customer makes one purchase of cola during any week. Suppose there are 100 million cola customers. One selling unit of cola costs the company $1 to produce and is sold for $2. For $500 million/year, an advertising firm guarantees to decrease from 10% to 5% the fraction of cola 1 customers who switch after a purchase. Should the company that makes cola 1 hire the firm?

At present, a fraction π1 = ⅔ of all purchases are cola 1 purchases, since: π1 = .90π1+.20π2 π2 = .10π1+.80π2 and using the following equation by π1 + π2 = 1 Each purchase of cola 1 earns the company a $1 profit. We can calculate the annual profit as $3,466,666,667 [2/3(100 million)(52 weeks)$1]. The advertising firm is offering to change the P matrix to

For P1, the steady-state equations become. π1 =. 95π1+. 20π2. π2 = Replacing the second equation by π1 + π2 = 1 and solving, we obtain π1=.8 and π2 = .2. Now the cola 1 company’s annual profit will be $3,660,000,000 [.8(100 million)(52 weeks)$1-($500 million)]. Hence, the cola 1 company should hire the ad agency.

Inventory Example A camera store stocks a particular model camera that can be ordered weekly. Let D1, D2, … represent the demand for this camera (the number of units that would be sold if the inventory is not depleted) during the first week, second week, …, respectively. It is assumed that the Di’s are independent and identically distributed random variables having a Poisson distribution with a mean of 1. Let X0 represent the number of cameras on hand at the outset, X1 the number of cameras on hand at the end of week 1, X2 the number of cameras on hand at the end of week 2, and so on. Assume that X0 = 3. On Saturday night the store places an order that is delivered in time for the next opening of the store on Monday. The store using the following order policy: If there are no cameras in stock, 3 cameras are ordered. Otherwise, no order is placed. Sales are lost when demand exceeds the inventory on hand

Inventory Example Xt is the number of Cameras in stock at the end of week t (as defined earlier), where Xt represents the state of the system at time t Given that Xt = i, Xt+1 depends only on Dt+1 and Xt (Markovian property) Dt has a Poisson distribution with mean equal to one. This means that P(Dt+1 = n) = e-11n/n! for n = 0, 1, … P(Dt = 0 ) = e-1 = 0.368 P(Dt = 1 ) = e-1 = 0.368 P(Dt = 2 ) = (1/2)e-1 = 0.184 P(Dt  3 ) = 1 – P(Dt  2) = 1 – (.368 + .368 + .184) = 0.08 Xt+1 = max(3-Dt+1, 0) if Xt = 0 and Xt+1 = max(Xt – Dt+1, 0) if Xt  1, for t = 0, 1, 2, ….

Inventory Example: (One-Step) Transition Matrix P03 = P(Dt+1 = 0) = 0.368 P02 = P(Dt+1 = 1) = 0.368 P01 = P(Dt+1 = 2) = 0.184 P00 = P(Dt+1  3) = 0.080

Inventory Example: Transition Diagram 1 3 2

Inventory Example: (One-Step) Transition Matrix

Transition Matrix: Two-Step P(2) = PP

Transition Matrix: Four-Step P(4) = P(2)P(2)

Transition Matrix: Eight-Step P(8) = P(4)P(4)

Steady-State Probabilities The steady-state probabilities uniquely satisfy the following steady-state equations 0 = 0p00 + 1p10 + 2p20 + 3p30 1 = 0p01 + 1p11 + 2p21 + 3p31 2 = 0p02 + 1p12 + 2p22 + 3p32 3 = 0p03 + 1p13 + 2p23 + 3p33 1 = 0 + 1 + 2 + 3

Steady-State Probabilities: Inventory Example 0 = .0800 + .6321 + .2642+ .0803 1 = .1840 + .3681 + .3682 + .1843 2 = .3680 + .3682 + .3683 3 = .3680 + .3683 1 = 0 + 1 + 2 + 3 0 = .286, 1 = .285, 2 = .263, 3 = .166 The numbers in each row of matrix P(8) match the corresponding steady-state probability

Mean First Passage Times For an ergodic chain, let mij = expected number of transitions before we first reach state j, given that we are currently in state i; mij is called the mean first passage time from state i to state j. In the example, we assume we are currently in state i. Then with probability pij, it will take one transition to go from state i to state j. For k ≠ j, we next go with probability pik to state k. In this case, it will take an average of 1 + mkj transitions to go from i and j.

This reasoning implies By solving the linear equations of the equation above, we find all the mean first passage times. It can be shown that

For the cola example, π1=2/3 and π2 = 1/3 Hence, m11 = 1.5 and m22 = 3 m12 = 1 + p11m12 = 1 + .9m12 m21 = 1 + p22m21 = 1 + .8m21 Solving these two equations yields, m12 = 10 and m21 = 5

Solving for Steady-State Probabilities and Mean First Passage Times on the Computer Since we solve steady-state probabilities and mean first passage times by solving a system of linear equations, we may use LINDO to determine them. Simply type in an objective function of 0, and type the equations you need to solve as your constraints.

5.6 Absorbing Chains Many interesting applications of Markov chains involve chains in which some of the states are absorbing and the rest are transient states. This type of chain is called an absorbing chain. To see why we are interested in absorbing chains we consider the following accounts receivable example.

Accounts Receivable Example The accounts receivable situation of a firm is often modeled as an absorbing Markov chain. Suppose a firm assumes that an account is uncollected if the account is more than three months overdue. Then at the beginning of each month, each account may be classified into one of the following states: State 1 New account State 2 Payment on account is one month overdue State 3 Payment on account is two months overdue State 4 Payment on account is three months overdue State 5 Account has been paid State 6 Account is written off as bad debt

Suppose that past data indicate that the following Markov chain describes how the status of an account changes from one month to the next month: New 1 month 2 months 3 months Paid Bad Debt New 1 month 2 months 3 months Paid Bad Debt

To simplify our example, we assume that after three months, a debt is either collected or written off as a bad debt. Once a debt is paid up or written off as a bad debt, the account if closed, and no further transitions occur. Hence, Paid or Bad Debt are absorbing states. Since every account will eventually be paid or written off as a bad debt, New, 1 month, 2 months, and 3 months are transient states.

A typical new account will be absorbed as either a collected debt or a bad debt. What is the probability that a new account will eventually be collected? To answer this questions we must write a transition matrix. We assume s – m transient states and m absorbing states. The transition matrix is written in the form of m columns s-m rows m rows s-m P =

The transition matrix for this example is Then s =6, m =2, and Q and R are as shown. New 1 month 2 months 3 months Paid Bad Debt New 1 month 2 months 3 months Paid Bad Debt Q R

What is the probability that a new account will eventually be collected? (.964) What is the probability that a one-month overdue account will eventually become a bad debt? (.06) If the firm’s sales average $100,000 per month, how much money per year will go uncollected? From answer 1, only 3.6% of all debts are uncollected. Since yearly accounts payable are $1,200,000 on the average, (0.036)(1,200,000) = $43,200 per year will be uncollected.