0%

Stochastic Process Cheat Sheet

By Z.H. Fu
https://fuzihaofzh.github.io/blog/

In the realm of stochastic processes and queueing theory, understanding various mathematical models and their applications is essential for tackling real-world problems efficiently. This comprehensive “Stochastic Process Cheat Sheet” provides a valuable resource for grasping the fundamentals of Poisson processes, Markov chains, continuous-time Markov chains, Martingales, Queueing Theory, and more. This guide covers a wide range of topics, from basic definitions to intricate equations and practical examples.

Poisson Process

counting process independent increments: if the numbers of events that occur in disjoint time intervals are independent. P(N(s+t)N(s)N(s))=P(N(s+t)N(s))P(N(s+t)-N(s)|N(s))=P(N(s+t)-N(s)),P(XiXj)=P(Xi)P(X_i|X_j)=P(X_i)

counting process stationary increments: if the distribution of the number of events that occur in any interval of time depends only on the length of the time interval.

Define 1

The counting process {N(t),t0}\{N(t), t\ge 0\} is said to be a Poisson process having rate λ,λ>0\lambda, \lambda > 0, if

(i) N(0)=0N(0)= 0;
(ii) The process has independent increments;
(iii) The number of events in any interval of length tt is Poisson distributed with mean λt\lambda t Thatis,for all s,t0s,t\ge0,
P{N(t+s)N(s)=n}=eλt(λt)nn!,  n=0,1,P\{N(t+s)- N(s)=n\}= e^{-\lambda t}\frac{(\lambda t)^n}{n!}, \ \ n=0,1,\cdots
From (iii), we have: E[N(t)]=λtE[N(t)] = \lambda t

Define 2

(i) N(0)=0N(0)= 0
(ii) The process has stationary and independent increments.
(iii) $P{N(h) = 1} = \lambda h + o(h) $
(iv) P{N(h)>2}=o(h)P\{N(h) > 2\} = o(h)

Interarrival

XnX_ndenote the time between the (n1)(n- 1)st and the nnth event. P{X1>t}=P{N(t)=0}=eλtP\{X_1>t\}=P\{N(t) =0\}=e^{-\lambda t}, P{X2>tX1=s}=eλtP\{X_2>t|X_1=s\}=e^{-\lambda t}. XiX_i i.i.d, mean=1/λ1/\lambda r.v.
SnS_n is the arrival time of the nnth event, Sn=i=1nXi,n1S_n=\sum_{i=1}^nX_i,n\ge1. SnS_n has a gamma distribution with parameters nn and λ\lambda,P{Snt}=P{N(t)n}=j=neλt(λt)jj!f(t)=P\{S_n\le t \} =P\{ N( t ) \ge n\}=\sum_{j=n}^\infty e^{-\lambda t}\frac{(\lambda t)^j}{j!} \Rightarrow f(t)= λeλt(λt)n1(n1)!,t0\lambda e^{-\lambda t}\frac{(\lambda t)^{n-1}}{(n-1)!},t\ge0

Conditional Distribution of the Arrival Times

Known at tt, one event happen, give the distribution of the time that the event happen. It’s uniform dist.P{X1<sN(t)=1}=s/tP\{X_1<s|N(t) = 1\}=s/t
Generalization: Given that N(t)=nN(t) = n, the nn arrival times S1,...,SnS_1,...,S_n, have the same distribution as the order statistics corresponding to n independent random variables uniformly distributed on the interval (0,t)(0,t)
f(t1,...,tn)=P{tiSiti+h,i=1,...,nN(t)=n}/(h1h2hn)=n!/tnf(t_1,...,t_n)=P\{t_i\le S_i \le t_i+h,i=1,...,n|N(t)=n\}/(h_1h_2\cdots h_n)=n!/t^n

Nonhomogeneous

