Running the model

random walk 1.0.nlogo

In the first demonstration, you will examine a simple random walk.  Hit the setup button to place the turtle at the center of the screen, and then hit go as often as you like to see how the turtle moves.

random walk 1.1.nlogo

In this demonstration, you can see how far the turtle is from the origin (0, 0).  Run the model several times and graph the distance how-far? vs. # of trials.

random walk 1.2.nlogo

In this model, you can change the number of steps #steps and observe how the random walk behaves when you run more and more trials.

random walk 1.3.nlogo

Now you get to randomize how long one-step? each step can be.  How does that affect the random walk?

random walk 1.4.nlogo

Here you can change everything.  Try different angles (like 1º or 15º or 45º).  How does the random walk change now?  Modify the length of each step and the number of steps as well.  Now that’s a random walk!

MonteCarloPi.nlogo

This final example is a program by Helene Dauerty (see Intro to Stats and Monte Carlo tutorials) that shows how to use a random walk to actually calculate π.  Have fun!
 

How it works
Running the model
Try it
Find out more
Before you leave

 

Nome

University of Notre Dame
Notre Dame, Indiana 46556
Phone: 574-631-5000

 

Copyright © 2006 University of Notre Dame
Last modified: July 08, 2007 12:51 PM