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

Similar documents
Markov Processes Hamid R. Rabiee

Markov Chains (Part 4)

Markov Chains (Part 3)

Markov Chains Handout for Stat 110

ISE/OR 760 Applied Stochastic Modeling

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

ISM206 Lecture, May 12, 2005 Markov Chain

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

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

Discrete Markov Chain. Theory and use

Google PageRank. Francesco Ricci Faculty of Computer Science Free University of Bozen-Bolzano

Today. Next lecture. (Ch 14) Markov chains and hidden Markov models

CS246: Mining Massive Datasets Jure Leskovec, Stanford University

STOCHASTIC PROCESSES Basic notions

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

COMS 4721: Machine Learning for Data Science Lecture 20, 4/11/2017

ISyE 6650 Probabilistic Models Fall 2007

MAS275 Probability Modelling Exercises

CS224W: Social and Information Network Analysis Jure Leskovec, Stanford University

Link Mining PageRank. From Stanford C246

Probability, Random Processes and Inference

Computer Engineering II Solution to Exercise Sheet Chapter 12

Uncertainty and Randomization

Doing Physics with Random Numbers

Markov Chains. Chapter 16. Markov Chains - 1

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

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

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

2 DISCRETE-TIME MARKOV CHAINS

STOCHASTIC MODELS LECTURE 1 MARKOV CHAINS. Nan Chen MSc Program in Financial Engineering The Chinese University of Hong Kong (ShenZhen) Sept.

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

Slide source: Mining of Massive Datasets Jure Leskovec, Anand Rajaraman, Jeff Ullman Stanford University.

Markov Chains Introduction

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

1998: enter Link Analysis

Chapter 10. Finite-State Markov Chains. Introductory Example: Googling Markov Chains

Link Analysis. Reference: Introduction to Information Retrieval by C. Manning, P. Raghavan, H. Schutze

IEOR 6711: Professor Whitt. Introduction to Markov Chains

Statistics 150: Spring 2007

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

MATH HOMEWORK PROBLEMS D. MCCLENDON

PageRank. Ryan Tibshirani /36-662: Data Mining. January Optional reading: ESL 14.10

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

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

18.600: Lecture 32 Markov Chains

Discrete Event Systems Solution to Exercise Sheet 6

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

18.440: Lecture 33 Markov Chains

Lecture 12: Link Analysis for Web Retrieval

DATA MINING LECTURE 13. Link Analysis Ranking PageRank -- Random walks HITS

IR: Information Retrieval

Online Social Networks and Media. Link Analysis and Web Search

Web Ranking. Classification (manual, automatic) Link Analysis (today s lesson)

Pr[positive test virus] Pr[virus] Pr[positive test] = Pr[positive test] = Pr[positive test]

The Theory behind PageRank

Link Analysis. Leonid E. Zhukov

Reinforcement Learning

18.175: Lecture 30 Markov chains

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

Chapter 35 out of 37 from Discrete Mathematics for Neophytes: Number Theory, Probability, Algorithms, and Other Stuff by J. M. Cargal.

ECEN 689 Special Topics in Data Science for Communications Networks

Uncertainty Runs Rampant in the Universe C. Ebeling circa Markov Chains. A Stochastic Process. Into each life a little uncertainty must fall.

MATH 56A: STOCHASTIC PROCESSES CHAPTER 1

Math 304 Handout: Linear algebra, graphs, and networks.

The Static Absorbing Model for the Web a

Lecture 20 : Markov Chains

Link Analysis. Stony Brook University CSE545, Fall 2016

Online Social Networks and Media. Link Analysis and Web Search

Nearest-Neighbor Matchup Effects: Predicting March Madness

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

Quantitative Evaluation of Emedded Systems Solution 2: Discrete Time Markov Chains (DTMC)

CPSC 540: Machine Learning

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

Chapter 11 Advanced Topic Stochastic Processes

Thanks to Jure Leskovec, Stanford and Panayiotis Tsaparas, Univ. of Ioannina for slides

Lecture 9 Classification of States

Stochastic Processes

Interlude: Practice Final

Thanks to Jure Leskovec, Stanford and Panayiotis Tsaparas, Univ. of Ioannina for slides