(i) N(0)=0N(0) = 0
(ii) {N(t),t0}\{N(t),t \ge 0\} has independent increments
(iii) P{N(t+h)N(t)2}=o(h)P\{N(t +h) - N(t) \ge 2\}= o(h)
(iv) P{N(t+h)N(t)=1}=λ(t)h+o(h)P\{N(t+h)- N(t)=1\}=\lambda(t)h+o(h)
let m(t)=0tλ(s)dsm(t)=\int_0^t\lambda(s)ds, we have P{N(t+s)N(t)=n}=P\{N(t+s)-N(t)=n\}= exp{(m(t+s)m(t))}[m(t+s)m(t)]n/n!\exp\{-(m(t+s)-m(t))\}[m(t+s)-m(t)]^n/n!. The form is substitute λt\lambda t with m(t+s)m(t)m(t+s)-m(t). We can think of the non-homo­geneous process as being a random sample from a homogeneous Poi sson process with probability λ(t)λ\frac{\lambda(t)}{\lambda}.

Compound Poisson Random Variables

W=i=1NXi,Npoisson(λ)W=\sum_{i=1}^NX_i,N\sim poisson(\lambda),
generating function of WW is E[etW]=E[e^{tW}]= n=0E[etWN=n]P{N=n}=\sum_{n=0}^\infty E[e^{tW}|N=n]P\{N=n\}= exp{λ(ϕX(t)1)},ϕX(t)=\exp\{\lambda(\phi_X(t)-1)\},\phi_X(t)= E[etXi]E[e^{tX_i}]
E[W]=λE[X],Var(W)=λE[X2]E[W]=\lambda E[X],Var(W)=\lambda E[X^2]
property: E[Wh(W)]=λE[Xh(W+X)]E[Wh(W)]=\lambda E[Xh(W+X)], we can get:
E[W]=λE[X],E[W2]=E[W]=\lambda E[X],E[W^2]= λE[X2]+λ2(E[X])2,E[W3]=\lambda E[X^2]+\lambda^2(E[X])^2,E[W^3]= λE[X3]+3λ2E[X]E[X2]+λ3(E[X])3\lambda E[X^3]+3\lambda ^2E[X]E[X^2]+\lambda^3(E[X])^3

Markov Chains

PijP_{ij} from ii to jj. j=0Pij=1\sum_{j=0}^\infty P_{ij}=1

Chapman-Kolmogorov Equations

Pijn=P{Xn+m=jXm=i},n0,i,j0P_{ij}^n=P\{X_{n+m}=j|X_m=i\}, n\ge 0, i,j \ge 0. We have Pijn+m=P_{ij}^{n+m}= k=0PiknPkjm\sum_{k=0}^\infty P_{ik}^nP_{kj}^m in matrix form P(n+m)=P(n)P(m)P^{(n+m)}=P^{(n)}P^{(m)}. Proof: Pijn+m=P_{ij}^{n+m}= P{Xn+m=jX0=i}P\{X_{n+m}=j|X_0=i\} =k=0P{Xn+m=j,Xn=kX0=i}=\sum_{k=0}^\infty P\{X_{n+m}=j,X_n=k|X_0=i\} =k=0P{Xn+m=jXn=k,X0=i}P{Xn=kX0=i}=\sum_{k=0}^\infty P\{X_{n+m}=j|X_n=k,X_0=i\}P\{X_{n}=k|X_0=i\} =...=...

accessible : jj is accessible from state ii if n0,s.t.Pijn>0\exists n\ge 0, s.t. P_{ij}^n>0.

communicate: states ii and jj accessible to each other. (i)iii \leftrightarrow i; (ii)ifij,thenjiif i \leftrightarrow j, then j \leftrightarrow i; (iii) ifijandjk,thenikif i \leftrightarrow j and j \leftrightarrow k, then i \leftrightarrow k(Proof: Pijn+m=k=0PiknPkjmP_{ij}^{n+m}=\sum_{k=0}^\infty P_{ik}^nP_{kj}^m PijnPjkm>0\ge P_{ij}^nP_{jk}^m>0).

class : Two states that communicate are said to be in the same class.

