Note
Go to the end to download the full example code.
Simple Random Walk#
Simulate and visualise paths
# Author: Dialid Santiago <d.santiago@outlook.com>
# License: MIT
# Description: Simulate and visualise a Simple 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=200, figsize=(12, 7), colormap="cool")
fig.show()
![Simple Random Walk, Monte Carlo Simulated Paths $\{{X_t, t \in [t_0, T]\}}$, $X_T$ Marginal](../_images/sphx_glr_plot_simple_random_walk_001.png)
p = SimpleRandomWalk(p=0.25)
fig = p.draw(n=100, N=200, figsize=(12, 7), colormap="summer")
fig.show()
![Simple Random Walk with p=0.25, Monte Carlo Simulated Paths $\{{X_t, t \in [t_0, T]\}}$, $X_T$ Marginal](../_images/sphx_glr_plot_simple_random_walk_002.png)
fig = p.plot(n=10, N=20, figsize=(12, 7))
fig.show()

Total running time of the script: (0 minutes 2.441 seconds)