Stochastic Processes
A stochastic process is a family of random variables indexed by time. The subject is organized by which dependence structure you keep: Markov chains keep “the future depends only on the present” (discrete time, then continuous); renewal theory keeps only “iid gaps between events”; martingales keep only “fair given the past”; Brownian motion is what survives every scaling limit. Two computational moves do most of the work in the entire subject: first-step analysis (condition on the first step, let the Markov property restart the clock) and optional stopping (a fair game stays fair at a well-behaved random time). The recurring destination: long-run behavior — stationary distributions, limit theorems, and the LLN/CLT shadows each structure casts.
1. Markov chains — the object
- A (discrete-time) Markov chain is a process on a countable state space with the Markov property:
The future is independent of the past given the present. The present state is a sufficient statistic for prediction.
- Time homogeneous: transition probabilities don’t depend on . Then the chain is fully specified by two objects: the transition matrix (rows are probability distributions: entries ≥ 0, rows sum to 1) and the initial distribution .
- Build the joint distribution by peeling one step at a time with the Markov property:
- n-step transitions are matrix powers. Condition on the intermediate state (Chapman–Kolmogorov):
and distributions evolve as a row vector hitting the matrix: . This is track 2’s “powers and dynamics” section with a stochastic matrix — eigenvalues run the long-run show, and is always present.
- Numeric anchor — the 2-state chain :
Identical rows in the limit: the chain forgets where it started. The decaying term is the second eigenvalue doing exactly what track 2’s spectral-gap implication promised.
- The cast of examples to keep loaded: random walk on (steps ±1), gambler’s ruin (absorbing ends), Ehrenfest urns (repelling ends), simple random walk on a graph (), success runs, iid sequences (all rows equal), branching processes. A warning from the deterministic-square example: a function of a Markov chain need not be Markov — lumping states can manufacture memory.
Core competency set
- State the Markov property and what “time homogeneous” adds; specify a chain by .
- Derive from Chapman–Kolmogorov and evolve .
- Read the 2-state limit as eigenvalue decay; give an example where a function of a chain isn’t Markov.
2. First-step analysis — the workhorse
The single most-used computational move in the subject. To compute any “until” quantity — hitting probabilities, expected absorption times — condition on the first step; the Markov property restarts the chain from the new state; you get linear equations.
Set-up: hitting time , return time (they differ only when you start in ). A state with is absorbing.
Worked anchor — gambler’s ruin with up, down, states , absorbing at 0 and 4. Let — the probability of winning from :
- Boundary values are free: , .
- Condition on the first step from state 1:
- Same at every interior state: , . Three linear equations; solving gives
- Expected absorption time — identical move plus “+1” for the step taken:
- Patterns in coin flips, same machine. To find with a fair coin, the state must capture current progress through the pattern — the length of the longest suffix of flips so far that is a prefix of HTH:
- state 0: no usable progress; state 1: have
H; state 2: haveHT; state 3:HTHcomplete (absorbing). - Transitions read off “what does the next flip do to the longest matching prefix”: from 1 (
H) a tail givesHT(state 2), a head keepsH(state 1); from 2 (HT) a head completesHTH(state 3), a tail drops toTwhich matches nothing useful (state 0).
- state 0: no usable progress; state 1: have
- Let , so and each interior state pays for the flip taken:
- Solve by elimination. Clear the self-loop in each of the first two (move the term left, double):
Chain them down to , then substitute the equation:
Collect : , so . Designing the right state space is the skill — the state must capture exactly what the future needs.
Implications
- Absorption probabilities and expected accumulated rewards before absorption all satisfy the same template — one linear solve, many questions.
- The same equations return in continuous time with the generator (§9) and for Brownian motion via martingales (§12) — learn the move once.
Core competency set
- Set up and solve (hitting probability) and (expected time) systems from a blank page, boundary conditions first.
- Build a pattern-tracking state space (HTH) and explain why state design is the real work.
3. Stopping times and the strong Markov property
- A random time is a stopping time if for every , the event is determined by — you can tell when it happens that it happened, no future peeking. Gambling intuition: a quitting rule you could actually implement.
- Examples: hitting times, return times, th return times. Non-example: the last visit to a set () — knowing it’s the last visit requires the future.
- Strong Markov property: the chain restarts not just at fixed times but at stopping times — conditional on and , the process is a fresh copy of the chain started at , independent of the pre- past.
- What it buys, immediately: successive return times to a state have iid gaps. Starting at , each return restarts the chain at , so
— returning times is just returning once, independent times. This single identity drives the entire classification theory of §4.
Implications — what restart-the-clock buys:
- The path decomposes into iid excursions between returns. That one consequence powers the classification theory (§4), the frequency identity (§5), and the ergodic theorem’s LLN-for-chains (§6).
- “You can’t peek” is the same license behind Wald’s equation (§10) and optional stopping (§11) — random times behave like fixed times precisely when the decision to stop never uses the future.
Core competency set
- Define stopping time; classify hitting/return/last-visit times correctly.
- State the strong Markov property and derive from it.
4. Recurrence and transience — classifying states
- Recurrent: — the chain returns, hence (by §3) returns infinitely often. Transient: — each return is a coin flip that eventually fails; the number of visits is Geometric, and
So the practical test: is recurrent ⟺ (expected visits infinite).
- Communication: if ; a set is closed if you can’t leave, irreducible if everything communicates with everything.
- The structural theorems, with their one-line mechanisms:
- If but with certainty (), then is transient — there’s a positive-probability escape route that never comes back.
- Recurrence spreads through communication: recurrent and ⟹ recurrent. Use the test recurrent , so the goal is to show returns to sum to infinity. Since and communicate, pick a -step path and an -step path , both of positive probability: , . One way to return in steps is to run ( steps), loop ( steps), then ( steps); keeping only that single route lower-bounds the full transition (Chapman–Kolmogorov sums over all intermediate paths):
Sum over and pull the two constants out of the sum:
is recurrent, so ; multiplied by the two positive constants the right side is . The left side is a sub-series of , so that diverges too — is recurrent.
- A finite closed set must contain a recurrent state. Suppose not — every state of is transient. A transient state has finite expected visits, (the visit count is Geometric, §4 above), and is finite, so a finite sum of finite terms is finite:
But is closed: the chain never leaves, so it takes infinitely many steps each landing somewhere in , making total visits infinite:
The two displays contradict, so some state of must be recurrent.
- Theorem: finite + closed + irreducible ⟹ all states recurrent.
- Decomposition theorem: any finite state space splits as — transient states plus closed irreducible recurrent classes. The chain falls out of into one of the and then lives there. (Gambler’s ruin: , , .)
The picture to hold (and redraw cold): the state space as islands — a transient region with one-way arrows leaking out of it into closed recurrent islands . Inside each island everything communicates; between islands, nothing. Every finite chain’s long-run story is: fall out of , get trapped on one island, circulate there forever.
- Recurrence splits further by how long return takes: positive recurrent if , null recurrent if recurrent but .
- Worked trichotomy — the reflecting random walk on (up with , down with , reflected at 0):
| behavior | why | |
|---|---|---|
| positive recurrent | drift home; stationary distribution exists, | |
| null recurrent | returns with probability 1 (Gambler’s-ruin limit ) but | |
| transient | escape probability |
Null recurrence is the genuinely new phenomenon infinite state spaces allow: certain to return, but on a timescale with no mean.
Core competency set
- Define recurrent/transient three equivalent ways (, infinitely-many-visits, ).
- Prove the finite-closed-irreducible theorem’s two lemmas in skeleton form.
- Reproduce the reflecting-walk trichotomy with the reason for each regime.
5. Stationary distributions
- is stationary if — run the chain one step from and the distribution is unchanged. In track 2 language: is a left eigenvector of with eigenvalue 1, which a stochastic matrix always has.
- Detailed balance (stronger, easier to check): for all pairs. Sand picture: is sand piled on states, moves it; detailed balance says every pair of states exchanges equal sand, so certainly each state’s total is conserved. DBC ⟹ stationary in one line:
- Where DBC is the fast route:
- Birth–death chains (transitions only to neighbors — Ehrenfest, gambler’s ruin, reflecting RW): only adjacent pairs need checking. Ehrenfest with balls: — binomial, concentrated at , the statistical-mechanics equilibrium.
- SRW on a graph: guess ; for an edge , , symmetric in ✓. Normalize: . Time spent at a vertex ∝ its degree. Regular graph ⟹ uniform.
- Doubly stochastic (columns also sum to 1) ⟹ uniform .
- Computing in general is linear algebra: solve with (drop one redundant equation, substitute the normalization). Numeric anchor — social mobility gives .
- The frequency identity — what is: for irreducible recurrent chains,
Proof idea: returns to have iid gaps (strong Markov), so by the SLLN the long-run fraction of time at is one visit per steps — a period’s reciprocal is a frequency. This also shows is unique (the formula has no free choices), and ties positive recurrence to .
- Reversibility: run a stationary chain backwards and you get a Markov chain with ; DBC ⟺ the reversed chain has the same transition probabilities — the movie looks identical played backwards.
Core competency set
- Verify and exploit detailed balance; derive for SRW on a graph and uniform for doubly stochastic.
- Solve by hand for a 3-state chain.
- State and explain via iid return gaps.
6. Convergence, ergodicity, and MCMC
Two distinct questions about long-run behavior — keep them separate:
- Does ? Needs more than a stationary distribution. The flip-flop counterexample has but alternates forever — periodicity is the obstruction. Period of = gcd of possible return times; aperiodic = period 1. Convergence theorem: irreducible + aperiodic + stationary distribution exists ⟹ for all — the chain forgets its start.
- Do time averages converge? Needs less: Ergodic theorem — irreducible + stationary (no aperiodicity needed!):
An LLN for dependent, Markov data. With : the fraction of time in converges to — even for the flip-flop chain, which never converges in distribution but spends exactly half its time in each state.
MCMC — the payoff. Goal: compute for a too complicated to sum over (often known only up to a normalizing constant). Idea: build an irreducible chain whose stationary distribution is , run it, and let the ergodic theorem average for you.
Metropolis–Hastings: propose moves from any convenient , accept with probability
(else stay put). The acceptance ratio is engineered to force detailed balance — check: WLOG ; then
- The killer feature: only the ratio appears — normalizing constants cancel. For the Ising model, on configurations: is hopeless to compute, but flip one spin and the ratio is a local quantity . This is why MCMC runs all of Bayesian computation (track 7) and statistical physics.
- Designing is the art; mixing time (how long until the ergodic average is trustworthy) is the science — and it’s governed by the spectral gap of the transition matrix, exactly track 2’s convergence-rate implication made load-bearing. Famous instance: seven riffle shuffles ≈ mix a deck across its 52! states.
Core competency set
- Separate the two convergence questions; produce the flip-flop counterexample and what survives it (time averages).
- State both theorems with exact hypotheses (where aperiodicity is and isn’t needed).
- Derive M–H’s detailed balance and explain why normalizing constants cancel.
7. Branching processes — extinction by generating function
- Population model: each individual independently has children with offspring pmf ; (a random sum — track 1’s tower machinery). Let .
- The mean evolves geometrically — condition on the current generation:
- Extinction probability . Two soft cases first: ⟹ extinction certain, by Markov’s inequality (track 1’s tail bound, cashed in):
And ⟹ no extinction, trivially.
- The general tool is the generating function , with , , , increasing and convex on .
- First-step analysis on the family tree: for the line to die out, each of the first-generation children’s independent subtrees must die out — each with the same probability :
Extinction probability is a fixed point of . Iterating from climbs monotonically to the smallest fixed point in — that’s the theorem: = smallest solution of .
- Geometry: is convex, anchored at with slope there. If the curve stays above the diagonal until 1 — only fixed point is 1, extinction certain (even at , the critical case). If the curve dips below the diagonal — a second fixed point appears, survival possible. This is the picture to redraw cold: the unit square, the diagonal , the convex curve from up to , with the slope at 1 (= ) deciding whether it crosses the diagonal early; iterating staircases up from into the first crossing.
- Numeric anchor: ⟹ ;
(1 is always a root — use it to factor.) Coin-flip odds of a lineage lasting forever despite exponential expected growth.
Core competency set
- Derive and the Markov-inequality argument for .
- Derive by first-step analysis on subtrees; state and use “smallest fixed point”; sketch the convexity picture for the three regimes .
8. The Poisson process — exponential clocks
The continuous-time foundation. Everything flows from the memorylessness of the exponential (track 1’s characterization): .
- Exponential races — the engine of all continuous-time constructions. For independent , , :
Derivation of the first (the rate-adds fact). The minimum exceeds exactly when every clock does:
The are independent, so the joint survival probability factors:
Collect exponents ():
which is the survival function of . Rates add; the winner is chosen proportional to rate; who wins tells you nothing about when.
- Poisson process , two equivalent descriptions (the equivalence is the theorem):
- Axioms: ; ; increments over disjoint intervals independent.
- Construction: arrival gaps iid , , . This is track 1’s “one process, three slices” (Pois counts / Exp first wait / Gamma th wait) — now with the machinery to prove it. Memorylessness is what makes the restart-at- argument work: the time from to the next arrival is no matter how long you’ve waited.
- The closure operations, each with its one-line reason:
- Superposition: independent summed ⟹ — exponential races at every arrival.
- Thinning: label each arrival type with probability independently ⟹ the type- processes are independent — the multinomial split of a Poisson count factors exactly.
- Conditioning: given , the arrival times are distributed as iid Uniform points, sorted. (So given , .) Poisson arrivals carry no clustering information beyond their count.
- Compound: (random sums again): , .
- Numeric anchor (races as thinning): trucks , cars . Each arrival is independently a truck with probability , so P(6 trucks before 4 cars) = P(≥6 of the first 9 arrivals are trucks) — a continuous-time question collapsed to a binomial.
Core competency set
- Prove the three parts of exponential races; state both PP descriptions and why memorylessness links them.
- Apply superposition/thinning/conditioning, including the uniform-order-statistics fact.
- Convert a “race” question to a binomial via thinning.
9. Continuous-time Markov chains
- Same Markov property, continuous index. Specified by jump rates — derivatives of transition probabilities at 0.
- Mechanics of the chain (the construction): sitting at , every destination runs an independent clock. The exponential race (§8) decides: leave at rate after an wait, jump to with probability . The jump sequence alone is a discrete chain (the embedded chain with matrix ); the waits decorate it with continuous time.
- The generator packages everything: off-diagonal, (rows sum to 0). Then transition probabilities solve the Kolmogorov equations and exponentiate the generator —
track 2’s matrix exponential and , cashed in directly.
- Stationary distribution: stationary ⟺ . Written out: — rate in = rate out at every state, the continuous balance equation.
- No aperiodicity needed: exponential waits can’t synchronize, so irreducible + stationary ⟹ . Periodicity was a discrete-time disease.
- Numeric anchor — weather: sunny → cloudy → rain → sunny. ; solving with normalization: — exactly the mean waits over the cycle length 8. Time-share = waiting time share.
- Standard models as rate bookkeeping: M/M/k queue — arrivals ; services race, . Continuous branching — births , deaths ( independent clocks each).
- Exit problems run on the embedded chain / generator submatrix: — first-step analysis again, in matrix clothing.
Core competency set
- Construct a CTMC from rates via exponential races; extract and the embedded .
- Write , state , and solve reading it as rate-in = rate-out (weather example from scratch).
- Explain why aperiodicity disappears in continuous time.
10. Renewal theory — only iid gaps
Drop the exponential: gaps iid from any nonnegative distribution, arrivals , count , . The Poisson process is the special (memoryless) case. The pivot identity for everything: .
- Rate: with probability 1,
Proof skeleton — sandwich between the arrivals bracketing it, then let the SLLN drive. By the definition of , the -th arrival has happened by and the next overshoots:
Divide through by :
As , , and both ends : the left is (SLLN), the right is . The middle is squeezed:
- Wald’s equation: a stopping time for iid , :
The proof’s one trick, displayed. Rewrite the random-length sum as an infinite sum of censored terms:
The event is determined by — the past — hence independent of . So expectations factor term by term:
(the last step is the tail-sum formula for nonnegative integer RVs). Stopping times can’t peek — that is the entire theorem. Counterexample when the condition fails: the symmetric walk stopped at its first hit of 1 has — here is the hypothesis that breaks.
-
Elementary renewal theorem: for (needs its own proof — convergence a.s. doesn’t give convergence of expectations; Wald + truncation does it). Blackwell sharpens: far from the origin, expected renewals in ≈ — every renewal process is asymptotically Poisson-like in its mean. The picture to hold (and redraw cold): the renewal staircase — stepping up by 1 at each arrival , the gaps laid along the time axis. Mark a time inside a gap: the age stretches back to the last arrival, the residual stretches forward to the next. Every theorem in this section is a statement about that picture.
-
The inspection paradox — the memorable payoff. Inspect the process at a large time : the gap you land in has the size-biased distribution, density — long gaps cover more of the timeline, so you’re more likely to land in one. Limiting distributions (via the Key Renewal Theorem):
Skeleton for the age limit (the KRT pattern, run once). The age says the last arrival before landed in . Decompose over which renewal is that last one — it sits in and the following arrival overshoots :
Condition on the arrival time (with law ); given , the next gap must exceed , an independent event of probability :
Summing the arrival-time laws over is exactly the renewal measure, :
(summing the arrival-time CDFs over gives exactly the renewal measure ). The Key Renewal Theorem then replaces far from the origin by its long-run density (Blackwell):
Age and residual have the same limit (the process is a renewal process backwards too). Anchors: gaps ⟹ age is (memorylessness, consistently); gaps () ⟹ age density — piled near 0. Same phenomenon as “survey a random person about family size and you oversample big families.”
Core competency set
- Prove by the sandwich; state the pivot.
- Prove Wald via the indicator-independence trick and produce the counterexample.
- Explain the inspection paradox, give the size-biased density, and run the uniform anchor.
11. Martingales — fairness as structure
- is a martingale if and
— a fair game: given the whole past, the expected next value is the current value. Taking expectations: for all fixed . No Markov assumption anywhere — this is a different axis of structure.
- The stock examples, each one conditioning computation: sums of mean-zero independents (); (variance compensated); for biased walks (exponential compensated); products of mean-1 independents; Polya’s urn proportion (add a ball of the drawn color — the proportion is fair); for any fixed (accumulating information about a fixed quantity is always a martingale — Doob).
- Optional stopping theorem (MST): holds at a stopping time provided things don’t blow up — versions: (i) bounded; (ii) and for . You cannot beat a fair game with a quitting rule — unless you smuggle in unboundedness (the “double until you win” strategies live exactly in the failure cases).
- Maximal inequality — Markov for whole paths. For a nonnegative submartingale (; e.g. for any martingale ):
Proof. Let be the first time with , and if the threshold is never reached — a bounded stopping time. Optional stopping for a submartingale () bounds the stopped value by the endpoint:
Now bound below using : on the event the threshold was hit so , and off it , hence :
Chain the two inequalities and divide by :
Fairness lets the endpoint control the entire running maximum — the engine inside the convergence theorem below and the theory.
Gambler’s ruin, replayed entirely by optional stopping — the showcase. Start at , target , = first hit of or . ( via the block argument: some length- all-win block eventually occurs.)
- Fair case: is a bounded-before- martingale, so
- Expected duration: is a martingale ⟹ . Numbers: : win probability , but plays.
- Biased case (): isn’t a martingale but is; optional stopping gives
Numbers: roulette , , : . A hair of house edge, compounded over the long duration, annihilates the 90% — the single most practical fact in the chapter.
- Concentration — Azuma–Hoeffding: a martingale with bounded increments satisfies
(transform-then-Markov on , the Chernoff move from track 1, run with conditional expectations). Corollary, the bounded difference inequality: any function of independent variables that changes by ≤ when one coordinate changes is concentrated within of its mean — via the Doob martingale . Applications: bin packing, chromatic number of a random graph — concentration without knowing the mean.
- Martingale convergence: a martingale with — in particular any bounded or -bounded martingale — converges a.s. Fair games settle down. Polya’s urn proportion converges to a random limit (Uniform(0,1) for the 1+1 start): fairness forces convergence but not to anything deterministic.
Core competency set
- Verify a martingale by one conditioning computation (do and cold).
- State optional stopping with its conditions and why “double-until-you-win” evades them.
- Run all three gambler’s-ruin computations by optional stopping; quote the roulette number.
- State Azuma + bounded differences and what the Doob martingale construction does.
12. Brownian motion
- Standard BM: a random continuous function with , increments , disjoint increments independent. It’s the scaling limit of random walks (Donsker): for any iid mean-0 variance-1 steps — the CLT upgraded from a number to a whole path. Normal increments aren’t an assumption so much as a consequence: continuous paths + independent increments forces them.
- Character: nowhere differentiable, no interval of monotonicity — legitimately rough. Invariances worth keeping: scaling ( is BM), symmetry (), time inversion ().
- The covariance that determines everything — for , split off the independent increment:
BM is a Gaussian process (every finite collection of values jointly normal), and a Gaussian process is completely determined by its mean and covariance functions. So “mean 0, covariance , continuous paths” is an equivalent definition — verifying a candidate process is BM reduces to two computations (that’s exactly how time inversion is checked).
- Markov and strong Markov: is a fresh BM independent of the past, for a stopping time.
- The martingales of BM (continuous-time versions of §11’s stock examples):
- Gambler’s ruin in continuum — optional stopping, third performance. = first exit of , :
- Reflection principle: reflect the path after it first hits level . Let be the first time reaches (with ), and reflect everything after across the line :
By the strong Markov property the post- increments are a fresh BM independent of the past, and by symmetry their reflection is equally likely — so is itself a standard BM. The picture to hold: a path rising to its first touch of , then two continuations — the true one and its mirror image in the line — equally likely.
Now the running max. Reaching level by time is hitting by time : . Split that hitting event by where the path ends:
First term: forces the path to have already crossed , so and the term is just . Second term: reflection sends each path with to one with , a measure-preserving bijection, so it equals :
( has probability 0). Since :
And the hitting time of level has density — so heavy-tailed that : BM hits every level with probability 1, on a timescale with no mean (null recurrence again, in continuum).
- Drift: as (since ). For negative drift , the all-time max is exponential — via the exponential martingale with and optional stopping:
- A taste of Itô (the bridge to track 8 and finance): stochastic integrals are martingales; the rules of the calculus compress to , , , giving Itô’s formula
— the chain rule plus a second-order correction, because accumulates quadratic variation . Flagship computation: geometric Brownian motion solves to
with the punchline threshold: if , if — positive drift is not enough; you must beat half the variance. Volatility itself drags geometric growth down.
Core competency set
- Define BM by its three properties; state Donsker’s meaning in one sentence.
- Verify and the exponential martingale; replay continuum gambler’s ruin (, ) by optional stopping.
- Derive from the reflection principle.
- State Itô’s formula, the rule, the GBM solution, and the vs threshold.
13. Memorize cold
The instant-recall layer — these should cost nothing to produce; the fluency flashcards drill exactly this list.
- Markov property; ; Chapman–Kolmogorov .
- First-step template: with boundary values; .
- ; recurrent ⟺ ; finite + closed + irreducible ⟹ recurrent.
- Reflecting-walk trichotomy: positive recurrent / null recurrent / transient.
- Stationarity ; detailed balance ; SRW on graph ; doubly stochastic ⟹ uniform; .
- Convergence: I + A + S ⟹ ; ergodic theorem: I + S ⟹ time averages → .
- M–H acceptance: ; ratios kill normalizing constants.
- Branching: ; extinction = smallest root of , .
- Exponential races: , winner w.p. , independent of when.
- PP: gaps iid ⟺ counts Pois() + independent increments; thinning ⟹ independent ; superposition adds rates; given , arrivals ~ sorted Uniforms.
- CTMC: ; ; ; stationary ⟺ (rate in = rate out); no aperiodicity needed.
- Renewal: ; Wald ; size-biased density ; age/residual limit density .
- Martingale definition; optional stopping conditions; the three gambler’s-ruin answers: , , .
- Azuma: ; maximal inequality (nonnegative submartingale).
- BM: increments , independent; ; martingales ; exit answers , ; ; ; GBM with the threshold.
- Named moves: first-step analysis; restart-the-clock (strong Markov); rate-in = rate-out; sandwich-then-SLLN (renewal rate); indicator-can’t-peek (Wald); compensate-then-stop (optional stopping with , , ); reflect-the-path.