Application. Stochastic Matrices and PageRank

Markov Chains Absorption Hamid R. Rabiee

Lecture 5: Introduction to Markov Chains

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

INTRODUCTION TO MCMC AND PAGERANK. Eric Vigoda Georgia Tech. Lecture for CS 6505

Probability & Computing

INTRODUCTION TO MCMC AND PAGERANK. Eric Vigoda Georgia Tech. Lecture for CS 6505

CS 277: Data Mining. Mining Web Link Structure. CS 277: Data Mining Lectures Analyzing Web Link Structure Padhraic Smyth, UC Irvine

4.7.1 Computing a stationary distribution

Markov Chains Absorption (cont d) Hamid R. Rabiee

Introduction to Search Engine Technology Introduction to Link Structure Analysis. Ronny Lempel Yahoo Labs, Haifa

1/2 1/2 1/4 1/4 8 1/2 1/2 1/2 1/2 8 1/2 6 P =

Link Analysis Ranking

IS4200/CS6200 Informa0on Retrieval. PageRank Con+nued. with slides from Hinrich Schütze and Chris6na Lioma

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

Some Definition and Example of Markov Chain

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

Slides based on those in:

Lecture 15: MCMC Sanjeev Arora Elad Hazan. COS 402 Machine Learning and Artificial Intelligence Fall 2016

1 Random Walks and Electrical Networks

CHAPTER 6. Markov Chains

Transcription:

AM : Introduction to Optimization Models and Methods Lecture 7: Markov Chains Yiling Chen SEAS Lesson Plan Stochastic process Markov Chains n-step probabilities Communicating states, irreducibility Recurrent states, transient states Ergodic states Steady-state probabilities Applications Google PageRank NCAA prediction Jensen & Bard:.,,

Weather Probability 0.8 dry tomorrow if dry today, 0.6 dry tomorrow if rains today. Probabilities do not change if the weather weather before today is taken into account. S t = { 0 if day t is dry if day t is rainy P (S t+ = 0 S t = 0) = 0.8 P (S t+ = 0 S t = ) = 0.6 0. 0.8 dry rain 0.4 0.6 State Transition Diagram Stochastic processes A stochastic process is a sequence of random variables {S t }, in each period t {0,,,... } There is a set of possible states State S t S S = {0,..., m } In general, the transition probability is P (S t+ = j S 0 = i 0, S = i,..., S t = i) 4

Markov Chain A stochastic process has the Markovian property if P (S t+ = j S 0 = i 0, S i = i,..., S t = i) = P (S t+ = j S t = i) Transition probabilities are stationary if P (S t+ = j S t = i) = p ij, t, i, j Markovian + stationary == Markov chain 5 Weather Probability 0.8 dry tomorrow if dry today, 0.6 if rains today. Probabilities do not change if weather before today is taken into account. S t = { 0 if day t is dry if day t is rainy P (S t+ = 0 S t = 0) = 0.8 P (S t+ = 0 S t = ) = 0.6 Transition matrix ( ) ( ) p00 p P = 0 0.8 0. = p 0 p 0.6 0.4 0. 0.8 dry rain 0.4 0.6 State Transition Diagram 6

Transition Matrix to P = from m p 00 p 0... p 0 m p 0... p...... p m p m 0 p m... p m m All rows sum to. Every entry between 0 and. To define a Markov chain: Describe states S = {0,..., m } Define the transition matrix P 7 Example: IRS audit Often have to increase the state space to achieve the Markovian property E.g., if the probability of an IRS tax audit depends on the last two audits then we can introduce four states: 0 :: if last two audits were no no :: if last two audits were yes no S = :: if last two audits were no yes :: if last two audits were yes yes 8

n-step Transition Probability n-step transition probability p (n) ij is the conditional probability of state j after n steps from state i p (n) ij = m k=0 p(d) ik p(n d) kj P (S t+n = j S t = i) = p (n) ij i.e., in going from i to j in n steps, must be in some state k after d steps and j in n d steps; sum over all possible intermediate states For example (given two states): p () 0 = p 00p 0 + p 0 p p () = p 0p 0 + p p 9 n-step Transition Probability n-step transition probability p (n) ij is the conditional probability of state j after n steps from state i P (S t+n = j S t = i) = p (n) ij We have: P () = PP = P P () = PP () = PP = P P (4) = PP () = PP = P 4 0

Example: Weather ( ) ( ) ( ) 0.8 0. 0.8 0. 0.76 0.4 P () = PP = = 0.6 0.4 0.6 0.4 0.7 0.8 ( ) ( ) ( ) 0.8 0. 0.76 0.4 0.75 0.48 P () = PP () = = 0.6 0.4 0.7 0.8 0.744 0.56 ( ) ( ) ( ) 0.8 0. 0.75 0.48 0.75 0.5 P (4) = PP () = = 0.6 0.4 0.744 0.56 0.749 0.5 ( ) ( ) ( ) 0.8 0. 0.75 0.5 0.75 0.5 P (5) = PP (4) = = 0.6 0.4 0.749 0.5 0.75 0.5 After 5 steps, each row has identical entries: the prob of it being dry or rainy is independent of the weather 5 days ago. Will see later that 0.75, 0.5 are steady-state probabilities. Unconditional n-step State Probability The unconditional n-step probability P (S n = j) is the probability that will be in state j after n steps. For this, need probability distribution on initial state, i.e. P (S 0 = i) for i S. Given this, P (S n = j) = P (S 0 = 0)p (n) 0j + + P (S 0 = m )p (n) m j Weather example: if dry on day one (S 0 = 0) with probability 0.5, then probability dry after two days is P (S = 0) = 0.5p () 00 + 0.5p() 0 = 0.5 0.76 + 0.5 0.7 = 0.74

Classes of States absence of edge = prob zero. Existence of edge = prob > 0. communicate = can transition from i to j and from j to n (after some number of steps) One class in which all states communicate (irreducible): 0 Four distinct classes, no states communicate (except with themselves): 0 More Examples 0 4 Class Class Class 0 6 5 4 Class Class 4

Classes of States; Irreducible State j is accessible from state i if p (n) ij > 0 for some n 0 States i and j communicate if state j is accessible from i and state i from state j any state communicates with itself transitive (if i communicates with j, and j with k, then i communicates with k) A class is a set of states that communicate with each other and is maximal (cannot add another state to the set) A Markov chain is irreducible if it has only one class. 5 Recurrent and Transient States A state is recurrent if the process will return to the state again with probability =. A state is transient otherwise. Proposition. Recurrence is a class property: all states in a class are either recurrent or transient. Proposition. Not all states can be transient. all states in an irreducible Markov chain are recurrent. A state is absorbing if the process will never leave the state. 6

Examples 0 4 Class Class Class 0 6 5 4 Class Class 7 Examples 0 4 absorbing Class (recurrent) Class (transient) absorbing Class (recurrent) 0 6 Class (transient) 5 4 Class (recurrent) Note: recurrent classes have no leaving arcs 8

Another Example (Exercise) 0 4 9 Periodicity The period of state i, written d(i), is an integer d(i) such that the chain can return to i only at multiples of the period d(i) and d(i) is the largest such integer. Proposition. Periodicity is a class property: all states in a class have the same period. Example: 0 irreducible (necessarily recurrent) every state is periodic with period 0

Aperiodic states State i is aperiodic if the period is d(i) = and periodic otherwise. It is sufficient for p ii > 0 for state i to be aperiodic. A state to which the chain can never return is defined to be aperiodic. Remember: periodicity or aperiodicity is a class property 0 irreducible (necessarily recurrent) all states are aperiodic (why?) Another Example 0 4

Another Example 0 transient class periodic (period = ) (note, can be transient and periodic!) 4 recurrent class aperiodic Ergodicity An ergodic state is a state that is recurrent and aperiodic. An irreducible (thus, recurrent) Markov chain is ergodic if it is aperiodic. 0 all states are aperiodic and recurrent; an ergodic chain 4

Example (A Non Ergodic Chain) 0 transient class periodic (period = ) (note, can be transient and periodic!) 4 recurrent class aperiodic (state 4 is ergodic) 5 Steady-State Probabilities For any ergodic Markov chain, lim n p (n) ij independent of i. = π j > 0 exists, and is The steady-state probability π j for state j is the probability the process is in state j after a large number of transitions. Computed via the steady-state equations ( balance equations ): m j=0 π j = m i=0 π i p ij for j = 0,..., m () π j = () 6

Example: Weather Ergodic: Can solve for steady-state probabilities π 0 = π 0 p 00 + π p 0 = 0.8π 0 + 0.6π π = π 0 p 0 + π p = 0.π 0 + 0.4π = π 0 + π Get: π 0 = 0.75, π = 0.5 Steady state probability dry 0.75, steady state probability rain 0.5 7 Computing the Steady State Probabilities π j = m i=0 π i p ij for j = 0,..., m m j=0 π j = m + equations, m unknowns. One of first m equations is redundant. We need the j π j = equation because otherwise π j = 0 solves. Can solve via Gaussian elimination, matrix inversion, etc. 8

Application: Google PageRank Link from page to page indicates that trusts. The quality of a page is related to its in-degree as well as the quality of the incoming pages. Random surfer model: with prob α follow an out-edge at random (e.g., /), w. prob α do a random jump. Defines a Markov chain. The PageRank of page i is the steady state probability of visiting page i: the fraction of time the surfer will spend at the page (Brin and Page 98) 9 Example: PageRank hyperlink structure P = /6 / /6 5/ /6 5/ /6 / /6 π = (5/8, 4/9, 5/8), the PageRank (node is the most trusted!) teleporting links include jump prob /6 for missing edges in this example 0

Application: NCAA Basketball FBI estimates that more than $ billion wagered on NCAA basketball each year. Betting pools typically set-up to predict the winner of each game. Season is mid-nov to mid-march, followed by a 64-team tournament ( champions from the conferences, plus the remaining best teams). Seeded into 4 regions. Within each region play single-elimination tournament on neutral court. The winner of each region goes to the Final Four; play a single-elimination tournament on neutral court. http://sports.yahoo.com/ncaab/bracket

Many Sources of Information AP poll of sportswriters ESPN/USA Today poll of coaches Sagarin ratings (USA Today) Massey ratings Las Vegas odds Can Markov chains be used to do better than all of these? P. Kvam and J. S. Sokol, A logistic regression/markov chain model for NCAA basketball, Naval Research Logistics 5: 788-80 (006). The NCAA Data 0 Division I teams Members i and j in a conference play each other twice a year, once on i s home court and once on j s home court Data is the location, winner, and scores. Idea: Build a Markov chain to represent the random walk of an expert who transitions according to the team she thinks is best ( follows the wins ). 4

Example: Three NCAA Teams p p p Random surfer model: Current state i is the team that the expert believes is best. At each step, pick a competitor j at random, and toss a weighted coin to determime whether j wins (transition to j) or not (stay at state i.) Steady-state probabilities give estimated quality of each team 5 Methodology: NCAA via Markov Chains Each game is ordered pair (i, j) G, (set of games G) visiting team first. zij is the win margin of home team j (> 0 if wins) Use a logistic regression to estimate r(zij ): the prob home team j would beat i at neutral site 4 Uses r(zij ) values to compute transition probabilities p ij 5 From this, compute steady-state probabilities of random walk; higher probability of visiting a team = better team. 6

Defining the Transition Probabilities p ij : transition probability from i to j: ( p ij j:(i,j) G r(z ij) + ) j:(j,i) G ( r(z ji) i, j games where j at home prob i beats j given margin z ji at home i, j games where i at home prob j beats i given margin z ij at home Define p ii = j i p ij 7 Use four years of NCAA data (999-000 to 00-00 seasons) 8

S x : Given that team margin over team is x points on s home court, what is the prob that beats on s home court? Estimate home-court advantage h as h := x/, with x, so that S x = 0.5. Given this, estimate r(z) := S z+h. 9 Obs. prob. home team j wins (i, j) based on π j π i 40

4 4

Summary A Markov chain is Markovian and stationary. A class of states communicate with each other; a chain is irreducible if one class Class properties: Recurrent (return w.p. ) vs transient Periodic (only return after multiples of d > ) vs aperiodic A state is ergodic if it is recurrent and aperiodic. An irreducible Markov chain is ergodic if it is aperiodic. Steady-state probabilities are well-defined in an ergodic Markov chain. 4