# MATH310 Spring 2026 - Day 24 **Date**: March 13, 2026 **Topic**: Random Walks (Simplish) - Descriptive Statistics and Covariance **Lecture**: 24 ## Administrative Notes - Workday is next Friday ## Recall: Mathematical Object of a Random Walk From [[MATH310S26-Day23-Notes|Day 23]], we defined: $S_{n+1} = S_n + X_n$ Where: - $S_n$ is the position at time $n$ - $X_n$ are [i.i.d. random variables](https://en.wikipedia.org/wiki/Independent_and_identically_distributed_random_variables) - $S_n = S_0 + \sum_{i=0}^{n-1} X_i$ (accumulation of i.i.d.r.v.) ## Statistics of the Steps ### Setup For our simple random walk with: - $L_1 = L$ (step left magnitude) - $L_2 = L$ (step right magnitude) - Equal step sizes, $L > 0$ ### Expected Value of Steps From [[MATH310S26-Day23-Notes|Day 23]], we found the [expected value](https://en.wikipedia.org/wiki/Expected_value): $E[X] = \mu_X = \sum_i x_i p(x_i)$ For symmetric steps: $E[X] = -L \cdot p_1 + L \cdot p_2$ Substituting $p_1 = 1 - p_2$: $E[X] = -L + 2p_2L$ When $p_2 = \frac{1}{2}$: $E[X] = 0$ ### Variance of Steps The [variance](https://en.wikipedia.org/wiki/Variance) is defined as: $V[X] = E[(X - \mu_X)^2] = E[X^2 - 2\mu_X X + \mu_X^2]$ Expanding: $V[X] = E[X^2] - E[2\mu_X X] + E[\mu_X^2]$ Since $\mu_X$ is a constant: $V[X] = E[X^2] - 2\mu_X E[X] + \mu_X^2 = E[X^2] - \mu_X^2$ ### Computing Variance for Our Random Walk For the symmetric case with $p_2 = \frac{1}{2}$ (so $\mu_X = 0$), using [Bernoulli distribution](https://en.wikipedia.org/wiki/Bernoulli_distribution) properties: $V[X] = E[X^2] - 0 = E[X^2]$ Computing $E[X^2]$: $E[X^2] = \sum_i x_i^2 p(x_i) = L^2 p_1 + L^2 p_2 = L^2(p_1 + p_2) = L^2$ Therefore: **$V[X] = L^2$ for symmetric random walk** ### General Case Variance For asymmetric probabilities but equal step sizes: $E[X^2] = (-L)^2 p_1 + L^2 p_2 = L^2(p_1 + p_2) = L^2$ With $\mu_X = -L + 2p_2L$: $V[X] = L^2 - (-L + 2p_2L)^2$ Expanding: $V[X] = L^2 - L^2(1 - 2p_2)^2$ $V[X] = L^2[1 - (1 - 2p_2)^2]$ $V[X] = L^2[1 - 1 + 4p_2 - 4p_2^2]$ $V[X] = 4L^2p_2(1 - p_2) = 4L^2p_1p_2$ **Key insight**: Variance is maximized when $p_1 = p_2 = \frac{1}{2}$ ## Back to the Walkers ### Expected Position For the walker's position after $n$ steps: $E[S_n] = E\left[S_0 + \sum_{i=0}^{n-1} X_i\right] = S_0 + \sum_{i=0}^{n-1} E[X_i] = S_0 + n\mu_X$ For symmetric random walk ($\mu_X = 0$): $E[S_n] = S_0$ ### Variance of Position Since the $X_i$ are [independent](https://en.wikipedia.org/wiki/Independence_(probability_theory)): $V[S_n] = V\left[S_0 + \sum_{i=0}^{n-1} X_i\right]$ Since $S_0$ is a constant (no variance): $V[S_n] = V\left[\sum_{i=0}^{n-1} X_i\right] = \sum_{i=0}^{n-1} V[X_i]$ Because all $X_i$ are identically distributed: $V[S_n] = nV[X]$ For symmetric random walk: $V[S_n] = nL^2$ ### Standard Deviation and Spread The [standard deviation](https://en.wikipedia.org/wiki/Standard_deviation) of position: $\sigma_{S_n} = \sqrt{V[S_n]} = \sqrt{nV[X]} = \sqrt{nL^2} = L\sqrt{n}$ **Critical observation**: - Spread grows as $\sqrt{n}$ (**sublinear growth**) - After $n$ steps, typical distance from origin is $O(\sqrt{n})$ - This is characteristic of [diffusion processes](https://en.wikipedia.org/wiki/Diffusion) **Simulation**: Fun, interactive, [research-based](https://phet.colorado.edu/en/research) simulations of physical phenomena from the PhET™ project at the University of Colorado.  "PhET provides fun, interactive, research-based simulations of physical phenomena for free. We believe that our research-based approach- incorporating findings from prior research and our own testing- enables students to make connections between real-life phenomena and the underlying science, deepening their understanding and appreciation of the physical world. * https://phet.colorado.edu/sims/html/plinko-probability/latest/plinko-probability_en.html ## Important Properties Summary For symmetric random walk with equal step sizes $L$ and $p_2 = \frac{1}{2}$: | Quantity | Value | |----------|-------| | $E[X]$ | $0$ | | $V[X]$ | $L^2$ | | $E[S_n]$ | $S_0$ | | $V[S_n]$ | $nL^2$ | | $\sigma_{S_n}$ | $L\sqrt{n}$ | ## Key Insights 1. **No change in $L$ → No change in variance**: When step sizes are equal, variance depends only on probabilities (related to [Bernoulli trials](https://en.wikipedia.org/wiki/Bernoulli_trial)) 2. **Independence is crucial**: $V[S_n] = nV[X]$ only holds because steps are independent 3. **[Sublinear](https://en.wikipedia.org/wiki/Time_complexity#Sub-linear_time) spread**: Distance from origin grows as $\sqrt{n}$ ([diffusive behavior](https://en.wikipedia.org/wiki/Diffusion)), not linearly with $n$ ## Check Your Understanding 1. Why does variance of the walker position equal $n$ times variance of individual steps? 2. What happens to the spread of walkers if we double the step size $L$? 3. For biased random walk ($p_2 \neq \frac{1}{2}$), how does expected position change with time? 4. How does this connect to covariance? (see [[MATH310S26-Day25-Notes|Day 25]]) ## Mathematical Connections - Builds on [[MATH310S26-Day23-Notes|Day 23]] random walk introduction - Variance calculation connects to [[MATH310S26-Day5-Notes|Day 5-6]] covariance matrices - $\sqrt{n}$ growth connects to [Brownian motion](https://en.wikipedia.org/wiki/Brownian_motion) - Foundation for understanding [diffusion equation](https://en.wikipedia.org/wiki/Diffusion_equation) and [Einstein relation](https://en.wikipedia.org/wiki/Einstein_relation_(kinetic_theory)) - Sets up covariance analysis in [[MATH310S26-Day25-Notes|Day 25]] ## Next Class Preview - Continue with [[MATH310S26-Day25-Notes|Day 25]]: covariance and correlation - Connection to [central limit theorem](https://en.wikipedia.org/wiki/Central_limit_theorem) - [Probability distributions](https://en.wikipedia.org/wiki/Probability_distribution) of walker positions