brownian_motion_simulation, a Python code which simulates Brownian motion in an M-dimensional region.

Brownian motion is a physical phenomenon which can be observed, for instance, when a small particle is immersed in a liquid. The particle will move as though under the influence of random forces of varying direction and magnitude.

There is a mathematical idealization of this motion, and from there a computational discretization that allows us to simulate the successive positions of a particle undergoing Brownian motion.


x = brownian_motion_simulation ( n, m, d, t )


The computer code and data files described and made available on this web page are distributed under the MIT license


brownian_motion_simulation is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version and a Python version.

Related Data and Codes:

duel_simulation, a Python code which simulates N repetitions of a duel between two players, each of whom has a known firing accuracy.

snakes_and_ladders, a Python code which simulates the game of Snakes and Ladders.

Source Code:

Last revised on 30 September 2012.