Probability, Random Variables, Generating Functions, and Markov Chains
Poisson Distribution and Arrival Modeling
Conceptual Definition:
- A Poisson variable models a series of events that occur independently of each other in space or time at a constant, known average rate.
- It represents a discrete count of occurrences across a continuous domain (time or space).
- Formulated by French mathematician Siméon-Denis Poisson (1781–1840).
Mathematical Specifications:
- Parameter: Requires a single parameter, , which represents the expected number of occurrences (average rate) in the specified interval.
- Support / Range: The sample space consists of all non-negative integers: .
- Probability Mass Function (PMF):
Verification of Total Probability:
- Summing the PMF over all possible values of establishes that the probabilities sum to using the Taylor series expansion of :
Derivation of Expectation:
- The expected value is derived from the definition of expectation:
- The term is zero, so the index shifts to :
- Factoring out :
Application Examples:
- Lightbulb Failures: In a large building, lightbulbs fail independently without external shocks (e.g., power surges). If bulbs require replacement at an average rate of 1 per hour, the number of failures in a given hour is modeled by .
- Call Centre Inquiries: A call centre receives calls at an average rate of throughout its working day. Calls arrive independently and uniformly over time, such that . The exact probability of receiving exactly 17 calls in a specific hour is:
Limiting Derivation of the Poisson Distribution
Binomial Foundation:
- The Poisson distribution arises as the limiting case of a Binomial distribution as the number of trials approaches infinity while the expected value remains constant.
- A Binomial variable represents the sum of independent Bernoulli trials, each with success probability .
Time Discretization Process:
- A continuous time unit (e.g., 1 day) is partitioned into sub-intervals of equal length.
- For sufficiently large , each interval is small enough that at most one event can occur within it, transforming each interval into a Bernoulli trial.
- To keep the overall expected number of events equal to , the probability of an event in any single sub-interval is set to .
- The count of occurrences across the entire period is modeled by , preserving the expectation .
Step-by-Step Limit Proof:
- The Binomial probability mass function evaluated at successes is:
- Rearranging terms:
- Analyzing individual limits as for fixed :
- Combining these limits gives the Poisson PMF:
Merging and Splitting of Poisson Variables
Merging Independent Poisson Variables:
- Theorem: If and are independent random variables, their sum is distributed as .
- Proof by Convolution: The event occurs when and for any : Factoring out constants independent of : By the Binomial Theorem, : Hence, .
- Merging Example: A commercial website tracks hourly traffic. Non-purchasing visitors arrive at an average rate of (). Purchasing visitors arrive at an average rate of (). The total hourly visitor count is:
Splitting Poisson Variables (Thinning):
- Theorem: Let total events follow . If each event is independently classified as Type 1 with probability and Type 2 with probability , the count of Type 1 events is distributed as .
- Proof by Total Probability: Condition on the total count , where is the number of Type 1 events and is the number of Type 2 events: Summing over all possible values of (): Recognizing that : Therefore, .
- Splitting Example: A retail shop expects an average of . If () of arrivals are male and enter independently, the arrival of male customers per hour is modeled by:
Poisson Processes and Exponential Waiting Times
Poisson Process Definition:
- A continuous-time stochastic process with rate parameter is a Poisson process if:
- is a counting process with taking values in non-negative integers .
- Stationary Increments: The distribution of the number of events counted in any time interval of length depends only on the interval duration , not on the starting point.
- Independent Increments: The counts of events occurring across disjoint time intervals are statistically independent.
- For any duration , the count in that interval satisfies , with PMF:
- A continuous-time stochastic process with rate parameter is a Poisson process if:
Derivation of Waiting Times:
- Let denote the waiting time until the first event occurs.
- For any duration , the event that the waiting time exceeds () is identical to the event that zero arrivals occur in the interval ():
- The cumulative distribution function (CDF) of is:
- Differentiating the CDF yields the probability density function (PDF):
- Thus, the waiting time follows an Exponential distribution: .
Properties of the Exponential Distribution:
- PDF Integration Verification:
- Expectation Derivation (Integration by Parts): Setting () and (): Intuition: If arrivals occur at rate , the expected inter-arrival duration is .
- Memoryless (No-Memory) Property: For any elapsed waiting durations : Implication: The probability of waiting an additional time does not depend on the already elapsed wait time .
Relative Arrival Times of Independent Processes:
- Suppose two individuals, A and B, experience independent random events (e.g., accidents) modeled as Poisson processes with rates and , respectively.
- Let and be their respective times until the next event.
- The probability that A experiences an accident before B is found by conditioning on the occurrence time of A's accident:
- Since and :
- If A has a higher rate than B (), then .
Comparison of Analytical Approaches:
- Problem Statement: Purchasing customers arrive at rate ; non-purchasing customers arrive at rate . What is the probability that over a 2-hour window, exactly 3 customers enter the shop and all 3 make a purchase?
- Method 1 (Merged Total Rate and Conditional Binomial Probabilities):
- Combined arrival rate is . Over , the total arrival count follows .
- The probability of 3 total arrivals is:
- Each arrival is a purchasing customer with probability . The probability all 3 purchase is .
- Joint probability:
- Method 2 (Independent Poisson Factorization):
- In , purchasing arrivals follow and non-purchasing arrivals follow .
- The event requires and :
- By independence, multiply the individual probabilities:
- Both formulations produce identical results.
Sums of Random Variables and Generating Functions
Convolutional Bottleneck for Sums of Random Variables:
- Let Coin A be tossed 5 times () and Coin B be tossed 10 times (). Both coins are fair.
- To determine the distribution of directly via convolution:
- Simplifying this expression to prove that requires non-trivial combinatorial summation identities.
- Summing more than two variables compounds this complexity. For four independent variables , evaluating necessitates a triple nested summation:
Generating Functions Definition:
- A generating function transforms a probability distribution into a function of a dummy variable , streamlining calculations involving sums and moments.
- The generating function of a random variable is defined as:
- Discrete Form: For a discrete variable taking non-negative integer values:
- Continuous Form: For a continuous random variable with PDF :
- Example (Fair Six-Sided Die): For a fair die with PMF for :
Extracting Moments from Generating Functions:
- First Derivative and Expectation: Evaluating at :
- Second Derivative and Variance: Evaluating at : Rearranging for : The variance is given by:
Sum of Independent Random Variables:
- Theorem: If and are independent random variables, the generating function of their sum is the product of their individual generating functions:
- Summation Proof: Setting and , the double sum factors into independent sums:
Common Generating Functions and Applications
Poisson Distribution ():
- Derivation:
- Sum of Independent Poisson Variables: If are i.i.d. with , and : Matching this generating function to the standard form demonstrates that .
Bernoulli Distribution ():
- With support , where and :
Binomial Distribution ():
- Since where , its generating function is:
Geometric Distribution ():
- Defined over trials until the first success, with support and PMF :
- For , summing this geometric progression gives:
Exponential Distribution ():
- For continuous PDF ():
- Writing :
- Evaluating this integral (valid for ):
Sum of a Random Number of Random Variables
Theoretical Framework:
- In many real-world processes, both the individual terms and the number of terms being summed are random variables.
- Real-World Example: An insurance firm's total annual payout depends on two distinct random components: the total count of individual claims () and the monetary size of each claim ().
- Let be a non-negative integer-valued random variable, and let be i.i.d. random variables with common generating function . Define .
- The random sum is defined as:
Derivation of the Compound Generating Function:
- By the Law of Total Expectation:
- Conditional on , is a sum of independent random variables:
- Substituting back into the total expectation:
- By definition, . Replacing the argument with gives:
- Rule: The generating function of a random sum of i.i.d. variables is the generating function of the counting variable , evaluated at the generating function of the individual terms .
The Poisson Hen Problem:
- A hen lays eggs. Each egg independently hatches into a chick with probability .
- The number of chicks from the -th egg is a Bernoulli trial: .
- The total number of hatched chicks is .
- Component generating functions:
- Evaluating the compound generating function:
- This matches the generating function of a Poisson distribution: .
Vehicle Passing Waiting Time:
- A driver overtakes vehicles according to a Poisson process at a rate of .
- The inter-arrival time between successive vehicles follows .
- Each overtaken vehicle is blue with probability (), independent of all other vehicles.
- The number of vehicles overtaken until the first blue vehicle appears follows a Geometric distribution: .
- The total time elapsed until the next blue vehicle is overtaken is the random sum:
- The component generating functions are:
- Evaluating the compound generating function:
- Multiplying numerator and denominator by :
- This matches the generating function of an Exponential distribution: .
- Consistency: Thinning a Poisson process of rate with probability yields a Poisson process of blue cars with rate , whose inter-arrival time is distributed as .
Time Series and the Markov Property
Time Series Characterization:
- A time series is a sequential collection of data points recorded at successive time intervals (e.g., tracking the AUD to USD exchange rate over a 20-year period).
- Predictive modeling of time series involves determining:
- Whether future values depend exclusively on the current value.
- Whether momentum exists, requiring the historical trajectory to be factored in.
- Whether external variables outside the series have predictive utility.
Spurious Correlations:
- High mathematical correlation between two historical time series does not imply a causal relationship or predictive validity.
- Real-World Spurious Examples:
- U.S. crude oil imports from Norway correlated with drivers killed in railway collisions ( correlation).
- Total revenue of U.S. skiing facilities correlated with deaths from bedsheet tangling ( correlation).
- Number of films featuring Nicolas Cage correlated with swimming-pool drownings ( correlation).

