UP

HW#5 Math 504, Spring 2008

Problem #2, handout ‘Continuous approximation to random walks’

By Nasser Abbasi

12/14/2008

 

Report

PDF
HTML

Simulation

A Matlab function was written to simulate a random walk based on the Einstein-Wiener process to verify that the distribution of the final position of the walk is normally distributed with mean=beta*t and variance=2*D*t  (more details in the report).

 

The matlab function is here.  [MATLAB CODE

To run, save it to your Matlab working directory and type the command  nmaHW4math504() from the console.

 

The following is a screen shot of the matlab output

 

The top plot shows the convergence of the histogram to the normal distribution. The middle left plot shows that the relative error in variance is approaching zero as number of steps (n) is increasing. The middle left error shows the rms error between the distribution and the normal distribution showing that as delta t becomes smaller, the rms error is decreasing.

The bottom plot shows the normal probability plot (quantile plot) showing that it is close to straight line, verifying that the final distribution is indeed normal.