Top Banner
10.2 Random Walks
20

10.2 Random Walks

Feb 12, 2016

Download

Documents

yered

10.2 Random Walks. Random Walk. A random walk refers to the apparently random motion of an entity. This is often the best model of a physical process (Brownian motion) or financial index (stock price), etc. Aside: Fooled By Randomness. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 10.2 Random Walks

10.2 Random Walks

Page 2: 10.2 Random Walks

Random Walk

• A random walk refers to the apparently random motion of an entity.

• This is often the best model of a physical process (Brownian motion) or financial index (stock price), etc.

Page 3: 10.2 Random Walks

Aside: Fooled By Randomness

HAMLET: Do you see yonder cloud that's almost in the shape of a camel?

POLONIUS: By the mass, and 'tis like a camel, indeed. HAMLET: Methinks it is like a weasel. POLONIUS: It is backed like a weasel. HAMLET: Or like a whale. POLONIUS: Very like a whale.

Hamlet Act 2, Scene 2

Page 4: 10.2 Random Walks

1973 2004

Aside: Fooled By Randomness

Page 5: 10.2 Random Walks

What’s the Trend?

Page 6: 10.2 Random Walks
Page 7: 10.2 Random Walks

Simulating Motion: Cellular Automata

• If all we have to work with is a grid of cells (spreadsheet), how can we simulate a random walk?

• Moving a value from one cell to an adjacent cell is simulated by changing the contents of the cells over time:

time t time t +1

Page 8: 10.2 Random Walks

The Wave

Page 9: 10.2 Random Walks

Aside: The Wave/Particle Duality

• We tend to think of “true” motion as movement of an object from one location to another, and the wave phenomenon as an illusion of motion.

• But at the most fundamental level, energy and matter behave like both a particle (object) and a wave….

Page 10: 10.2 Random Walks

Aside: The Wave/Particle Duality

Double-slit experiment (Young 1801):Light must be a wave, because interference produces more than two bands on screen.

Photoelectric effect (Thomson 1899):Light must consist of particles, becauselight waves knock electrons out of ametal plate.

Page 11: 10.2 Random Walks

Cellular Automata• A cellular automaton (plural automata) is a dynamical

model discrete in space, time, and state (possible values, typically just 0 and 1).

• CA has a grid of cells, and a set of transition rules describing what happens to a cell based on its own state and the state of its neighbors.

• Simplest CA are one-dimensional….

Page 12: 10.2 Random Walks

1D Cellular Automata

Sample rule: Look at a cell and its left and right neighbors. Change the cell according to the following table:

Page 13: 10.2 Random Walks

ExCellular Automata• Each row is the state of the CA at a particular time step.

• First row has random values:= IF(RAND()>0.5, 1, 0)

• Subsequent rows have rule:=IF( OR (AND( A1=1,B1=1,C1=1), AND (A1=1,B1=0,C1=0), AND (A1=0,B1=0,C1=0)), 0, 1)

Page 14: 10.2 Random Walks

ExCellular Automata• Drag second row, second column rightward to next-to-last• Keep first and last columns (boundary conditions) constant• Drag second row down 60 or 70 rows• Use Conditional Formatting / Color Scales to color cells based

on values• Zoom out to view whole display• Hit F9 key to restart with new initial conditions• Experiment with other rules:

Page 15: 10.2 Random Walks

Cellular Automata in Nature

Page 16: 10.2 Random Walks

2D Cellular Automata

Page 17: 10.2 Random Walks

Cellular Automata as the Basis for Life, the Universe,

and Everything

Page 18: 10.2 Random Walks

Algorithm for a Random Walk, With Diagonal Steps:

seed random number generatorlet x, x0, y, and y0 be 0

let n be the number of stepslet list be a list containing the origindo the following n times:let rand be a random 0 or 1if rand is 0 increment x by 1else decrement x by 1do the same for yappend point (x, y) onto listcreate and display graphics of walkreport distance between first and last points,

Page 19: 10.2 Random Walks

Animation

Tricky in Excel, but fortunately a download is available here.

Page 20: 10.2 Random Walks

Average Distance Traveled

Average distance traveled increases (but not monotonically) with time (# of steps n):