irreducible : if there is only one class in a markov chain.

period: State ii is said to have period dd if Piin=0P_{ii}^n=0 when ever nn is not divisible by dd and dd is the greatest integer with this property. If iji \leftrightarrow j, then d(i)=d(j)d(i)=d(j). Perid is a class property.

aperiodic: A state with period 1 is said to be aperiodic.

first passage time:fijnf_{ij}^n to be the probability that, starting in ii, the first transition into jj occurs at time nn. fij=n=1fijnf_{ij}=\sum_{n=1}^\infty f_{ij}^n.

In recursive form: fijn=kjpikfkj(n1)f_{ij}^n=\sum_{k\ne j}p_{ik}f_{kj}^{(n-1)}.

If n=1fij(n)<1\sum_{n=1}^\infty f_{ij}^{(n)}<1, means there exists probability that start from ii and never arrive at jj. Denote the expected first passage time from ii to jj as μij=\mu_{ij}= (ifn=1fij(n)<1);\infty (if \sum_{n=1}^\infty f_{ij}^{(n)}<1); =n=1nfij(n)(ifn=1fij(n)=1)=\sum_{n=1}^\infty nf_{ij}^{(n)}(if \sum_{n=1}^\infty f_{ij}^{(n)}=1)

recursive form: μij=1+kjpikμkj\mu_{ij}=1+\sum_{k\ne j}p_{ik}\mu_{kj}

recurrent: fjj=1f_{jj}=1,

transient otherwise. jj is recurrent iff n=1Pjjn=\sum_{n=1}^\infty P_{jj}^n=\infty. recurrent implies that the visit time to the node is infinity: E[number of visit to jX0=j]=E[\text{number of visit to j}|X_0=j]=\infty. In a finite-state Markov chain not all states can be transient. If iji \leftrightarrow j and ii is recurrent, then j is recurrent. Same with transient.

If iji \leftrightarrow j and jj is recurrent, then fij=1f_{ij}=1.

transient: iff there exists a state j(ji)j ( j \ne i) that is accessible from state ii but not vice versa, that is, state ii is not accessible from state jj.

upon entering this state, the process might never return to this state again. Transient is a class property.

recurrent: not transient. is a class property.

absorbing state: A state that is never left once the process enters that state.

Limit Theorems

μjj\mu_{jj} denote the expected number of transitions needed to return to state j. μjj=(j is transient);\mu_{jj}=\infty (\text{j is transient}); =n=1nfjjn(j is recurrent)=\sum_{n=1}^\infty nf_{jj}^n (\text{j is recurrent}) πj=limnPjjnd(j)\pi_j=\lim_{n\rightarrow \infty}P_{jj}^{nd(j)} μii=1/πi\mu_{ii}=1/\pi_i
if ii and jj communicate, then

(i) P{limtNj(t)/t=1/μjjX0=i}=1P\{\lim_{t\rightarrow \infty}N_j(t)/t=1/\mu_{jj}|X_0=i\}=1
(ii)limnk=1nPijk/n=1/μjj\lim_{n\rightarrow\infty}\sum_{k=1}^nP_{ij}^k/n=1/\mu_{jj}
(iii) If jj is aperiodic, then limnPijn=1/μjj\lim_{n\rightarrow \infty}P_{ij}^n=1/\mu_{jj}
(iv) If jj has period d, then limnPijnd=d/μjj\lim_{n\rightarrow \infty}P_{ij}^{nd}=d/\mu_{jj}

positive recurrent : μjj<\mu_{jj}<\infty. Is a class property. πj>0\pi_j>0

null recurrent :μjj=\mu_{jj}=\infty. Is a class property.πj=0\pi_j=0

ergodic: positive recurrent states that are aperiodic are called ergodic states.

stationary: A probability distribution {Pj,j0}\{P_j, j \ge 0\} is said to be stationary for the Markov chain if Pj=i=0PiPij,j0P_j=\sum_{i=0}^\infty P_iP_{ij},j\ge 0. If the initial probability distribution is the stationary distribution, then XnX_n will have the same distribution for all nn.

