Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
Project: Teaching
Views: 195Kernel: Python 3 (Anaconda 2022)
The Random Walk
The first cell loads two external modules
In [1]:
Now we create a single random walk
In [6]:
More walks on one page
In [13]:
To investigate the average distance & displacement, we create a number of subloops. We end with two lists of the averages of many loops of different lengths
In [4]:
The average displacement remains at zero, as expected. However, the average distance from the origin increases. This appears to be a square-root relationship.
In [5]:
In [0]:
In [0]:
In [0]: