Monday, 17 February 2014

Simulation of a random walk

Here is something for Lecture 15 (on random walk).

Simulating the Simple Random Walk
from the Wolfram Demonstrations Project by Heikki Ruskeepää

Click above to play with a simulation of random walk produced by tossing a fair coin. The "seed" reruns with a different set of random coin tosses. The curves are confidence intervals, within which the walk will lie with high probability. Random walks are very important in physics, biology, and finance.



There are many interesting questions that one can ask about symmetric random walk, i.e. the random paths produced by tossing a fair coin (up 1 for a head, down 1 for a tail).
  • How many times on-average does a walk of length $n$ cross the $x$-axis?
  • What is the distribution of the last crossing of the $x$-axis? (recall Lecture 1!)
  • What is the distribution of the terminal value $X_n$?
  • As you try different seeds, do you think some walks look more "typical" than others?