Continuous Time Markov Chains

Markovian property

a) indepent of previous states: P{X(t+s)=jX(s)=i,X(r)=x(r)}=P{X(t+s)=jX(s)=i}P\{X(t+s)=j|X(s)=i,X(r)=x(r)\}=P\{X(t+s)=j|X(s)=i\} r<s,t>0\forall r<s,t>0

b) Independent of initial time
P{X(t+s)=jX(s)=i}=P{X(t)=jX(0)=i}P\{X(t+s)=j|X(s)=i\}=P\{X(t)=j|X(0)=i\}
If, PX(t+s)=jX(s)=iP{ X( t + s ) = j | X( s) = i} is independent of ss, then the continuous-time Markov chain is said to have stationary or homogeneous transition probabilities.

transition probability function pij(t)=P{X(t)=jX(0)=i}p_{ij}(t)=P\{X(t)=j|X(0)=i\}, limt0pij(t)=1(i=j);=0(ij)\lim_{t\rightarrow 0}p_{ij}(t)=1(i=j);=0(i\ne j)

Time staying at some state By Markovian, $P{T_i>t+s|T_i>s}=P{T_i>t} $ P{Tit}=1eqit\Rightarrow P\{T_i\le t\}=1-e^{-q_it}, qi=1/E[Ti]q_i=1/E[T_i] is leaving times in unit time,denote qijq_{ij} the times leaving i and enter j,we have qi=jiqijq_i=\sum_{j\ne i}q_{ij}.

Chapman-Kolmogorov pij(t)=k=0Mpik(s)pkj(ts)p_{ij}(t)=\sum_{k=0}^M p_{ik}(s)p_{kj}(t-s)

stead state limtpij(t)=πj\lim_{t\rightarrow\infty}p_{ij}(t)=\pi_j, πj=k=0Mπipij(t)\pi_j=\sum_{k=0}^M\pi_ip_{ij}(t),Usually use a more easy equations:πjqj=ijπiqij,j=0Mπj=1\pi_jq_j=\sum_{i\ne j}\pi_i q_{ij},\sum_{j=0}^M\pi_j=1

Martingales

Martingales: {Zn,n1}\{Z_n,n\ge1\} is a martingale if E[Zn]<,nE[|Z_n|]<\infty,\forall n and E[Zn+1Z1,Z2,,Zn]=ZnE[Z_{n+1}|Z_1,Z_2,\cdots,Z_n]=Z_n.

take expectation get: E[Zn+1]=E[Zn]E[Z_{n+1}]=E[Z_n] then E[Zn]=E[Z1],nE[Z_n]=E[Z_1],\forall n

Conditional Expectation: E(aY1+bY2Fn)=aE(Y1Fn)+bE(Y2Fn)E(aY_1+bY_2|F_n)=aE(Y_1|F_n)+bE(Y_2|F_n); If YY is the function about X1,,XnX_1,\ldots,X_n,then E[YFn]=YE[Y|F_n]=Y;if YY is an arbitary r.v. ,ZZ is a measurable r.v. about X1,,XnX_1,\ldots,X_n,then E[YZFn]=ZE[YFn]E[YZ|F_n]=ZE[Y|F_n]

0 mean independent r.v. sum is martingale: XiX_i is independent r.v. with 0 mean; Zn=i=1nXiZ_n=\sum_{i=1}^nX_i is a martingale. Since E[Zn+1Z1,,Zn]E[Z_{n+1}|Z_1,\cdots,Z_n] =E[Zn+Xn+1Z1,,Zn]=E[Z_n+X_{n+1}|Z_1,\cdots,Z_n] =E[ZnZ1,,Zn]+E[Xn+1Z1,,Zn]=E[Z_n|Z_1,\cdots,Z_n]+E[X_{n+1}|Z_1,\cdots,Z_n] =Zn+E[Xn+1]=Zn=Z_n+E[X_{n+1}]=Z_n,note: Zn=E[ZnZ1,,Zn],ZnZ_n=E[Z_n|Z_1,\cdots,Z_n],\because Z_n is given

