Home

Site Map

Search

random walk
                      Java applet
GeoAstro
Applets

Astronomy
random walk
                    Java applet
Chaos Game
random
                      walk Java applet
Java
random
                    walk Java applet
Miscel-

laneous

Gambler's Ruin applet

Random Walk Applet




1 dimension:
The blue point is moving on a line with integer coordinates:


random walk 1 dimension 1d
The 2 directions of a single step:
x+1, x-1

2 dimensions:

The blue point is moving in a plane with integer coordinates:

random walk applet 2 dimensions 2 d
The 4 directions of a single step:
x+1, x-1, y+1, y-1

1 dimensional
                random walk
2 dimensional random walk applet
select from the menu
start


stop
button starting a single walk,
maximum of n=1000 steps,
the diagram at the bottom is showing the distances d(n)

button to stop the walk

1 dimension:

An interesting question arising in the study of random walks concerns
the probability of returning to the initial position (origin, "equalization").

The probability P(n) of return to origin at step n (n even) is:

probability return to origin

For large n (even):

formula probability return origin

Graph of the first (strict) formula:

return 1 dimension formula

---

Applet results:

return to origin



The total number of returns to origin (within a fixed number n of steps) is proportional
to the number N of walks:


return to origin

The probalibity for n=100 steps is 0.076


2 dimensions:

Example:

  steps distance


100 steps, final position (11|7),
the distance from origin is d = sqrt(x2+y2) = 13.04


-----

The probability of return to origin at step n (n even):

return to origin 2 dimensuins

and for large n:

equalization

In 2 dimensions the probability is, of course, the square of
the one in 1 dimension, requiring x=0 AND y=0

Graph of the first (strict) formula:

return to origin 2 dimensions formula

---

Applet results:

2 dimensions return to origin


returns to origin 2 dimensional

The probalibity for n=50 steps is 0.014




Statistical analysis

test
button starting a set of N walks
number of steps
number of walks
the numbers of steps and walks can be selected from the menus


The mean squared distance is proportional to the number n of steps:

mean squared distance

diagram mean squared distance steps

Gauss distribution


Books
Küppers, Bernd-Olaf: Die Berechenbarkeit der Welt, Grenzfragen der exakten Wissenschaften. S. Hirzel, Stuttgart 2012.
Entropie und Zeitstruktur, S. 200-210

Eigen, Manfred, and Winkler, Ruth: Das Spiel, Naturgesetze steuern den Zufall. Pieper, München 1975.
Kapitel 4:Statistische Kugelspiele
Web Links
Random Walk--1-Dimensional (Wolfram MathWorld)

Random Walk--2-Dimensional (Wolfram MathWorld)

A 1D Random Walk Visits The Origin Infinitely Often

Updated: 2023, Oct 06