STAT3911 STOCHASTIC PROCESSES AND TIME SERIES (ADV) COURSE NOTES
Contents Introduction: ........................................................................................................................................... 6 Assessments: ....................................................................................................................................... 6 Schedule: ............................................................................................................................................. 6 Stochastic Processes: .............................................................................................................................. 7 Basic concenpts:.................................................................................................................................. 8 Definition: Stochastic process ......................................................................................................... 8 Definition: Random walk................................................................................................................. 8 Definition: Strong stationary........................................................................................................... 9 Definition: State space of stochastic process ................................................................................. 9 Definition: Increments .................................................................................................................... 9 Markov Property: .............................................................................................................................. 10 Definition: Markov property ......................................................................................................... 10 Definition: filtration ...................................................................................................................... 11 Definition: Markov Process ........................................................................................................... 12 Markov Chains ...................................................................................................................................... 12 Basic concepts: .................................................................................................................................. 12 Notation: ....................................................................................................................................... 12 Gambler ruin problem: ..................................................................................................................... 13 Solution ......................................................................................................................................... 13 Classification of states: ..................................................................................................................... 15 π step transition probability notation: ......................................................................................... 15 Recurrence and transience ............................................................................................................... 19 Recurrence definition: .................................................................................................................. 19 Transient definition:...................................................................................................................... 19 Green Function: ............................................................................................................................ 19 Period: ........................................................................................................................................... 22 Limiting theorems and Stationarity of Markov Chains ......................................................................... 24 Expected number of transitions from π to π...................................................................................... 24 Definition: ..................................................................................................................................... 24 Number of visits to π by the ππ‘β step: .......................................................................................... 25 Stationary Distributions .................................................................................................................... 29 Discussion: .................................................................................................................................... 29 Set up: ........................................................................................................................................... 30 Theorem: irreducible aperiodic Markov chains and classes: ........................................................ 30 Poisson Processes ................................................................................................................................. 34 1
Introduction: ..................................................................................................................................... 34 Theory from notes: ....................................................................................................................... 35 Revision of Distributions ................................................................................................................... 35 Poisson distribution ...................................................................................................................... 35 Exponential Distribution ............................................................................................................... 37 Definition of Poisson Process:........................................................................................................... 39 Counting process (definition)........................................................................................................ 39 Poisson Process Definition: ........................................................................................................... 40 Interarrival and waiting time distributions: ...................................................................................... 41 Distribution of πΈπ: Interarrival time ............................................................................................. 41 Distribution of ππ: Waiting time................................................................................................... 42 Conditional Distribution of the Arrival Times ............................................................................... 43 Superposition and Thinning of Poisson Processes ............................................................................ 46 Theorem: Superposition position of Poisson Processes: .............................................................. 46 Sampling (thinning) ....................................................................................................................... 47 Revision: ................................................................................................................................................ 49 Random Sums (STAT2911) ................................................................................................................ 49 Examples: ...................................................................................................................................... 49 STAT3911 Random sums:.............................................................................................................. 51 Moment Generating Function .......................................................................................................... 52 Definition: ..................................................................................................................................... 52 Calculating MGF: ........................................................................................................................... 52 Moment Generating function of a random Sum .......................................................................... 56 Branching Processes: ............................................................................................................................ 57 Set up: ............................................................................................................................................... 58 Class .............................................................................................................................................. 58 Notes: ............................................................................................................................................ 59 Formulation of branching process: ................................................................................................... 59 Expectation and variance of ππ + 1 ............................................................................................. 60 Probability of dying out:................................................................................................................ 61 Brownian motion .............................................................................................................................. 68 Definition 1.................................................................................................................................... 68 Definition 2.................................................................................................................................... 69 Time Series: ........................................................................................................................................... 69 Basic concepts: .................................................................................................................................. 71 Regular time seris: ........................................................................................................................ 71 2
Notation for TS data:..................................................................................................................... 71 Graphs of Time Series Data ........................................................................................................... 73 Basic Terminology of TS analysis................................................................................................... 80 Analysis of Components of time series: ............................................................................................ 82 Estimation and elimination of trend in absence of seasonality:................................................... 82 Estimation and elimination of both trend and seasonal components of a TS .............................. 89 Stationary Processes and Time Series 1:............................................................................................... 91 Autocovariance and Autocorrelation Functions ............................................................................... 92 Definition: autocovariance function πΎ .......................................................................................... 92 Definition: Autocorrelation (acf) π ............................................................................................... 93 Estimation of πΎπ and ππ ............................................................................................................... 93 Sampling Properties of ππ; πΆπ, π; π
π, π ........................................................................................... 95 Sampling properties of ππ ............................................................................................................ 95 Sampling properties of πΆπ, π ........................................................................................................ 96 Sampling properties for π
π, π ....................................................................................................... 96 Sample Correlogram ..................................................................................................................... 97 Detection of Randomness, short term and long term correlations of a TS .................................. 98 Autocorrelation Plot as Diagnostic Tool ..................................................................................... 101 Partial Autocorrelation Function (PACF) ..................................................................................... 103 Stationary Time Series: ............................................................................................................... 104 Some Stochastic Models for Time Series ............................................................................................ 104 White Noise Process ....................................................................................................................... 104 Definition: ................................................................................................................................... 104 Statistical Properties of WN ππ‘ ................................................................................................... 105 Linear Combination of ππ‘ ............................................................................................................ 105 Some useful time series Models: .................................................................................................... 108 Moving average (MA) process .................................................................................................... 108 Autocorrelation function, acf of ππ΄(π) process ........................................................................ 111 Simulating MA process in R......................................................................................................... 111 Useful Operations in Time Series .................................................................................................... 112 Backshift Operator (Lag operator) .............................................................................................. 112 Differencing Operator: ................................................................................................................ 112 Seasonal Differencing Operator .................................................................................................. 113 Inevitability of MA Processes .............................................................................................................. 114 Invertible solution: .......................................................................................................................... 115 Theorem: Invertible ππ΄(1) process ........................................................................................... 115 3
Invertability of general ππ΄(π) process: ......................................................................................... 115 Theorem: invertibility of ππ΄(π) process.................................................................................... 116 PACF of invertible MA process: ................................................................................................... 118 Autoregressive Processes and the Properties: ................................................................................... 119 Autoregressive (π΄π
) Processes: ..................................................................................................... 120 Definition: Autoregressive process of order π ............................................................................ 120 Analysis of an π΄π
(1) Process: .................................................................................................... 122 Analysis of AR(2) process (2nd order AR) ..................................................................................... 128 Autoregressive Processes of Order π (AR(p)) ..................................................................................... 129 Theorems ........................................................................................................................................ 129 Theorem 1: .................................................................................................................................. 130 Theorem 2: .................................................................................................................................. 130 Yule Walker Equations for stationary AR processes ....................................................................... 130 Yule Walker Equation:................................................................................................................. 130 PACF of stationary AR(p) process: .............................................................................................. 136 Mixed autoregressive moving average (ARMA) process: ................................................................... 139 Notation: ......................................................................................................................................... 139 Note: ........................................................................................................................................... 139 Stationarity and invertibility of ARMA(p,q) Process ....................................................................... 139 Theorems .................................................................................................................................... 140 Special cases of ARMA(π, π) ....................................................................................................... 140 Moments of Xt βΌ ARMA(p, q) ....................................................................................................... 142 Mean πΈππ‘ ................................................................................................................................... 142 Autocovariance function: πΎπ ...................................................................................................... 143 Homogeneous Nonstationary Processes ........................................................................................ 145 Example data:.............................................................................................................................. 145 Modelling homogeneous nonstationary time series: ................................................................. 147 Autoregressive Integrated moving average ARIMA(p,d,q) ......................................................... 150 Identification and estimation:......................................................................................................... 151 ARMA/ARIMA Models:................................................................................................................ 151 Hypothesis testing of orders or ARMA(p,a) and estimation ............................................................... 156 Identification: .................................................................................................................................. 157 1: Test whether the series is a white noise of π»0: ππ‘ βΌ π΄π
ππ΄(0,0) ........................................ 157 2: Test ππ‘ βΌ π΄π
ππ΄(0, π) or ππ‘ βΌ ππ΄(π) ................................................................................. 158 3: Test ππ‘ βΌ π΄π
ππ΄π, 0; or ππ‘ βΌ π΄π
(π) .................................................................................... 159 Parameter estimation of ARMA models: ........................................................................................ 161 4
1: MA(1) ...................................................................................................................................... 161 Estimation of Parameters continued: ......................................................................................... 162 Diagnostic Checking: ........................................................................................................................... 163 Residual analysis ............................................................................................................................. 163
5
STAT3911 STOCHASTIC PROCESSES AND TIME SERIES (ADV) COURSE NOTES STANDARD LECTURES Lecture 1.
Monday, 6 March 2017
Introduction: Lecturer: Ray Kawai week 1-7 (stochastic processes) Shelton Reiris week 8-13 (time series) Qiuing Wang (ADV) week 1-7 (Stochastic processes)
Assessments: Quizes -
Wednesday week 7 common (April 26) (Stochastic processes)
-
Friday advanced week 7 (April 28) (Stochastic processes advanced material)
-
Friday week 12 (June 2) (Time series)
Computer exam: week 13
Schedule: 1. Review of probability theory. Elements of stochastic processes and time series. 2. Markov chains. 3.
Markov chains.
4.
Markov chains. 6
5.
The Poisson process.
6.
The Poisson process.
7.
The Poisson process.
8.
Time series data, components of a time series. Filtering to remove trends and seasonal components.
9.
Stationarity time series. Sample autocorrelations and partial autocorrelations. Probability models for stationary time series. Moving Average (MA) models and properties.
10. Invertibility of MA models. Autoregressive (AR) models and their properties. Stationarity of AR models. Mixed Autoregressive Moving Average (ARMA) models and their properties. 11. Homogeneous nonstationary time series (HNTS). Simple models for HNTS. Autoregressive Integrated Moving Average (ARIMA) models and related results. Review of theoretical patterns of ACF and PACF for AR, MA and ARMA processes. Identification of possible AR, MA, ARMA and ARIMA models for a set of time series data. 12. Estimation and fitting ARIMA models via MM and MLE methods. Hypothesis testing, diagnostic checking and goodness-of-fit tests. AIC for ARIMA models. Forecating methods for ARIMA models. 13. Minimum mean square error (mmse) forecasting and its properties. Derivation of l-step ahead mmse forecast function. Forecast updates. Forecast errors, related results and applications.
Stochastic Processes: In probability theory and related fields, a stochastic or random process is a mathematical object usually defined as a collection of random variables. Historically, the random variables were associated with or indexed by a set of numbers, usually viewed as points in time, giving the interpretation of a stochastic process representing numerical values of some system randomly changing over time, such as the growth of a bacterial population, an electrical current fluctuating due to thermal noise, or the movement of a gas molecule.[1][4][5] Stochastic processes are widely used as mathematical models of systems and phenomena that appear to vary in a random manner. They have applications in many disciplines including sciences such as biology,[6] chemistry,[7] ecology,[8] neuroscience,[9] and physics[10] as well as technology and engineering fields such as image processing, signal processing,[11] information theory,[12] computer science,[13] cryptography[14] and telecommunications.[15] Furthermore,
7
seemingly random changes in financial markets have motivated the extensive use of stochastic processes in finance.[16][17][18]
Basic concenpts: -
Randomness, indexed by time {ππ‘ : π‘ β π}
Where π‘ β [0, π] for some endtime π‘. -
Can be either discrete or continuous State
Time
Continuous
Height, temperature
Continuous time
discrete
Dice, coinflip, number of
1 day, 1 second, 1 year
people
Definition: Stochastic process A stochastic process is a model of time-dependent random phenomena. A single random variable describes a static random phenomena; a stochastic process is a collection of random variables {ππ‘ : π‘ β π}, one for each time π‘ β π. -
Can be either discrete or continuous
Definition: Random walk We have a time set π and state space π. We defininte the stochastic process {ππ‘ : π‘ β π}. In principle, we need to know the joint distribution of (ππ‘1 , ππ‘2 , β¦ , ππ‘π ), where π‘π β π, π β β. This is difficult. We define a random walk as a stochastic process {ππ‘ : π‘ β π}, where π = β in such a way that ππ‘ = ππ‘β1 + ππ‘ ; (π‘ β π) Where {ππ }πββ is a sequence of iid RV with β(ππ = 1) = π, β(ππ = β1) = 1 β π for some π β (0,1). The equation ππ‘ = ππ‘β1 + ππ‘ is an example of a difference equation. It is an implicit definition of ππ‘ , since it is only given in terms of ππ‘β1 . In continuous time, this becomes the differential equation
8
Definition: Strong stationary A SP {ππ‘ : π‘ β π} is said to be strong stationary, if the two joint distributions of (ππ‘1 , ππ‘2 , β¦ , ππ‘π ) and (ππ+π‘1 , ππ+π‘2 , β¦ , ππ+π‘π ) are identical βπ‘1 , β¦ , π‘π ; π + π‘1 , β¦ , π + π‘π β π
Definition: State space of stochastic process The set of values that the ππ‘ βs can take is called the state space, π, of the stochastic process
Definition: Increments An increment of a stochastic process is the amount by which its value changes over a period of time, for example ππ‘π+1 β ππ‘π , where π‘π < π‘π+1 β π Definition: Stationary increments The SP {ππ‘ : π‘ β π} is said to have stationary increments if the distribution of the increment depends only on the difference between the two time points. -
If, for π‘1 β€ π‘2 and π‘3 β€ π‘4 βΉ π‘2 β π‘1 = π‘4 β π‘3 ππ‘2 β ππ‘1
β π β ππ‘3 = π‘4
(the increments have the same distribution) Eg: temperature between today and tomorrow is distributed the same
Example: stock prices Let {ππ‘ : π‘ β β+ } denote the price of one share of a specific stock. It might be considered reasonable to assume that the distribution of the return over a period of duraction Ξ > 0 ππ‘+Ξ β ππ‘ ππ‘+Ξ = β1 ππ‘ ππ‘ 9
ππ‘+Ξ :π‘ ππ‘
Depends on Ξ but not π‘. Generally, we assume that {
β β+ } is a stationary stochastic process.
Accordingly, the log-price processes π β ln ππ‘ would have stationary increments ππ‘+Ξ β ππ‘ = ππ‘+Ξ ), ππ‘
ln (
even though the stochastic process {ππ‘ : π‘ β β+ } might not be stochastic. In other words,
for fixed Ξ, the stochastic process ππ‘Ξ β ππ‘+Ξ β ππ‘ is stationary. Definition: Independent increments A stochastic process {ππ‘ : π‘ β π} has independent increments, if βπ‘ β π, and Ξ > 0|π‘ + Ξ β π, the increment ππ‘+Ξ β ππ‘ is independent of all the past {ππ : π β π} of the SP. -
The increments at some time period are independent of previous events.
o
The first half of this course will assume stationary and independent increments
Markov Property: In probability theory and related fields, a Markov process (or Markoff process), named after the Russian mathematician Andrey Markov, is a stochastic process that satisfies the Markov property[1][2] (sometimes characterized as "memorylessness"). Loosely speaking, a process satisfies the Markov property if one can make predictions for the future of the process based solely on its present state just as well as one could knowing the process's full history; i.e., conditional on the present state of the system, its future and past states are independent. A Markov chain is a type of Markov process that has either discrete state space or discrete index set (often representing time), but the precise definition of a Markov chain varies.[3] For example, it is common to define a Markov chain as a Markov process in either discrete or continuous time with a countable state space (thus regardless of the nature of time)[4][5][6][7], but it is also common to define a Markov chain as having discrete time in either countable or continuous state space (thus regardless of the state space).[8]
-
Future events only depend upon current time, and not previous events
Definition: Markov property A SP {ππ‘ : π‘ β π} is said to have a Markov Property if 10
π(ππ‘π+1 β π΄π+1 |ππ‘1 β π΄1 , β¦ , ππ‘π β π΄π ) = π(ππ‘π+1 β π΄π+1 |ππ‘π β π΄π ) Where 0 β€ π‘1 β€ π‘2 β€ β― β€ π‘π β€ π‘π+1 and {π΄π }(πββ} is a sequence of measurable sets in π
Corollary: Independent increments have the Markov property A SP {ππ‘ : π‘ β π} with independent increments has the Markov property. Example: State space of natural numbers Eg, let π = β, then π(ππ‘π+1 = π₯π+1 |ππ‘1 β π΄1 , β¦ , ππ‘πβ1 β π΄πβ1 , ππ‘π = π₯π ) = π(ππ‘π+1 β ππ‘π = π₯π+1 β π₯π |ππ‘1 β π΄1 , β¦ , ππ‘πβ1 β π΄πβ1 , ππ‘π = π₯π ) = π(ππ‘π+1 β ππ‘π = π₯π+1 β π₯π |ππ‘π = π₯π ) (ππ¦ πππππππππππ‘ πππππππππ‘π ) = π(ππ‘π+1 = π₯π+1 |ππ‘π = π₯π ) Note, independent increments imply markov property, but not the reverse (as what if ππ+1 = ππ + ππ , where π_π|π₯0 , . . , π₯π βΌ π(βππ , 1) for example)?. This brings in the concept of filtration, where we need to model the flow of public information. Lecture 2.
Tuesday, 7 March 2017
Definition: filtration Let (Ξ©, β±) be a measureable space, and π β [0, β). 1. Assume βπ‘ β π β π βfield, β±π‘ β β±. Assume that, for π β€ π‘ βΉ β±π β β±π‘ . We call the collection of π fields (πΉπ‘ )π‘βπ a filtration. 2. A SP {ππ‘ : π‘ β π} is said to be (β±)π‘βπ adapted if, βπ‘ β π, the RV ππ‘ is β±π‘ β measurable.
Remark: filtration generated by a stochastic process and information If the filtration (β±π‘ )π‘βπ is generated by a stochastic process {ππ‘ : π‘ β π}, then βπ‘ β π β±π‘ = π(ππ : π β π, π β€ π‘) In this case, the π βfield β±π contains all the information of the SP up till time π . -
The concept of filtration can then generalise the definition of the Markov property
11
Definition: Markov Process Let (Ξ©, β±, β) be a probability space, and (β±π‘ )π‘βπ be a filtration. A (β±π‘ )π‘βπ adapted SP {ππ‘ : π‘ β π} is called a Markov process, if, βπ΅ β π(ππ : π β₯ π‘) β(π΅|β±π‘ ) = β(π΅|ππ‘ ) (note that π΅ depends only on {ππ : π β₯ π‘}).
Lecture 3.
Wednesday, 8 March 2017
Markov Chains In probability theory and related fields, a Markov process (or Markoff process), named after the Russian mathematician Andrey Markov, is a stochastic process that satisfies the Markov property[1][2] (sometimes characterized as "memorylessness"). Loosely speaking, a process satisfies the Markov property if one can make predictions for the future of the process based solely on its present state just as well as one could knowing the process's full history; i.e., conditional on the present state of the system, its future and past states are independent. A Markov chain is a type of Markov process that has either discrete state space or discrete index set (often representing time), but the precise definition of a Markov chain varies.[3] For example, it is common to define a Markov chain as a Markov process in either discrete or continuous time with a countable state space (thus regardless of the nature of time)[4][5][6][7], but it is also common to define a Markov chain as having discrete time in either countable or continuous state space (thus regardless of the state space).[8]
-
Discrete time and discrete space problem o
-
After we will look at continuous time and discrete space (Poisson processes)
That is to say, they are indexed by π‘ β π = β = {0,1,2, β¦ }
Basic concepts: Independence of increments are replaced by the Markov property -
That the future and the past are independent given the present
Notation: Given π, π, π0 , β¦ , ππ+π , with π(ππ = ππ ) > 0 : -
we write the past event as 12
{π0 = π0 , π1 = π1 , β¦ , ππβ1 = ππβ1 } β π΄ -
And all future events as {ππ+1 = ππ+1 , ππ+2 = ππ+2 , β¦ , ππ+π = ππ+1 } β π΅
We then get the conditional probability that:
-
π(π΄ β© π΅|ππ = ππ ) = π(π΄|ππ = ππ )π(π΅|ππ = ππ ) This is equivalent that βπ β β, π0 , π1 , β¦ , ππ+1 with π(π0 = π0 , π1 = π1 , β¦ , ππβ1 = ππβ1 ) > 0 that: π(ππ+1 = ππ+1 |π0 = π0 , β¦ , ππ = ππ ) = π(ππ+1 = ππ+1 |ππ = ππ )
(by the Markov property) Transiontion probability The right hand side of the above equation is known as the transition probability. It does not depend on time, but only on the states ππ and ππ+1 . We write that π(ππ+1 = π |ππ = π) β ππ,π
Gambler ruin problem: -
Start with an amount of money $π, with probability π you win $1, and π = 1 β π you lose $1. You stop after you either:
-
o
Lose all money
o
Win up to a certain amount $π
What is the probability that we will succeed with $π without losing everything?
Solution -
His fortune is a MC on {0,1, β¦ , π} β β.
13
$ (discrete) π
π
π+1
π 1βπ
πβ1
Time (discrete)
0
Definite: π΄π ={eventual success starting from $π}; and ππ = π(π΄π ) [the eventual success when starting from initial state π]. -
We have that π0 = 0, ππ = 1 π(π΄π ) = π(π΄π |{π€ππ ππ‘ π})π({π€ππ ππ‘ π}) + π(π΄π |{πππ π ππ‘ π})π({πππ π ππ‘ π}) = π(π΄π |{π€ππ ππ‘ π})π + π(π΄π |πππ π ππ‘ π}) (1 β π) = π(π΄π+1 |{π€ππ ππ‘ π})π + π(π΄πβ1 |{πππ π‘ ππ‘ π})(1 β π)
(as, if we win at π, we go to game π + 1, and if we lose at π we go to game π β 1) = π(π΄π+1 )π + π(π΄πβ1 )(1 β π) (using the markov property) β΄ ππ = ππ+1 π + ππβ1 π Which is difference equation, with π(π΄0 ) = π0 = 0; π(π΄π ) = ππ = 1 The solution to this is: 1βπ π 1β( π ) π
; ππ π β
ππ = 1 β (1 β π) π π 1 ; ππ π = { π 2
1 2
14
-
π
Note that this expression is continuous in π; and that the π expression can be derived based π π
1
1
on the one for π β 2 using the asymptotic behavious 1 β (π) = 4π (π β 2) + 1 2
1
π ((π β 2) ) as π β 2.
We get the same solution if we let π½π be the probability of eventual ruin when starting at π, finding that π½π = ππ½π+1 + ππ½πβ1 , with π½0 = 1 and π½π = 0. This means that the gambler must either succed or be ruined, and the gambler will not be able to converge to a steady state of some other amount of money.
Also; observe that in the limit: π π 1 1 β ( ) [> 0]; ππ π > π 2 lim ππ = πβ+β 1 0; π β€ { 2 So, taking π β +β means that in the limit, the gambler will only ever stop if ruined. In this situation, 1
if each gamble is in the playerβs favour (π > 2), then there is a positive probability that the gambler 1 2
will never get ruined, but instead become infinitely rich. If each gamble is out of favour, (π < ), then the gambler will get ruined almost surely.
Classification of states: π step transition probability notation: Let (π)
ππ0 ,ππ β βπ0 (ππ = ππ ) = β(ππ = ππ |π0 = π0 ) -
The probability that we are at state ππ , given that we started at π0 π steps ago.
-
For ease of notation, ππ,π = ππ,π
(1)
Additional π steps - Where are we after an additional amount of steps?
15
π
π
π
π
(π+π)
ππ,π
π+π
= π(ππ+π = π|π0 = π)
= β π(ππ+π = π, ππ = π |π0 = π) [π. π. βπππππ π‘βπππ’πβ π π‘ππ‘π π] = β π(ππ+π = π|ππ = π, ππ = π)π(ππ = π|π0 = π) [ππππππ‘πππππ ππππππππππ‘π¦] π
= β π(ππ+π |ππ = π)π(ππ = π|ππ = π) [ππ¦ π‘βπ ππππππ£ πππππππ‘π¦] π (π) (π) = β ππ,π ππ,π [π’π πππ πππ‘ππ‘πππ] π (π+π) ππ,π
(π) (π)
= β ππ,π ππ,π π
-
Which looks like the definition of matrix multiplicationβΌ
π step transitional probability matrix (π+π)
(π) (π)
The above equation: ππ,π = βπ ππ,π ππ,π is called the Chapman-Kolmogorov equation, and can be written as the matrix equation: π(π+π) = π(π) π(π)
-
From which we see that π
π(π) = (π(1) )
In the matrix:
16
π·ππ ππππ‘πππ ππππππ (
)
Accessibility: (π)
We say that state π is accessible from state π, β some number of steps π β β+ |ππ,π > 0 -
i.e.: it is possible to get to state π from state π after some amount of states (as probability > 0) can write as π β π
Communicate If π and π are accessible from one another, they are said to communicate, written as π β π Properties of communicating states: 1. reflexivity: π β π 2. symmetry: π β π βΊ π β π 3. transitivity: if π β π, and π β π; then π β π Communicating classes: Communicating states can be partitioned into communicating classes: -
largest set A of states such that all π, π β π΄ communicate. all states in a communicating class communicate with one another o in the gamblers ruin problem; there are 3 communicating classes: ο§ {π} ο§ {0} ο§ {1,2, β¦ , π β 1}
Closed communicating classes We say a communicating class πΆ is closed if no state outside of πΆ can be reached from any state in πΆ. i.e: ππ,π = 0 for π β πΆ and π β πΆ Irreducible: If the markov chain consists of only 1 communicating class, then the MC is said to be irreducible. Absorbing state A state is said to be absorbing, if we cannot go anywhere after it. -
i.e; the set {π} is a closed class, that is ππ,π = 1
o
Lecture 4.
in the gamblerβs guin problem: π0,0 = 1 and ππ,π = 1
Monday, 13 March 2017
17
Example: Markov Chain Consider the MC with states {1,2,3} 1 2 1 2
1 2 1 π= 4 1 0 ( 3
0 1 4 2 3)
Eg: (probability of 1 β 3 is 0) Accessible states:1,1; 1,2; 2,1; 2,2; 2,3; 3,2; 3,3 1β2β3 {1,2,3} is a communicating class Example 2: markov chain 4 states with 1 2 1 π= 2 1 4 (0
1 2 1 2 1 4 0
0
0
0
0
1 4 0
1 4 1)
4 is absorbing sate 1 and 2 communicate 1,2,3,4 is accessible from 3. -
This is not irreducible (3 communicating classes)
Example 3: weather Probability of fine or rain (0,1). Chances of rain tomorrow depends on todayβs conditions. If it is fine today, probability of fine tomorrow is 0.7. if it is rainy today, probability of fine tomorrow is 0.4 0.7 0.3 π=( ) . 4 0.6 -
This is irreducible
3 step transition: 0.7 0.3 3 0.583 . 417 π3 = ( ) =( ) . 4 0.6 . 556 . 441 (3)
Ie: π0,1 = 0.417
18
Recurrence and transience (π)
Let ππ,π denote the probability that the first transition into π takes place at time π, when the chain starts at state π (π)
ππ,π β β({ππ = π} β© {ππβ1 , ππβ2 , β¦ , π1 β π}) -
i.e. the βfirstβ probability from π β π after π steps, without having vistited π in between.
-
If ππ,π = 0 if π β π and ππ,π = 1 if π = π. Then the quantity becomes:
(0)
(0)
+β (π)
ππ,π β β ππ,π = β(ππ = π for some π β₯ 1|π0 = 1) π=1
Recurrence definition: Indicates the probability of ever making a transition into state π when the chain starts at π. We call state π recurrent if ππ,π = 1 (i.e.: starting at π, the chain will almost surely return to itself in a finite number of steps).
Transient definition: A non recurrent state is said to be transient. -
For example, if ππ,π < 1, then state π is transient Not sure that we will return
Green Function: The Green function of the MC is the expected number of visits to π for the chain starting at π. +β
πΊ(π, π) β +β
(π) β ππ,π π=0
+β
= β πΌ(π(ππ = π)|π0 = π) π=0
= πΌ β(π(ππ = π)|π0 = π) π=0
-
Is the expected number of visits to π starting from state π.
Transience and green function: State π is transient iff πΊ(π, π) < β (i.e. the expected number of moves before returning is finite) π‘ππππ πππππ βΊ πΊ(π, π) < β Proof: time j
j
19
After visiting π, the probability of returning is ππ,π after some time. This happens every time we return to state π. As we are counting the number of successes of visits to π, this means the distribution is geometric; with π = ππ,π . βΌ πΊπππππ‘πππ(ππ,π ) π
Mean of geometric is 1βπ πΈ[π] =
ππ,π 1 β ππ,π
But we already know that πΊ(π, π) = πΈ(π), so ππ,π < 1 iff πΊ(π, π) < β
Lecture 5.
Tuesday, 14 March 2017
Recurrence of communicating states If π β π and if state π is recurrent, then state π is recurrent.
Proof: π π As π β πβπ, π|ππ,π , ππ,π > 0. We fix such π, π, it then holds that βπ β₯ 0 π+π +π π ππ,π β₯ ππ,π ππ , π π ππ , π π
Due to the chapman kolmorgov equation when: π+π +π π π π π π π π π β ππ,π β₯ β ππ,π ππ,π ππ,π = ππ,π ππ,π β ππ,π = ππ,π ππ,π πΊ(π, π) = β π
π
π
Recurrence and accessibility If state π is recurrent and state π is accessible from π, then ππ,π = 1 and π β π Proof: (π)
Let π0 = π. As π is accessible from πβπ|ππ,
> 0. Fix such π, we define the following:
π΄0 = {ππ = π}; π1 = min{π β₯ π: ππ = π} π΄1 = {ππ1 +π = π}; π2 = min{π β₯ π1 + π: ππ = π} β¦ π΄π = {πππ +π = π}; ππ+1 = min{π β₯ ππ + π: ππ = π}
π Since π is recurrent; ππ are finite. Then, the MC {π΄π } are independent and have th ππ,π so one of them occurs.
20
Remark: - We have used the Strong Markov Property to show this. Which always holds for discrete time markov chains, and usually for continuous ones. It says that: if π is the stopping time of a MC {ππ }πββ+ and we write π(π, π΅) = ππ ((π0 , π1 , β¦ ) β π΅)
The Strong markov property says that: π((ππ , ππ+1 , β¦ ) β π΅|π0 , π1 , β¦ , ππ ) = π(ππ , π΅) Example: Consider the 4 staes with probability: 1 2 π= 1 0 0 0 1 0 (0 0 0 0 0
1 2 0 0 0)
It is easy to see that all states communicate: 1 β 3 β 2 β 1 β 4 β 2 β 1 -
All states must be recurrent (using the above property)
Example 2: 1 2 1 2 π=
0 0 1 (4
1 0 2 1 0 2 1 0 2 1 0 2 1 0 4
0 0 0 0 1 0 2 1 0 2 1 0 2)
The chain consists of 3 classes: {1,2}, {3,4}, {5}.
The first two classes are recurrent, if the chin starts at 1 it will come back to 1 sometime a.s. however; if it starts at 5, it may never come back, as if it goes to state {1,2} it can never return.
21
Period: Definition The period of state π is the greatest common divisor of the number of steps to come back to π, (π)
starting from π {π β β: ππ,π > 0}, often written as π(π) If π(π) = 1 then the state is called aperiodic.
Lecture 6.
Wednesday, 15 March 2017
Remark on periodicity: The minimum number of steps required to return is purely irrelevant to the concept of periodicity, eg: consider
1 0 2 π=( 0 0 1 0
0 1 0
)
Observe that: starting from state 2; the chain returns to state 2 after 3,5,6 steps. The minimum number of steps required to return to state 2 startin at 2 is 3. Nevertheless, the greatest common divisor is 1, so the periodicity is 1. Communicating states and periodicity If π β π then π(π) = π(π) Proof: If π = π, result is trivial. Suppose π β π. We show thatπ β π means π(π) divides π(π). Find a positive π interer π , such that ππ,π > 0. By definition, this integer divides π(π). Moreover, there exists positive π π interges π, π|ππ,π , ππ,π > 0. Then we have that: π+π π π ππ,π β₯ ππ,π ππ,π > 0
So (π + π) divides π(π). By visiting π in the middle, we have: π+π +π π π π ππ,π β₯ ππ,π ππ,π ππ,β > 0
So (π + π + π) divides π(π). β΄ π divides π(π) and π(π). Meaning that π(π) = π(π) as they are the greatest common divisor
Example: Random walk: Consider the MC on β€ such that, for a given π β [0,1]; π β β€ ππ,π+1 = π; ππ,πβ1 = 1 β π
22
(example of a MC with period 2). 1
We show that, for π = 2 it is recurrent. First, observe that the n step transition probability is binomial π 1 π (2π) 2π 1 π0,0 = ( ) ( ) ( ) π 2 2
Which we approximiate (using Stirlings approximation), as (2π)
π0,0 βΌ
1 βππ
Hence, πΊ(0,0) = β. -
One of a famous theorems in probability extends to higher dimensions (Polya theorem), which says symmetric random walks on β€π are transient iff π β₯ 3
-
Computing the probability of this for a 1D random walk will ever return if π β 2: WLOF, suppose we start at 0. Let ππ be the ππ‘β step of the walk, {ππ }πββ is a sequence of iid RV with
1
+1; ππππππππππ‘π¦ π β1; ππππππππππ‘π¦ 1 β π ππ denotes the position of the walk after π steps, with π0 = 0. So ππ = βππβ1 ππ . Considering the first transition, ππ = {
π(ππ£ππ πππ‘π’ππ|π0 = 0) = π(ππ£ππ πππ‘π’ππ|π0 = 0, π1 = 1)π(π1 = 1) + π(ππ£ππ πππ‘π’ππ|π0 = 0, π1 = β1)π(π1 = β1) = π(ππ£ππ πππ‘π’ππ|π0 = 0, π1 = 1)π + π(ππ£ππ πππ‘π’ππ|π0 = 0, π1 = β1)(1 β π) 1
If π > 2, (walk tends in positive direction), observe by the law of large numbers that as π β +β
π
1 β ππ β πΈ(π1 ) = 2π β 1 (> 0)π. π . π π=1
Which implies that βππβ1 ππ tends to infinity almost surely. If we investigate the transitional probability π(ππ£ππ πππ‘π’ππ|π0 = 0, π1 = +1) conditioning on the second transition, we get
= π(ππ£ππ πππ‘π’ππ|π0 = 0, π1 = +1, π2 = β1)π(π2 = β1) + π(ππ£ππ πππ‘π’ππ|π0 = 0, π1 = +1, π2 = +1)π(π2 = +1) = π(ππ£ππ πππ‘π’ππ|π0 = 0, π1 = 1, π1 = β1)(1 β π) + π(ππ£ππ πππ‘π’ππ|π0 = 0, π1 = 1, π2 = 1)π = 1 β π + π(ππ£ππ πππ‘π’ππ|π0 = 0, π1 = +1, π2 = +1)π = 1 β π + π(ππ£ππ πππ‘ππ 0|π0 = 0, π1 = 1, π2 = 2)π 23
Which holds as the walk restrats after 2 steps. If the walk is at state π2 = 2, in order to ever return to state 0, we must first ever enter state 1. The probability that the walk ever enters state 1 starting from 2 is identical to π(ππ£ππ πππ‘π’ππ π‘π 0|π1 = 1). Similary, the probability that the walk ever enters state 0 from 1 is π(ππ£ππ πππ‘π’ππ π‘π 0|π1 = 1). And so: π(ππ£ππ πππ‘ππ 0|π2 = 2) = π(ππ£ππ πππ‘ππ 0|ππ£ππ πππ‘ππ 1 π π‘πππ‘πππ ππππ 2)π(ππ£ππ πππ‘ππ 1|π π‘πππ‘πππ ππππ 2) + π(ππ£ππ πππ‘ππ 0|πππ£ππ πππ‘ππ 1 π π‘πππ‘πππ ππππ 2)π(πππ£ππ πππ‘ππ 1|π π‘πππ‘πππ ππππ 2) = π(ππ£ππ πππ‘ππ 0|π π‘πππ‘ ππππ 1)π(ππ£ππ πππ‘ππ 1|π π‘πππ‘ ππππ 2) = π(ππ£ππ πππ‘ππ 0|π π‘πππ‘ ππππ 1)2
We get that: π(ππ£ππ πππ‘π’ππ|π0 = 0, π1 = +1) = 1 β π + ππ(ππ£ππ πππ‘π’ππ|π0 = 0, π1 = +1)2 Givins us: π(ππ£ππ πππ‘π’ππ|π0 = 0, π1 = +1) = 1 ππ
1βπ π
The probability =1 is impossible, as we know by transience that it is strictly less than 1. Giving us that π(ππ£ππ πππ‘π’ππ|π0 = 0, π1 = +1) = β΄ π(πΈπ£ππ πππ‘π’ππ) =
1βπ π
2 1βπ
1
For π < 2, we get π(ππ£ππ πππ‘π’ππ_ = 2π Generally thr probability of returning in a Random Walk is: π(ππ£ππ πππ‘π’ππ) = 2 min{π, 1 β π}
2 3
1 3
For example, if ππ,π+1 = ; ππ,πβ1 = , starting at 0, the walk will come back to 0 again with 2 3
1 2
probability . (note the above result inclues π = β π(ππ£ππ πππ‘π’ππ) = 1
Limiting theorems and Stationarity of Markov Chains Expected number of transitions from π to π Definition: Let ππ,π be the expected number of transitions required to return to state π starting from π, for the first time; +β (π)
ππ,π β β πππ,π π=0
24