1 mean independent r.v. product is martingale: XiX_i is independent r.v. with 1 mean; Zn=i=1nXiZ_n=\prod_{i=1}^nX_i is a martingale. Since E[Zn+1Z1,,Zn]E[Z_{n+1}|Z_1,\cdots,Z_n] =E[ZnXn+1Z1,,Zn]=E[Z_nX_{n+1}|Z_1,\cdots,Z_n] =ZnE[Xn+1Z1,,Zn]=Z_nE[X_{n+1}|Z_1,\cdots,Z_n] =ZnE[Xn+1]=Zn=Z_nE[X_{n+1}]=Z_n

Queueing Theory

Distribution of interarrival times/Distribution of service times/Number of servers
Example: M/M/s,M/G/1。M=exponential distribution (Markovian);D=degenerate distribution (constant times);EkE_k=Erlang distribution (shape parameter k);G=general distribution (any arbitrary distribution allowed)

Stochastic Process Models

M/G/1 Queue

Interarrival times is exponential. let XnX_n denote the number of customers left behind by the nnth depar­ture. Also, let YnY_n denote the number of customers arriving during the service period of the (n+1)(n + 1)st customer. We have Xn+1=Xn1+Yn(Xn>0);=Yn(Xn=0)X_{n+1}=X_n-1+Y_n (X_n > 0);=Y_n (X_n=0). P{Yn=j}=0eλx(λx)j/j!dG(x)P\{Y_n=j\}=\int_0^\infty e^{-\lambda x}(\lambda x)^j/j!dG(x). \Rightarrow P0j=0eλx(λx)j/j!dG(x)P_{0j}=\int_0^\infty e^{-\lambda x}(\lambda x)^j/j!dG(x). Pij=0eλx(λx)ji+1/(ji+1)!dG(x)P_{ij}=\int_0^\infty e^{-\lambda x}(\lambda x)^{j-i+1}/(j-i+1)!dG(x),(ji1,i1)(j\ge i-1, i\ge 1), $P_{ij}=0 $(otherwise).

G/M/1 Queue

Let XnX_n denote the number of customers in the system as seen by the nnth arrival. Pi,i+1j=0eμt(μt)j/j!dG(x)P_{i,i+1-j}=\int_0^\infty e^{-\mu t}(\mu t)^j/j!dG(x), j=0,,ij=0,\cdots,i. Pi0=0k=i+1eμt(μt)k/k!dG(x),i0P_{i0}=\int_0^\infty \sum_{k=i+1}^\infty e^{-\mu t}(\mu t)^k/k!dG(x), i\ge 0

Gambler’s Ruin Problem

p0,0=pN,N=1,pi,i+1=p=1pi,i1p_{0,0}=p_{N,N}=1,p_{i,i+1}=p=1-p_{i,i-1}
Solution: Let fif_i denote the probability that starting with i, the fortune will eventually reach N. We obtain: fi=pfi+1+qfi1f_i=pf_{i+1}+qf_{i-1} fi+1fi=q/p(fifi1),,fNfN1=(q/p)N1f1\Rightarrow f_{i+1}-f_i=q/p(f_i-f_{i-1}),\ldots, f_N-f_{N-1}=(q/p)^{N-1}f_1 fif1=f1[q/p+(q/p)2++(q/p)i1]\Rightarrow f_i-f_1=f_1[q/p+(q/p)^2+\cdots+(q/p)^{i-1}] fi=(1(q/p)i)/(1(q/p)N),ifp1/2;=i/Nelifp=1/2\Rightarrow f_i=(1-(q/p)^i)/(1-(q/p)^N),if p\ne 1/2;=i/N elif p=1/2. The probability of stop at 0 is 1fi1-f_i

Alarm Clock Problem

