Given a collection of weights $\{W(x,t)\}_{x\in \mathbb{Z}, t\in \mathbb{N}}$ one can solve the minimization problem \[\min_\gamma \sum_{t = 0}^N W(\gamma(t), t)\] over nearest neighbor paths $\gamma:\{0,\dots, N\}\to \mathbb{Z}$ satisfying $\gamma(0) = x_0$ and $\gamma(N) = x_N.$ This video depicts these optimal paths started at various points and ending at $x_N = 0.$ The weights $\{W(x,t)\}_{x\in \mathbb{Z}, t\in \mathbb{N}}$ are taken to be i.i.d. uniform $[0,1]$ random variables. Even though the weights are random, the paths exhibit certain predictable phenomenon, such as coalescence. This probabilistic model is closely related to my research. I made the simulation and video in Python.
This video gives an illustration of how volatility (or variance) can impact asset returns. The purple dots have low volatility, the blue medium volatility, and the red high volatility. Given independent and identically distributed positive random variables $(Z_t)_{t\in \mathbb{N}}$ with $\mathbb{E}[Z_t] = 1 + r$, for $r > 0$, one can model returns of an asset by the sequence $(R_T)_{T\in \mathbb{N}}$, where $R_T$ is defined as \[R_T = \prod_{t = 1}^T Z_t.\] In the video I display the simulated trajectories of $R_T$ for three different distributions of the $Z_t,$ all having the same mean but with increasing variance.
By independence, $\mathbb{E}[R_T] = \prod_{t= 1}^T \mathbb{E}[Z_t] = (1+r)^T.$ But, it is a fact that if $Z_t$ is not constant and $\mathbb{E}[|\log(Z_t)|] < \infty$ for all $t\in \mathbb{N}$, then \[\lim_{T\to \infty} \frac{R_T}{(1+r)^T} = 0\] with probability 1. What the above limit says is that in the long run $R_T$ will become a smaller and smaller proportion of its expectation $(1+r)^T.$ This result is not a contradiction with $\mathbb{E}[R_T] = (1+r)^T$, because the average value of $R_T$ at any finite $T$ will be dominated by a few anamolous trajectories that reach high values. Also, this phenomenom will in general increase as the variability of $Z_t$ increases. One precise statement is: If $\delta \ge 0$ is such that $\delta < \text{Var}(\sqrt{Z_1}),$ then \[\lim_{T\to \infty} \frac{R_T}{(1 + r - \delta)^T} = 0\] with probability 1. Similarly to the previous video, one can observe certain predictable phenomenom in the midst of the randomness. I made the simulation and video in Python.
This is a simulation of a wave passing through a reflecting boundary that I made for a numerical PDE class. The wave solves the PDE \[a(x)\partial_t^2 u(x,t) - \partial_x (a(x)\partial_x u(x,t)) = 0\] for a function $a$ that models the boundary. I wrote the PDE solver in C and made the video using Python.