
| CHAPTER RESOURCES: PROJECTS
CHAPTER 8 |
| Random Walks In the project for Chapter 8 you used the calculator's random number generator to simulate a coin-tossing experiment. This kind of simulation is a good way to get a feel for what random processes look like. In these activities you'll simulate one of the simplest and most basic random processes, the random walk. Random walks have been used to model everything from the folding of a polymer molecule to the ups and downs of stock prices. Here's how you can take your own random walk: Call the point where you're standing now the origin. Flip a coin: If it comes up Heads take one step north, if it's Tails take one step south. Now flip the coin again and repeat the process. After 100 steps, how far from the origin would you expect to be? Will you ever get back to the origin, and if you do, how often will this happen? In these activities you'll use the graphing calculator to investigate these questions by looking at graphs of one-dimensional random walks. ACTIVITIES 1. Here is s procedure for drawing a random walk with 100 steps. First we'll use the calculator's random number generator to draw 100 random numbers that are either +1 or -1. We'll treat +1 as a step to the north and -1 as a step to the south. To get a list of steps on the TI-83, enter 2randInt(0,1,100) - 1 To enter the randInt function, press Math, go the Prb menu, and select item number 5. The calculator will show you the beginning of the list, which will look something like this: {-1 -1 1 -1 1 ... Since these are random numbers, you may see a different sequence when you begin this activity. To turn the steps into a walk, we need to add them and keep track of the cumulative sum: The sum of the first n terms of L1 gives our position after n steps. The calculator has a function that makes this easy. Enter cumSum(L1) The cumSum function is item number 0 in the Math submenu in the Matrix window. The calculator shows the cumulative sum of L2, which would look like this: {-1 -2 -1 -2 -1 ... Now under Mode select Seq as the plotting mode, and under Window set nMin to 0 and nMax to 99, Xmin to 0 and Xmax to 100, Ymin to -50 and Ymax to 50, Xscl to 10 and Yscl to 10. In the Y= window enter L2(n) as the sequence u(n) to plot and set the graph style to Line. Press Graph to see your first random walk. The time axis goes from left to right and the north-south position goes from top to bottom. 2. Now you'll gather some statistics about random walks. It will be convenient to set up the calculation so that you can draw a fresh random walk with a single keystroke. To do this, go back to the Home screen and use 2nd Entry to recall the definition of L1. Type Alpha : and then type the definition of L2 as given above. Now when you press Enter, the calculator builds the list of random walk positions in a single step. Draw ten random walks and look at their graphs. Each time you want a new walk, go to the home screen, use 2nd Entry to recall the compound statement that defines L2, press Enter, wait for the walk to calculate, and then press Graph. For each graph, record the following: How many times the graph crosses the axis The highest point reached and the lowest 3. Go back to the definition of L2 on the home screen and change 100 to 400 so that you generate a walk with 400 steps. In the Window screen, make the corresponding changes, increasing nMax to 399 and Xmax to 400. Now look at the graphs of ten 400-step walks and record the same statistics as in Activity 2. What is different about the 400-step walks? FURTHER READING ON THE WEB There are several good Web sites where you can continue to explore the shapes of random walks. The walks you graphed in these activities were one-dimensional: The walker moved either north or south at each step, walking back and forth along a line. In a two-dimensional walk, the walker picks a random direction on the plane and takes a step in that direction. You can think of the random direction as a random angle between 0 and 360 degrees. To see what these walks look like, visit http://math.furman.edu/~dcs/java/rw.html When you press Draw, the applet draws the first 1000 steps of a walk. Each time you press Continue it adds another 1000 steps. If you look at fifteen or twenty of these walks you'll notice that just as the one-dimensional walks sometimes stay on one side of the axis, these two-dimensional often seem to concentrate in one quadrant. We might expect that random walks would be uniformly spread out over the plane, homogeneously filling up the space, but that's not the way randomness works: instead it looks clumpy and disorganized. To see a thousand random walks going on simultaneously, take a look at http://reylab.bidmc.harvard.edu/DynaDx/abc/Random_walk/def.html The color changes every 50 steps, so you can get a feeling for the average rate at which the walks are spreading away from the origin. Here the walking space does eventually get filled, but remember that you're now looking at the combined behavior of 1000 walks. It has been proved that if you follow any individual walk, the probability is 1 that it eventually returns to the neighborhood of the origin, though the return may take a long time. For random walks in three-dimensional space this theorem is false: there's a positive probability that a three-dimensional walk wanders off and never comes back near the origin! |