Randomness in Motion

Until now, we've looked at single snapshots of randomness (like a single coin flip). But most systems in the real world evolve over time. A Stochastic Process is just a sequence of random variables—one for every moment in time: {Xt:tT}\{X_t : t \in T\}.

EExample
Real-World Processes
  • Discrete Time: The closing price of a stock every day (X1,X2,X_1, X_2, \ldots).
  • Continuous Time: The fluctuating voltage in a power grid at every millisecond.
  • Discrete State: The current floor a lift is on (Floor 1, 2, 3...).
  • Continuous State: The exact coordinates of a GPS tracker.
Markov Chains: The 'Forgetful' Process

A Markov Chain is the simplest type of time-dependent process. it follows the Markov Property: the future depends only on the state you are in right now, not on the path you took to get there.

Intuition
The Memoryless Frog

Imagine a frog jumping between lily pads. If the frog is on 'Pad A', the probability of its next jump depends only on Pad A. It doesn't matter if it jumped from B or C to get there. The frog has no memory of its journey!

The Transition Matrix

We describe these jumps using a Transition Matrix (PP), where the entry PijP_{ij} is the probability of moving from state ii to state jj.

From ToSunnyRainyCloudy
Sunny0.70.20.1
Rainy0.30.40.3
Cloudy0.40.30.3

Markov Chain: Weather Model

0.70.20.10.30.40.30.40.30.3SunnyRainyCloudy
Stationary Distribution: The Long Run

If you let a Markov chain run for a very long time, it often settles into a "steady state." This is the Stationary Distribution (π\pi). It represents the percentage of time you'll spend in each state in the long run.

EExample
Google's PageRank

The original PageRank algorithm was just a massive Markov chain! It simulated a "random surfer" clicking links on the web. The websites with the highest Stationary Distribution (the pads where the surfer spent the most time) were ranked the highest in search results.

Poisson Processes: Random Arrivals

A Poisson Process models events that happen independently and continuously over time at a constant average rate λ\lambda.

EExample
Arrival Examples
  • The number of calls arriving at an emergency dispatch center (λ=20\lambda = 20/hour).
  • The number of particles emitted by a radioactive source.
  • The number of photons hitting a digital camera sensor.

Poisson Process: Cumulative Arrivals

As time (t) goes on, the total number of events N(t) climbs in discrete steps. A higher rate (λ) means the 'staircase' climbs much more steeply.

-1.12.25.58.812.10-0.0440.4140.8711.3291.7862.244Slow (λ=2): (0, 0)Slow (λ=2): (0.3, 1)Slow (λ=2): (0.8, 2)Slow (λ=2): (1.5, 3)Slow (λ=2): (2.2, 4)Fast (λ=5): (0, 0)Fast (λ=5): (0.1, 1)Fast (λ=5): (0.3, 3)Fast (λ=5): (0.6, 5)Fast (λ=5): (1, 8)Fast (λ=5): (1.5, 11)xy
Slow (λ=2)Fast (λ=5)
Random Walks: The Gambler's Path

A Random Walk is what happens when you take a random step at every tick of the clock. It is the foundation of Financial Mathematics and particle physics.

Intuition
The Symmetric Walk

Imagine starting at 0 and flipping a coin. If Heads, move +1+1. If Tails, move 1-1.

  1. Expected Position (E[Sn]E[S_n]): On average, you stay exactly at 0.
  2. Expected Distance: Even though you average at 0, you drift further away over time. Your average distance from the start grows at a rate of n\sqrt{n} (the square root of the number of steps).

Random Walk Realizations

Three different 'Gamblers' starting with $0. Because every step is random, their paths diverge wildly over time, even though they all have the same 'fair' odds.

-6.2-2.614.68.2-19.419.8030.2040.6051Lucky Path: (0, 0)Lucky Path: (10, 2)Lucky Path: (20, -1)Lucky Path: (30, 3)Lucky Path: (40, 1)Lucky Path: (50, 4)Unlucky Path: (0, 0)Unlucky Path: (10, -3)Unlucky Path: (20, -5)Unlucky Path: (30, -2)Unlucky Path: (40, -4)Unlucky Path: (50, -1)Volatile Path: (0, 0)Volatile Path: (10, 1)Volatile Path: (20, 3)Volatile Path: (30, 2)Volatile Path: (40, 5)Volatile Path: (50, 7)xy
Lucky PathUnlucky PathVolatile Path
EExample
Efficient Market Hypothesis

In finance, many argue that stock prices follow a random walk. If today's price change is truly random, you cannot predict tomorrow's price based on today's. This is why "beating the market" through timing is so difficult!