n clock are exponential distributed with parameters : b1,,bnb_1,\ldots,b_n, P(Ti>t)=exp(bit)P(T_i>t)=\exp(-b_i t). R.v. T=min{T1,,Tn}T=\min\{T_1,\ldots,T_n\} P(Tt)=P(T1t)P(T2t)P(Tnt)=exp((b1++bn)t)P(T\ge t)=P(T_1\ge t)P(T_2\ge t)\cdots P(T_n\ge t)=\exp(-(b_1+\cdots+b_n)t)

Probability that T1T_1 ring first :P(T1=T)=0P(T2>t,,Tn>t)P(T1=t)dtP(T_1=T)=\int_0^\infty P(T_2>t,\cdots,T_n>t)P(T_1=t)dt =0exp((b2++bn)t)b1exp(b1t)dt=b1/(b1++bn)=\int_0^\infty \exp(-(b_2+\cdots+b_n)t)b_1\exp(-b_1 t)dt=b_1/(b_1+\cdots+b_n)

Absolute Value of Simple Random Walk

Sn=1nXnS_n=\sum_1^nX_n, P{Xi=1}=pP\{X_i =1\}=p, P{Xi=1}=1p=qP\{X_i =-1\}=1-p=q. Let j=max{k:0kn,ik=0}j=\max\{k:0\le k\le n,i_k=0\}, P{Sn=iSn=i,,S1=i1}=\therefore P\{S_n=i||S_n|=i,\cdots,|S_1|=i_1\}= P{Sn=iSn=i,,Sj=0}P\{S_n=i||S_n|=i,\cdots,|S_j|=0\}, P(Sn=i...)=p(nj)/2+i/2q(nj)/2i/2\therefore P(S_n=i|...)=p^{(n-j)/2+i/2}q^{(n-j)/2-i/2} P(Sn=i...)=p(nj)/2i/2q(nj)/2+i/2\therefore P(S_n=-i|...)=p^{(n-j)/2-i/2}q^{(n-j)/2+i/2}
P(Sn=i...)=P(Sn=i...)/(P(Sn=i...)+P(Sn=i...))P(S_n=i|...)=P(S_n=i|...)/(P(S_n=i|...)+P(S_n=-i|...)) =pi/(pi+qi)=p^i/(p^i+q^i) P{Sn+1=i+1Sn=i,Sn1,,S1}\therefore P\{|S_{n+1}|=i+1||S_n|=i,|S_{n-1},\cdots,|S_1|\} =P{Sn+1=i+1Sn=i}pi/(pi+qi)=P\{S_{n+1}=i+1|S_n=i\}p^i/(p^i+q^i) +P{Sn+1=(i+1)Sn=i}qi/(pi+qi)+P\{S_{n+1}=-(i+1)|S_n=-i\}q^i/(p^i+q^i) =(pi+1+qi+1)/(pi+qi)=(p^{i+1}+q^{i+1})/(p^i+q^i) Pi,i+1=(pi+1+qi+1)/(pi+qi)\therefore P_{i,i+1}=(p^{i+1}+q^{i+1})/(p^i+q^i) =1Pi,i1,i>0=1-P_{i,i-1},i>0 P01=1P_{01}=1

Simple Random Walk

Pi,i+1=p=1Pi,i1P_{i,i+1}=p=1-P_{i,i-1}. Firstly, step number cannot be even, i.e. P002n+1=0P_{00}^{2n+1}=0. P002n=(2nn)pn(1p)nP_{00}^{2n}=\binom{2n}{n}p^n(1-p)^n =(2n)!n!n!(p(1p))n=\frac{(2n)!}{n!n!}(p(1-p))^n. By Stirling, P002n(4p(1p))n/πnP_{00}^{2n}\sim (4p(1-p))^n/\sqrt{\pi n}. $\therefore $ if n=1(4p(1p))n/πn=\sum_{n=1}^\infty (4p(1-p))^n/\sqrt{\pi n}=\infty (only when p=1/2p=1/2) it will be recurrent. otherwise transient.