The Markov Property:
- Let be a sequence of random variables taking values in a discrete state space .
- The sequence is a Markov Chain if the conditional distribution of any future state depends only on the current state, independent of past history: for all steps and all states .
- Named after Russian mathematician Andrey Markov (1856–1922).
Classification of Real-World Systems:
- Snakes and Ladders: The state space is . If a player's path from through is recorded, the probability distribution of depends solely on current square , making it a Markov Chain.
- Population Eye Color Proportions: The discretized proportion of a population with green eyes functions as a Markov Chain, as there is no inherent momentum driving the proportion up or down over time.
- Harmful Genetic Conditions: The discretized proportion of a population with a harmful genetic condition is not a Markov Chain. Because the condition reduces reproductive fitness, the historical transmission rate affects future frequency.
- Bucket Water Volume: Adding 1 Litre of water per minute to a bucket without drainage is a Markov Chain, since the future volume is fully determined by the current volume: .
- Gambler's Bankroll: In a game of pure chance, the gambler's bankroll is a Markov Chain. If the game involves skill, past performance conveys information about player skill level, violating the Markov property.

Random Walks and Linear Difference Equations
Simple Random Walk Formalism:
- A random walk is a Markov chain on an integer state space where transitions are restricted to adjacent states with defined probabilities .
- Coin Toss Game (Gambler's Ruin): A player bets on a fair coin. Heads awards (net gain ); Tails awards (net loss ). Both outcomes have probability .
- The player begins with an initial fortune of and plays repeatedly until reaching either (ruin) or (target profit). State space: .
Formulating Difference Equations via Total Probability:
- Let denote the probability of eventually reaching the target fortune () before going broke, starting from current fortune .
- Partitioning over the outcome of the next bet:
- For a fair coin ():
- Rearranging into standard form:
- Boundary conditions:
- (bankrupt; target cannot be reached).
- (target reached; absorption occurs).
Theory of Linear Difference Equations:
- First-Order Difference Equations: The relation has the general solution . Example: .
- Second-Order Linear Homogeneous Difference Equations: For the equation , assume a trial solution of the form . Substituting this into the difference equation gives the characteristic equation: Case 1: Distinct Roots ():Case 2: Repeated Roots ():
- Worked Example (Distinct Roots): Solve . The characteristic equation is , which factors as , giving roots and . General solution: .
Analytical Solution for the Fair Coin Walk:
- The equation has the characteristic equation .
- Factoring gives , yielding the repeated root .
- General solution:
- Applying the boundary conditions:
- The probability of reaching from fortune is:
- For an initial capital of :
Asymmetric Random Walks and Casino Ruin Probabilities
European Roulette Formulation:
- A gambler wagers repeatedly on an even-money bet on a European roulette wheel (18 red pockets, 18 black pockets, 1 green zero pocket; 37 pockets total).
- Winning probability: .
- Losing probability: .
- The player starts with and plays until reaching (profit target) or (ruin).
Difference Equation Derivation:
- Conditioning on the next spin:
- Rearranging into standard form:
- Boundary conditions: and .
Solution via Characteristic Roots:
- The characteristic equation is:
- Factoring:
- Since the roots are distinct, the general solution is:
- Applying boundary condition :
- Applying boundary condition :
- The particular solution for the winning probability is:
The Effect of House Edge over Time:
- Consider a player starting with () attempting to double their money to ():
- Comparison: In a fair game (), the player has a chance of reaching the target (). In European roulette, despite a modest house advantage per bet ( versus ), the probability of doubling the bankroll drops from to .
Expected Duration of Random Walks and Simulation
Expected Duration of Play:
- Let denote the expected number of bets until absorption (reaching either or ), starting with .
- The player must take at least 10 bets to conclude if starting at , but can continue indefinitely.
- Conditioning on the next coin toss:
- Rearranging into a second-order non-homogeneous difference equation:
- Boundary conditions: (Zero additional steps are required if the player is already at an absorption boundary).
- The exact analytical solution is:
- Finding the starting value that maximizes duration:
- The expected duration is maximized at (the point furthest from both boundaries), with an expected duration of:
Stochastic Simulation:
- When analytic solutions to difference equations or complex Markov systems are intractable, computer packages simulate large numbers of realizations.
- Sample paths are generated numerically, and statistical properties (such as absorption probabilities and expected duration) are estimated by averaging across runs.
- Demonstration: A plot of 20 realizations of a random walk starting at position 0 (representing starting capital) shows paths either hitting the upper boundary at ( total capital) or the lower boundary at ( total capital).
