Note
Go to the end to download the full example code.
Random Walk#
# Author: Dialid Santiago <d.santiago@outlook.com>
# License: MIT
# Description: Advent Calendar 2025 - Plot Random Walk
from aleatory.processes import SimpleRandomWalk, RandomWalk
from aleatory.styles import qp_style
qp_style() # Use quant-pastel-style
p = RandomWalk()
fig = p.draw(n=100, N=300, figsize=(12, 7), dpi=200)
fig.show()
p = SimpleRandomWalk(p=0.75)
fig = p.draw(n=100, N=300, figsize=(12, 7), dpi=200)
fig.show()
Total running time of the script: (0 minutes 1.757 seconds)
![Simple Random Walk, Simulated Paths $X_t, t \in [t_0, T]$, $X_T$](../_images/sphx_glr_plot_random_walk_001.png)
![Simple Random Walk with p=0.75, Simulated Paths $X_t, t \in [t_0, T]$, $X_T$](../_images/sphx_glr_plot_random_walk_002.png)